RESIDUAL / ENGINEER WALKTHROUGH

Why the harness exists

A worker is allowed to be wrong. RESIDUAL moves correctness authority outside the worker: constrain execution, observe what actually happened, independently verify the artifact, repair only unresolved obligations, then integrate deterministically.

THE THESIS: reliability does not require every model invocation to be reliable. Reliability can emerge from constraining, observing, verifying, and deterministically integrating unreliable computation.

1 · Control plane — follow the green path

CONTRACTfreeze scope, tools, budgets, acceptance
WORKERuntrusted candidate generation
EVIDENCE BUSobserved facts, not claims
VERIFIERindependent acceptance authority
RESIDUALfailed obligation + counterexample only
RE-VERIFYsame acceptance boundary
INTEGRATORdeterministic accepted state
RECEIPTevidence-bound provenance
Worker output is a proposal. Only the verifier + deterministic integrator can turn it into accepted state.
PHASEREADY
EVIDENCE0
CHECKS0/4
RESIDUAL0
OUTCOME

2 · What actually moves through the system

CONTRACT

scope: src/parser.py
tools: pytest, fs
network: DENY
wall_clock: 60s
acceptance: 4 checks

WORKER OUTPUT

artifact: 7fa2…91c
claim: SUCCESS
files_changed: 1
tests_claimed: PASS
trust: NONE

OBSERVED EVIDENCE

scope writes: 1
OOS writes: 0
pytest: executed
actual: 13/14
claim != evidence
VERIFIER COUNTEREXAMPLE

input:   "alpha,beta",gamma
expected: ["alpha,beta", "gamma"]
actual:   ["alpha", "beta", "gamma"]

→ worker SUCCESS claim rejected
✓ ACCEPTED WORK
preserved / not recomputed
+
↻ FAILED OBLIGATION
quoted-comma → residual repair
RECEIPT rcpt-demo-001
contract_hash: 11db…8ae
artifact_hash: c42a…11e
verifier: csv-contract@rev-12
evidence: 9b41…0ff
outcome: PASS · integration: ACCEPTED

Live evidence stream

Same faulty candidate, two control models

Typical agent loop

agent editsclaims “fixed”DONE?

The model's completion claim can become operationally significant unless another layer independently checks it.

RESIDUAL

worker proposesverifier FAILresidual repairPASSintegrate

The worker never owns acceptance. Evidence, verification, and deterministic integration form the reliability boundary.

Difference in one table

Normal: model says complete
RESIDUAL: verifier decides
Normal: retry/re-run task
RESIDUAL: repair unresolved residual
Normal: context/logs carry state
RESIDUAL: evidence + receipts carry state
Normal: agent may drive integration
RESIDUAL: deterministic integrator

Engineering invariants demonstrated

Contract before execution
scope, tools and budgets are frozen before worker start.
Claims are not evidence
“tests pass” is distinct from an observed test result.
Independent verifier authority
candidate generation cannot self-certify acceptance.
Counterexample-driven repair
failure becomes a bounded residual packet.
Accepted work survives
successful obligations are preserved instead of recomputed.
Deterministic integration
only verified artifacts enter accepted state.
Receipt provenance
contract, artifact, verifier revision and evidence snapshot are bound together.
Fail closed
UNKNOWN/FAIL cannot silently become accepted state.