Skip to main content

Module held_out

Module held_out 

Source
Expand description

Held-out acceptance tests: written by a second author call after the visible ones, kept in the state directory — never in the worktree, never in an implementer’s input — red-checked on the checkpoint, and run over the final tree after an attempt that passed visibly. Only the scenario IDs of a failure reach a retry.

Structs§

Discarded
A file the author wrote that was not kept, and why.
HeldOutFile
One kept held-out test file.
Manifest
What judged a task, stored beside the files’ contents.
Ran
One held-out file’s run.
Tampered
A stored set that no longer matches what was recorded.

Constants§

LIMIT
Held-out files per task, composition tests included.
REF_PREFIX
Where a finished feature’s held-out sets are published.

Functions§

dir
Where a task’s held-out set lives: <project state>/held-out/<feature>/<task>.
leaked
Held-out literals in the attempt’s added lines that it could only have copied: not in the spec, the visible tests or the tree it started from . For a native attempt this never fires; for an external agent, which can read the state directory, it is the mechanical check.
literals
Literals a copied test would carry: quoted strings of 6+ characters and numbers with 4+ significant digits.
load_verified
The stored set, checked: the manifest must hash to expected and every file to its recorded hash.
overlay_run
Writes each held-out file over the worktree, runs its command, and puts the tree back exactly as it was: no file of the set, nothing a test wrote, no changed judge input survives — a later attempt can read none of it.
publish
Publishes a finished feature’s held-out sets: one commit, parented on the feature branch’s tip, with <task>/manifest.json and <task>/files/… of every task, under refs/speccoder/held-out/<feature>. Only once the feature is done — earlier, a later task could read them. Never pushed by speccoder itself. Ok(None) when no task has a set.
store
Stores the manifest and the kept files’ contents; returns the manifest’s hash. A previous set for the task is replaced.