Skip to content

feat(eval): measure whether a repo map helps, with hidden tests (roadmap B4) - #310

Merged
yusiwen merged 1 commit into
masterfrom
feat/repo-index-spike
Oct 28, 2026
Merged

yusiwen merged 1 commit into
masterfrom
feat/repo-index-spike

Conversation

@yusiwen

@yusiwen yusiwen commented Oct 28, 2026

Copy link
Copy Markdown
Owner

What changed

  • eval/spike-repo-index/ (new, a nested module): six tasks adapted from the tier-2/3 suite, each padded
    with ten unrelated internal/ packages so a defect has to be found in a tree, and each with its tests
    in 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 test
    at all); a map configuration prepends a bounded symbol digest to the prompt; copyTask now carries
    subpackages, 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, and repoMapDigest (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 the
    reference 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 for
    reopening, 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 and
    the three reopening conditions in its entry (In progress 3 → 2, Not started 20 → 21, total still 40).
  • docs/eval.md points 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

build map
Solved 6/6 (12/12 runs) 6/6 (12/12 runs)
Median tokens per run 115,649 86,978
Total tokens 1,792,029 2,416,678
Tokens per solved task 298,671 402,779

The 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 packages ok; go vet and gofmt -l clean.
  • The corpus is proved without a provider: TestSpikeTasksAreSolvable runs every task red→green against
    its reference solution (12 go test invocations), TestInstallHiddenTestsRefusesAnEmptySuite blocks a
    vacuous pass, TestSpikePromptsDoNotNameFiles blocks a leaky prompt.
  • git log --format='%h %G? %s' → G.

Honest scope

  • Six tasks of twenty to thirty files, one language, one model, two repetitions per cell. The mean is not
    a robust statistic at that size, which is why the median is reported beside it.
  • The tool-surface arm was not built; the issue's method named three configurations and this ran two. The
    narrowing is recorded in the document, not discovered later.
  • The run needed the binary copied to /tmp (executing bin/tinycode in place fails every provider call
    on 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

…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
@yusiwen yusiwen added documentation Improvements or additions to documentation tests Test coverage and test infrastructure labels Oct 28, 2026
@yusiwen
yusiwen merged commit 0f4eea7 into master Oct 28, 2026
9 checks passed
@yusiwen
yusiwen deleted the feat/repo-index-spike branch October 28, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation tests Test coverage and test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant