From cfc1f2904eb1598521ebc5575d454c0aa4661b45 Mon Sep 17 00:00:00 2001 From: sora <2075279110@qq.com> Date: Thu, 17 Sep 2026 05:54:12 +0000 Subject: [PATCH] Fix mirror label: every template contains {img} The containment check ('{img}' in template) matched ALL entries, so every announce said 'via docker.io(daemon mirrors)' while the chain silently rotated real mirrors. The daemon-default entry is exactly '{img}' -- compare equality. Co-Authored-By: Claude --- evalharness/sandbox/prefetch.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/evalharness/sandbox/prefetch.py b/evalharness/sandbox/prefetch.py index 3e56fdb..586c577 100644 --- a/evalharness/sandbox/prefetch.py +++ b/evalharness/sandbox/prefetch.py @@ -115,7 +115,11 @@ def _pull_one(image: str, verbose: bool = True) -> None: for template in _CN_MIRROR_FALLBACKS: ref = template.format(img=image) if verbose: - src = 'docker.io(daemon mirrors)' if '{img}' in template else template.split('/{img}')[0] + # the daemon-default entry IS exactly '{img}'; every real + # mirror template also CONTAINS '{img}' -- the old containment + # check matched both and labeled everything docker.io + src = ('docker.io (daemon mirrors)' if template.strip() == '{img}' + else template.split('/{img}')[0]) print(f'ยท pulling sandbox image {image} via {src} ...', file=_sys.stderr, flush=True) t0 = _time.monotonic()