Repository navigation
Done
Labels
area:benchBenchmarks, A/B runs and reports (bench/, reports/)bugSomething isn't workingrisk:T1Risk tier T1 (tests, examples, changelog.d), set by the controller from the diff
Description
Found in the design read of #1279, which is where this class becomes worth a card: the constants are now the only source of the table, and nothing checks them against the file tree or against the policy a run actually uses.
Not fixed in #1279 on purpose — every direct check calls build(0), which is the dataset load that PR exists to remove. So this is a card for the residue, not a request to reopen it.
Facts at 1ca5fcb2 (bench/candidate_methods.py blob 31aba77348a3240b65994312f05da4ee92aed1c0)
:88-89—source_fingerprint()globsexamples/<ALGORITHMS key>/*.py. A key that names no existing directory contributes zero paths and no error, so that port's sources stop being hashed: editing the port no longer changes the fingerprint, and cached results stop being invalidated by it.:540-541— the runtime guard comparespolicy.name/policy.fidelityto the table.buildnow spells both from the same module constants (name=NAME,fidelity=FIDELITY), so the guard cannot fire. At base the key came frombuild(0).nameand the guard compared a secondbuild()call to that key, so the folder relation was unchecked there too — this is not a regression, it is an unchecked invariant that the change makes permanent.- Nothing pins key→directory:
tests/test_candidate_methods.pyonly indexesALGORITHMSby name (:232,:301),tests/test_bench_import_cost.pycompares the names to a dump (:101,:116). :630/:646— the dry-run reservation is nowsum(PROPOSAL_CALLS_PER_CANDIDATE[name] …), read from the constant.:540-541does not compareproposal_calls_per_candidate, so a port whosebuildreserves a different number keeps the suite green and misprints only the dry-run text. At base this was impossible by construction: the table was filled frombuilder(0).proposal_calls_per_candidate.
Falsifiers
- Rename one port's
NAME(and its entry in the pinned table) without renaming its directory, edit that port's source:source_fingerprint()is unchanged, suite green. - Set one port's
PROPOSAL_CALLSto a number itsbuilddoes not reserve:--dry-runprints the new number per mode, suite green.
Cheapest fix shape
is_dir()on eachALGORITHMSkey — filesystem only, no dataset, nobuild(0). That closes the fingerprint hole and is the check the body of fix(bench): list the candidate methods without building every port #1279 wrongly claimed to have.- For the reservation, either compare
PROPOSAL_CALLSto the policy in an existing test that already builds every port (tests/test_candidate_methods.py:301), or derive the constant once and delete the second spelling. Design choice, not a mandate.
Acceptance
A mutation that moves a NAME off its folder fails a test without loading a dataset; a mutation that changes one port's PROPOSAL_CALLS fails a test.
Written-by: AgentDescent Lead
Bot: AgentDescent Reviewer (design read of #1279)
Metadata
Metadata
Assignees
Labels
area:benchBenchmarks, A/B runs and reports (bench/, reports/)bugSomething isn't workingrisk:T1Risk tier T1 (tests, examples, changelog.d), set by the controller from the diff
Activity