Verification Receipts for Orcho Runs
Verification is only useful when it proves the right thing in the right place. A receipt makes the verification environment inspectable: instead of trusting the sentence “tests passed”, Orcho records where and how each check actually ran, then lets gates and final acceptance read those records.
declared command the verification contract names the check | vexecuted in the declared env interpreter, working directory, overrides | vreceipt written on disk runs/<ts>/verification_command_receipts/ | vgates and final acceptance read receipts, not the worker's claimWithout receipts, a run can look green while testing the wrong checkout, missing a sibling change, or relying on a check that ran before the last edit.
What a receipt records
Section titled “What a receipt records”A run directory holds three receipt kinds, each in its own directory under
runs/<ts>/:
| Kind | Written when | Location |
|---|---|---|
| Phase environment receipt | after each implement / repair round | verification_receipts/<phase>_round<N>.json |
| Env-assertion receipt | declared environment assertions run | verification_env_receipts/verify_env_<env>.json |
| Command receipt | a declared verification command runs | verification_command_receipts/<command>.json |
Phase environment receipts prove the phase worked in the expected tree:
phase, round, cwd, the interpreter identity (python),
checks[{name, expected, actual, passed}] (for example an import-provenance
probe), and commands[{argv, exit_code}].
Env-assertion receipts prove a declared environment resolved as declared:
env, subject (checkout and project), cwd, interpreter,
env_overrides, assertions[{name, kind, expected, actual, passed, detail}],
and an all_passed rollup.
Command receipts are the gating shape — one per declared command:
| Field | Meaning |
|---|---|
command | The declared command name from the verification contract. |
env | The declared environment the command ran in. |
cwd | The working directory the command actually used. |
argv | The resolved argument vector that executed. |
assertions | Declared environment assertions with expected / actual / passed. |
exit_code | The real process exit code; only 0 can count as passed. |
duration_s | Wall-clock duration of the command. |
stdout_tail / stderr_tail | Output tails for quick inspection; log_path holds the full log. |
parity | Whether the check is absolute or differential against a baseline. |
detail | Execution failure detail; any non-empty value means the receipt failed. |
git | Provenance: checkout_head, baseline_head, changed_files_fingerprint. |
dependencies | Per-declared-dependency provenance for cross-repo staleness. |
A receipt passes only when the exit code is 0, every declared assertion
passed, and detail is empty. A missing or unreadable receipt can never read
as green.
Example
Section titled “Example”A sanitized command receipt for a lint check:
{ "schema_version": 2, "kind": "verification_command", "command": "lint", "env": "core", "cwd": "/repo/app", "argv": ["ruff", "check", "api/"], "assertions": [ { "name": "pipeline_import", "expected": "/repo/app/pipeline/__init__.py", "actual": "/repo/app/pipeline/__init__.py", "passed": true } ], "exit_code": 0, "duration_s": 4.2, "parity": "absolute", "detail": "", "git": { "checkout_head": "9f2c41a", "baseline_head": null, "changed_files_fingerprint": "b1e6..." }}The git block is what makes staleness detectable: if the checkout moves
after this receipt was written, the proof no longer covers the current tree.
Classification: present, missing, failed, stale
Section titled “Classification: present, missing, failed, stale”Readiness classifies every required command receipt into exactly one state:
| Status | Meaning | Next action |
|---|---|---|
present | Receipt exists, passed, and still matches the current tree. | Nothing; the check is proven. |
missing | No receipt on disk for the required command. | Run the check. |
failed | Non-zero exit, a failed declared assertion, or a non-empty execution detail. | Fix the code or the check, then re-run. |
stale | The receipt passed, but the checkout HEAD or changed-files fingerprint moved since it ran — or a declared dependency moved. | Re-run the check; the code may be fine. |
The distinction is load-bearing because each state implies a different action.
missing means nothing was proven. failed means something is wrong and
needs a fix. stale means the proof expired: the check passed once, but the
tree changed afterward, so only a re-run — not a repair — restores readiness.
Collapsing these into one “not green” state would hide which action unblocks
delivery.
Who reads receipts
Section titled “Who reads receipts”- Verification gates read receipts at gate time; a
requiregate blocks the transition on any missing, failed, or stale required receipt. - Final acceptance reads the readiness summary built from receipt classification instead of trusting the worker’s own report.
- The evidence bundle carries a compact receipts digest per phase round, with the full receipts staying on disk in the run directory.
- MCP clients read
orcho_run_evidence(slice="verification_receipts")for a typed projection — no raw log scraping required.
Deep reference
Section titled “Deep reference”The canonical engineering doc lives with the code:
- docs/architecture/verification_contract.md — the full proof-and-environment contract behind receipts
Related
Section titled “Related”- Gates and verification
- False-ready delivery
- Evidence bundle
- Artifact reference
- Project tuning and plugins — how in-run phase gates differ from the receipts that block delivery.