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.
- Held
OutFile - One kept held-out test file.
- Manifest
- What judged a task, stored beside the files’ contents.
- Ran
- One held-out file’s run.
- Selection
- The held-out sets a publication carries: exactly those whose manifest digest a task closed on the pushed head names in its evidence.
- 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 unit’s published held-out sets live.
Functions§
- closed_
on - The tasks of
unitclosed onhead(ticked, with the commit carrying their verdict — the verifier’s discovery), each with the held-out digests its evidence names. - 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
expectedand every file to its recorded hash. - named_
digests - The digests a task commit’s evidence names: the signed
held_outphase, else the commit’sHeld-Out:trailer. - open_
sealed - A sealed set, checked against its reference.
- overlaid
- The digests of the worktree-relative paths overlaid on
wt_rootnow:Some(empty)when nothing is;Nonewhen a marker exists that cannot be read (then nothing untracked may be shown). - overlay_
key - The SHA-256 a worktree-relative path is named by in the marker.
- overlay_
red overlay_runfor a red check: each distinct command also runs once on the tree without any held-out file, so a file is red only by the failing tests it adds (speccoder_core::verify::classify_red_added).- 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. While it runs, the worktree’s marker hides the files from its views.
- publication_
store - The private repository publications are built in: a bare repository
in the project’s state directory that borrows the project’s objects
(
objects/info/alternates), so the tip a publication is parented on resolves there while the held-out tests themselves never enter the project’s repository. Every attempt can read that repository’s refs and objects (git show,git fsck --unreachable, a script a check runs); none can read the state directory. - publish
- Publishes a finished feature’s held-out sets in the private store
(every task is closed then):
publish_closedover the tasks the branch tip closes. Never pushed here;speccoder prpushes it.Ok(None)when no closed task names a stored set. - publish_
closed - Publishes
selectionas one commit underrefs/speccoder/held-out/<unit>of the privatestore(publication_store):<key>/manifest.jsonand<key>/files/…of every set, parented ontip(the pushed branch) and on the ref’s previous commit, so the ref only grows and every push of it is a fast-forward.Ok(None)when nothing is selected. - push
- Pushes
commit(built instore) toremote’srefs/speccoder/held-out/<unit>fromrepo, reading the store’s objects as alternates: nothing is written torepo, no local ref either. - red_
class - The red class of one held-out run: by what its file adds when the run without it is known, else by the run alone.
- seal
- Seals a held-out set keyed by
(unit, requirement)— the entry point for sets decided before a run (a bug’s reproduction variants, a review’s oracle): the one store protocol, each manifest entry citing its statements or scenarios. - sealed_
dir - Where a sealed set lives:
<project state>/held-out/<unit>/req-<key>/(run-time task sets stay at<unit>/<task>/). - select_
closed - Selects, from every set stored for
unit(whatever its key: a task’s today, a sealed set’s once the store holds them — one protocol), those whose manifest digest a closed task names.closedis(task, digests its evidence names). Each selected set is checked against its digest first; a tampered one is never published. - store
- Stores the manifest and the kept files’ contents; returns the manifest’s hash. A previous set for the task is replaced.