@@ -67,7 +67,11 @@ def newest_reports(eval_dir, run_label=None):
6767 if not match :
6868 continue
6969 cond , run_id = match .group ('cond' ), match .group ('run_id' )
70- if run_label is not None and not run_id .startswith (run_label + '-' ):
70+ # The label is everything before the final "-"; the evaluator's
71+ # timestamp suffix contains none. A prefix test would make "base50"
72+ # match "base50-light-2026...", so a frontier page would silently
73+ # render light-tier results.
74+ if run_label is not None and run_id .rsplit ('-' , 1 )[0 ] != run_label :
7175 continue
7276 previous = latest .get (cond )
7377 if previous is None or run_id > previous [0 ]:
@@ -141,10 +145,16 @@ def scored_patches(eval_dir, run_id, model_name):
141145 return patches
142146
143147
144- def index_cells (runs_root ):
145- """Map (condition, instance, patch text) -> cell directory."""
148+ def index_cells (runs_root , run_id = None ):
149+ """Map (condition, instance, patch text) -> cell directory.
150+
151+ Scoped to one benchmark run. Two runs of the same condition on the same
152+ instance can produce byte-identical patches, and an unscoped index lets the
153+ later one win the key: a frontier row then reads its models and telemetry
154+ out of a light-tier cell, and the page reports the wrong experiment.
155+ """
146156 index = {}
147- pattern = os .path .join (runs_root , '*' , '*' , '*' , 'prediction.json' )
157+ pattern = os .path .join (runs_root , run_id or '*' , '*' , '*' , 'prediction.json' )
148158 for path in glob .glob (pattern ):
149159 try :
150160 record = read_json (path )
@@ -160,7 +170,7 @@ def index_cells(runs_root):
160170 return index
161171
162172
163- def index_attempts (runs_root ):
173+ def index_attempts (runs_root , run_id = None ):
164174 """Cells that ran and recorded an outcome, keyed by (condition, instance).
165175
166176 A single-shot cell that never produced an applicable patch writes an
@@ -169,7 +179,7 @@ def index_attempts(runs_root):
169179 as missing data rather than as the failure it is.
170180 """
171181 attempts = {}
172- for path in glob .glob (os .path .join (runs_root , '*' , '*' , '*' , 'outcome.json' )):
182+ for path in glob .glob (os .path .join (runs_root , run_id or '*' , '*' , '*' , 'outcome.json' )):
173183 try :
174184 record = read_json (path )
175185 except ValueError :
@@ -305,6 +315,8 @@ def main():
305315 help = 'UTC timestamp supplied by the caller' )
306316 ap .add_argument ('--run-label' , default = None ,
307317 help = 'only read evaluator reports from this labelled batch' )
318+ ap .add_argument ('--run-id' , default = None ,
319+ help = 'benchmark run whose cells back this page; defaults to --run-label' )
308320 args = ap .parse_args ()
309321
310322 root = os .path .abspath (args .repo_root )
@@ -325,8 +337,9 @@ def main():
325337 lock = read_json (os .path .join (code_dir , 'external-sources.lock.json' ))
326338
327339 latest , superseded = newest_reports (eval_dir , args .run_label )
328- cells = index_cells (runs_root )
329- attempts_index = index_attempts (runs_root )
340+ cell_scope = args .run_id or args .run_label
341+ cells = index_cells (runs_root , cell_scope )
342+ attempts_index = index_attempts (runs_root , cell_scope )
330343
331344 # What the run was actually configured with, gathered from the cells rather
332345 # than assumed. A page that hardcodes its model names lies the first time
0 commit comments