Repository navigation
feat(eval): measure whether a repo map helps, with hidden tests (roadmap B4) - #310
Merged
Merged
Conversation
…map B4) The spike #308 asked for. Three things had to exist before it could be run. The corpus: six tasks under eval/spike-repo-index/tasks, adapted from the tier-2/3 suite and padded with ten unrelated packages each, so finding a defect means surveying a tree rather than reading two files. Each task is its own module; the whole corpus is a nested module so `go test ./...` stays what it was. The instrument: the ordinary harness grades with the task's visible test, and a failing test prints the package and line — it localizes the defect before the agent starts, which is exactly the half of a repo map's job this spike exists to test. `-hidden <dir>` installs the suite after the run instead, and the work copy carries no test at all. `copyTask` now carries subpackages, without which the padding would never have reached the agent. The treatment: a `map` configuration that prepends a bounded symbol digest (files, packages, imports, exported signatures, 2000 tokens) to the prompt — no new capability to call, which keeps the comparison to "survey in hand" versus "survey by hand". Result, on 24 attempts: both arms solved 6/6, and the map arm raised tokens per solved task from 298,671 to 402,779. Under the condition registered in the issue before the run, that is a **no-go for an injected map**. The document records the two qualifications — the corpus had no headroom (nothing could be "solved more"), and the total is dominated by one 35-step attempt while the median run got cheaper and shorter — plus the three conditions under which B4 reopens, the callable tool surface being the one that was never built. The corpus is proved offline by `go test ./eval/runner`: every task red with its hidden suite, green after its reference solution, padding present in the work copy, prompts naming no file, and the map arm's prompt carrying the digest while the baseline's is untouched. Refs #308, #168
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
eval/spike-repo-index/(new, a nested module): six tasks adapted from the tier-2/3 suite, each paddedwith ten unrelated
internal/packages so a defect has to be found in a tree, and each with its testsin a sibling
hidden/directory instead of the work copy.eval/runner:-hidden <dir>installs a task's suite after the run (the work copy carries no testat all); a
mapconfiguration prepends a bounded symbol digest to the prompt;copyTasknow carriessubpackages, without which the padding never reached the agent.
eval/runner/spike.go: the loader for tasks whose tests are outside them, the hidden-suite installer,promptFor, andrepoMapDigest(files, packages, imports, exported signatures; 2000-token cap;deterministic).
eval/runner/spike_test.go: proves the corpus offline — red with the hidden suite, green after thereference solution; padding reaches the work copy; prompts name no file; the digest's shape, budget and
determinism; the map arm's prompt carries it and the baseline's is untouched.
docs/repo-index-spike.md: the measurement, its verdict, the qualifications, the conditions forreopening, and how to reproduce it.
docs/roadmap.md: B4 back to Not started — spiked 2026-10-28, no-go ([agent] Spike: is a repository index worth building? (roadmap B4) #308), with the verdict andthe three reopening conditions in its entry (In progress 3 → 2, Not started 20 → 21, total still 40).
docs/eval.mdpoints at the corpus; the documented test count follows the tree (1270).Why
The harness grades with a task's visible test, and a failing test prints the package and line — it
localises the defect before the agent starts. That measures comprehension, not discovery, and discovery is
the half of a repo map B4 is about. Hidden tests fix the instrument; padding gives discovery something to
cost.
Result
buildmapThe pre-registered condition (solve ≥2 more, or cut tokens per solved task ≥20%) is not met →
no-go for an injected map. The document records why that verdict is narrower than "a repo map is
useless": the corpus had no headroom left, the total rests on one 35-step attempt while the median run
got cheaper and shorter, and the callable tool surface was never built.
Verification
go test ./... -count=1→ 16 packagesok;go vetandgofmt -lclean.TestSpikeTasksAreSolvableruns every task red→green againstits reference solution (12
go testinvocations),TestInstallHiddenTestsRefusesAnEmptySuiteblocks avacuous pass,
TestSpikePromptsDoNotNameFilesblocks a leaky prompt.git log --format='%h %G? %s'→G.Honest scope
a robust statistic at that size, which is why the median is reported beside it.
narrowing is recorded in the document, not discovered later.
/tmp(executingbin/tinycodein place fails every provider callon this machine, byte-identical copy succeeds); that is a harness quirk outside this repository and is
noted in the document's reproduction section.
Follow-ups
Refs #308, #168