Skip to content
Agent Field Notes
← Return to research directory

HARNESS PRACTICE

One return, five boundaries: a runnable end-to-end Harness project

Run one fictional return through bounded fallback, evidence, fair admission, durable replay, workflow migration and lost-response reconciliation; preserve a red learner baseline and verify actual SQLite evidence.

1. The merchant created the return; its worker did not receive the answer

Task journey-return requests one fictional return for order o-100, quantity 1. The merchant commits it under return:journey-return:v1, drops the HTTP response, and the worker exits. The Agent checkpoint has no receipt yet. Should the task release capacity, change models, repeat the write, or upgrade its saved workflow?

The answer must preserve the same task facts across five mechanisms. Tenant scheduling determines admission and held capacity. Durable reducers recognize old deliveries. Migration preserves business meaning and fences old workers. Fallback changes the decision maker within explicit bounds. Tool contracts distinguish supported proposal, approval and completed effect. This project connects them through one executable return path. It creates a return request, not a refund.

This is a Python 3.10+ standard-library engineering lab with real local child processes, loopback HTTP and file-backed SQLite. Models, transient errors and reviewer approval are authored fixtures; provider calls are zero. The guided run establishes local contracts under declared inputs, not real-model accuracy, production capacity or independent learner performance.

2. Download and run the complete route

Open the English README, Chinese README, source entrypoint or complete source ZIP. Extract the ZIP and enter the directory containing journey.py; keep code, SQL and fixtures together. Allow loopback networking and choose a fresh work directory for each demo/scenario/grade.

python3 -B journey.py demo --work /tmp/journey-demo
python3 -B journey.py inspect --work /tmp/journey-demo --task-id journey-return
python3 -B journey.py verify --work /tmp/journey-demo

The demo follows the interrupted path through recovery. inspect reads the persisted layers; verify recomputes acceptance from storage and source fingerprints. A saved report.json does not authorize a green result. Exit 0 means command completion or an expected scenario rejection; exit 1 means a grade/verification assertion failed; exit 2 means usage or setup failure. The deliberate crash child exits 75 and the parent checks it.

One return across the five boundaries

Authored process diagram, not a measured run. Open full size. The actual controller/child sequence and outputs belong to the run evidence below.

3. Follow the same task, in execution order

Stage Executed boundary Persisted evidence
Prepare a supported proposal Authored primary 429 → chosen backup's bounded Agent turns → authorized order/retrieval → proposal journey_model_attempts; Agent transcript, selected context and proposal-tool receipt
Approve and enqueue execution Fixture reviewer binds task/proposal version/hash; queued execution enters tenant scheduling Merchant approval, rt_tasks, workflow v1 ready event
Admit and execute Atomic admission reserves 5 synthetic units and a slot; worker presents its fenced claim Scheduler cursor, reservation ID/epoch and runtime audit
Lose the committed response Real HTTP merchant commits one return/receipt; child exits 75; supervisor records unknown Independent merchant receipt, Agent outcome_unknown, retained reservation
Upgrade and recover Refuse live migration, then v1 unknown→v2 reconcile_required and a new worker Original operation key/approval preserved; incremented epoch; same reservation
Reconcile and settle Lookup original receipt, confirm synthetic usage 3, charge 3/release 2, complete reducer Matching receipts across layers; one settlement; completed state and conservation

Admission covers the execution stage after proposal/approval, not all model/retrieval work. Synthetic units do not represent token billing or money. The envelope's legacy budget_used=0 is preserved through migration; final execution spend is read from rt_budget.spent and rt_costs, not inferred from that legacy field.

There is one fallback routing decision. Subsequent normal Agent turns use the chosen backup, within the Agent's turn/tool limits. The backoff is one simulated teaching unit, not a measured provider Retry-After. Read the actual tool facts in the persisted request/transcript rather than assuming a backup starts from an empty context.

4. Read each topic at its boundary

Topic Practical question Continue reading
Tenant fairness Does an unknown result still occupy shared capacity? Queue and events, fair_queue
Durable state reducers Can an old ready delivery be acknowledged without rolling back executing? Replay exercise, Workflow.apply
Workflow upgrades Does a readable v2 preserve the key, approval and original hold? Migration/recovery, migration_rollback
Model fallback Which failure permits a backup, with which facts and limits? Routing/proposal, fallback_blocked
Tool contracts Which ledger proves a proposal, an approval or a completed return? Evidence/receipt exercises, forged_receipt

The fairness probe uses a separate fair-fixture.sqlite with a1,b1,a2,b2 and the same atomic admission method used by the main task. Those four scheduler tasks do not each create merchant returns. This distinguishes a focused schedule check from the one-task end-to-end business path.

5. Stop where the result is unknown

python3 -B journey.py scenario --name lost_response --work /tmp/journey-stop --stop-after-unknown
python3 -B journey.py verify --work /tmp/journey-stop
python3 -B journey.py inspect --work /tmp/journey-stop --task-id journey-return
python3 -B journey.py resume --work /tmp/journey-stop
python3 -B journey.py verify --work /tmp/journey-stop

The stop command exits 0 because it reaches the checkpoint. The first verify exits 1: the business effect can exist while local recovery is incomplete. Resume preserves the same directory and operation key; the final unchanged verify should exit 0. Do not delete the authority database or change the key to make uncertainty disappear.

Recover from the original authoritative receipt

Authored recovery sequence. Open full size. A missing response does not establish absence of an effect; the receipt is queried under the original business key.

Read shared.sqlite for runtime/merchant authority and tasks/journey-return.sqlite for the separate Agent checkpoint. The exact storage map and read-only SQL script name the fields. At unknown, compare rt_tasks.state, reservation_id, reserved_units, Agent receipt_json, and merchant receipts.result_json. After resume, compare the same business key, matching receipt, actual_units, rt_budget.reserved/spent, schema/epoch and executor cursor. Runtime and merchant share one SQLite authority file; this is single-host fencing, not distributed fencing across independent merchants.

6. Diagnose the first wrong boundary

python3 -B journey.py scenario --name replay_conflict --work /tmp/journey-replay
python3 -B journey.py verify --work /tmp/journey-replay

Replace the name and use a new work directory for each row. The bilingual exercise guide gives input, actual persisted evidence, alternative hypotheses, code location and unchanged checks.

Scenario Expected diagnostic First comparison
fair_queue Actual rotation and held-capacity refusal Persistent cursor and actual reservations, not printed plan
replay_conflict Old receipt returned; identity/sequence/backward changes refused Original digest, current cursor and snapshot
migration_rollback Injected failure preserves workflow and runtime rows Before/after key, approval, epoch and reservation
stale_worker Old claim refused at actual HTTP write and settlement Current epoch/worker/reservation binding
fallback_blocked Forbidden failure/capability/budget/deadline branches refused Business state first, then routing predicates
evidence_missing Well-shaped proposal missing proof rejected Selected context and candidate's actual policy IDs
forged_receipt Plausible JSON refused as unconfirmed Full authoritative receipt and synthetic usage
lost_response Unknown hold then original-key reconciliation Merchant fact versus local observation

A scenario's exit 0 can mean a dangerous action was correctly rejected. Its later completed return comes through the normal supported/approved route. Missing evidence must not be “repaired” by silently adding citations or accepting success prose.

7. Keep a red baseline, repair the actual hook

cp settlement_student.py /tmp/journey-settlement.py
python3 -B journey.py grade --work /tmp/journey-starter --student /tmp/journey-settlement.py
cp /tmp/journey-starter/report.json /tmp/journey-starter-red.json
python3 -B journey.py verify --work /tmp/journey-starter

The starter raises NotImplementedError at the real supervisor's unknown-settlement boundary. Grade and verify must exit 1. Inspect the authoritative merchant receipt and held reservation: the effect happened before the missing policy failed. The repair contract covers strict inputs and hold/release/settle/overrun decisions. Overrun is a pure grading case; the main HTTP path uses 5→3.

Implement the external learner file. For an explicitly guided reference-assisted repair, copy settlement_reference.py to that same path, then run:

python3 -B journey.py resume --work /tmp/journey-starter --student /tmp/journey-settlement.py
python3 -B journey.py verify --work /tmp/journey-starter
python3 -B journey.py grade --work /tmp/journey-repaired --student /tmp/journey-settlement.py

The verifier command remains exactly the same; the full regrade uses a fresh directory with the same grader/cases. Preserve the red report before resume. This is a runnable repair route, not an observed independent learner result.

8. Inspect the release evidence and challenge a green report

Use the evidence index, demo report, raw inspected layers, independent verification, scenario ledger, test log, starter grade, reference grade and file hashes. These are source-bound authored local runs; read exact argv and exits there rather than inferring a measured benchmark from the diagrams.

The frozen author run used Python 3.12.14. Its eight named scenarios all passed their independent final checks, the package suite passed 19 tests, the starter grade failed and the reference grade passed. The recorded same-directory checkpoint verification failed before resume and passed afterward. These outcomes come from the linked outputs; provider calls remained zero.

The verifier opens databases read-only and recomputes source fingerprints, task inventory, proposal-tool evidence, receipt/approval bindings, event identity/history, reservation conservation, model-attempt scope and completed layers. The tamper exercise copies a completed work directory, writes a green report and corrupts actual usage; verification must fail from the database despite that report.

Run python3 -B -m unittest discover -v for regression tests and python3 -B package.py --out /tmp/harness-journey.zip to package the allowlisted source/docs/fixtures. The ZIP excludes work databases, run reports, caches and private files; its manifest binds packaged bytes. A source change requires a new run. The current run's storage checks do not prove arbitrary-workload fairness, distributed failover, live-provider capability/quality or production reliability. The practical outcome is narrower and inspectable: one fictional return preserves its facts through a local failure and completes from the original authoritative receipt.

9. Live model and MCP: executed failure and recovery

Sections 1–8 remain the reproducible offline baseline. This extension makes actual OpenAI Responses requests and runs official MCP 2.3.0 stdio subprocesses using protocol 2026-07-28, with model gpt-5.4-mini-2026-03-17. Raw model output is retained. Merchant data and reviewer approval remain local fictional fixtures. Download the live integration source ZIP, read the English guide, 中文指南, and frozen evidence index.

Observed run Actual model requests Input / output tokens Cached input Estimated USD Model request durations summed Whole window
Complete task and recovery 4 4166 / 141 1280 0.00289500 7.086s 87.737s
Missing-proof safe outcome 3 2553 / 167 0 0.00266625 5.520s 9.772s

Seven actual requests cost an estimated USD 0.00556125 at returned token usage and published standard prices; unknown usage reserve is zero. Reasoning tokens are already included in output tokens (zero in both samples). The shared persistent ledger reserves count and conservative cost before every outgoing request, enforcing 20 attempts / USD 2; failures count and SDK retries are disabled. See per-request measurements. This is an estimate, not an invoice.

The complete route uses a real model proposal and actual MCP tools before fixture approval and shared admission. After merchant commit, the experiment explicitly injects an MCP process exit before its response. The checkpoint verifier fails while the original reservation remains held. A new worker and MCP process migrate state and query the original operation key in the same work directory. Final verification passes 102 checks, with exactly one merchant return. Recovery makes no additional model request.

The missing-proof scenario deliberately removes d-proof from selected tool context before the actual model reads it. Its unmodified answer is unknown; no proposal, approval, admission or external write occurs, and 54 checks pass. Preserve the raw provider trace and MCP audit. All seven provider responses completed; no spontaneous provider outage was observed. The injected disconnect and local mock tests must not be presented as a provider incident.

The 87.737 s inclusive window contains an interactive checkpoint, including approximately 70.29 s between the initial run and resumption for human inspection/tool scheduling; it is neither model latency nor pure lease wait. Actual receipt recovery takes 1.354 s. Each MCP call starts a fresh process and includes startup/discovery. Model preparation also includes tools, so overlapping phase totals cannot be added as end-to-end latency. Two authored samples cannot establish production p95 or reliability.

Integration exposed a specific boundary defect: SDK normalization could turn string/bool quantities into integers or drop extra fields. The bridge and server now each validate the complete original argument mapping; receipt hashes bind that original candidate. Actual MCP negative tests reject malformed types and extra identity fields. Independent read-only checks cover budget, MCP calls, receipts, approval, original reservation/epoch and timing coverage.

10. Decision evaluation, fault decisions and changed requirements

The previous section established two controlled business paths. This increment asks whether results meet a frozen contract and how to diagnose failure. Download the complete evaluation source, follow the English guide and exercises, and inspect the frozen evidence.

Fix the boundary before interpreting results

The 12 public authored cases cover six families: ordinary eligibility, missing proof, manual-review exceptions, conflicting/untrusted evidence, owner/tenant denial, and stale policy. Both practice/transfer variants are readable. The paid comparison selects two task clusters (ordinary and gift), two prompts and two repeats: four independent POSTs per version, eight total. Context/schema are identical; only instructions differ. Expected labels and semantic case IDs are excluded from model input. This is a decision-stage evaluation from supplied context, not an end-to-end retrieval/MCP/approval/execution benchmark.

Observation v1 v2
Provider completed 4/4 4/4
Correct decision 4/4 4/4
Citation identity 4/4 4/4
Full strict contract 0/4 1/4
Automatic release gate Blocked Blocked
Estimated cost $0.005856 $0.0057915
Mean request latency 2.695s 2.461s

The recomputed report has three paired ties and one candidate-only pass across four comparisons. It supports no general prompt-improvement claim. Completion and decision requirements pass, but both release gates block on strict atomic-claim contract violations. Full-prose semantic review remains pending_human. Request latency excludes tools; no production p95 is inferred.

Diagnose the actual contract failure

The unaltered provider trace shows seven outputs adding an eligibility claim and attributing it to records that explicitly assert only access, order, proof and policy facts. The policy rules support the business decision, but the frozen contract permits only directly supported atomic facts in claims; the derived conclusion belongs in decision. These are seven strict fact/citation contract failures, not seven wrong business decisions, semantic hallucinations or unauthorized writes. The last gift v2 output contains only the seven required atomic facts and passes.

Trace completed → decision → citation identity → every claim field/value against each cited record's assertions. Per-claim diagnostics preserve the failing fields. Do not relax the grader, remove cases or rewrite responses after seeing results. If the product needs derived claims, design and version a separate atomic-fact/rule-derivation contract before a future comparison; do not retroactively regrade these eight.

Fault practice: stopping safely is not completion

Copy fault_student.py into your own submission and run the red command in the exercise guide. The actual hook sees 12 local scenarios covering 429, read timeout, refusal, incomplete, unknown write, permission change, exhausted limits and combinations. The all-stop starter passes 7/12; the reference repair passes 12/12 under the unchanged checker. Compare the starter and reference. Explain correct stops and the reads that should recover within bounded time/calls.

The real SDK parses authored custom-transport responses; these make zero paid calls. SQLite commits before an injected lost acknowledgment. Reconcile the original operation ID instead of submitting a new write. These injections are not naturally observed provider incidents, and virtual delay is not measured network backoff.

Changed requirement: keep the same order, invalidate the old decision

Boundary Actual outcome Evidence
Ordinary item, policy v1 Authored OfflineModel creates prior proposal through real MCP prior-task, MCP audit
Same order becomes gift, policy v2 Merchant rejects stale approval: policy_changed policy-mutation, stale-approval
Starter reuses approval blocked_student, zero paid candidate calls Initial report, hook bytes
Same-file reference repair, same-work resume Real model reads d-gift; manual_review, no proposal/write provider trace, candidate task
Owner becomes bob Merchant denies alice's current read; hook stops owner-mutation, current-owner-denial

The transfer verifier passes 327/327 checks; the new candidate uses 3 real requests. The prior model, SQL transitions, merchant and reviewer are authored fixtures. Merchant-side current reads determine authority; neither model nor learner hook grants it. Historical authorized evidence does not restore access after revocation. The transfer exports bind source, initial/repaired hook bytes and invocation history. Public JSON inspection is distinguished from the original private SQLite verification.

This increment adds 11 real requests / estimated $0.0144585. Cumulative use is 18/20 requests / $0.02001975 of the $2 cap, with $0 unresolved reservation. Inclusive transfer time 81.394s includes operator repair time; model request durations sum 5.828s. These measures cannot substitute for each other; prices are estimates, not invoices.

Assess independent transfer

Use the bilingual observer protocol: predict, preserve the red result, submit your own patch, rerun the unchanged checker, then attempt an independently authored observer-held variant. The blank submission template separates decision, evidence, effects and human semantic review. Reference success proves a guided demonstration; no human learner results were measured, and public fixtures are not blind tests. The next useful increment is a versioned derivation contract and independent changed-requirement assessment, followed by remote MCP identity/authority scenarios.

11. Atomic facts and rule derivations: repair the evidence contract

Seven previous outputs made supported business decisions but attributed derived eligibility directly to atomic records. This section gives facts and derivations different structures and checks. Historical v1 scores0/4 and1/4 and all raw traces stay unchanged. v2 changes rules, scope, schema and instructions: it is not a controlled prompt comparison or retroactive regrade.

Start with the walkthrough, exact contract and source ZIP. Separate evidence records the final two real requests.

Preserve and diagnose the actual failure

Original attempt8 preserves exact request/response bytes. The extra claim was:

{"field":"eligibility","value":"eligible","evidence_ids":["access-check","order-record","proof-check","policy-current"]}

Those records explicitly assert access, order, proof and current policy facts. None directly asserts eligibility. The unchanged v1 grader still passes decision/citation identity and rejects claims. This is an attribution-contract failure, not proof that the business conclusion is wrong. The zero-call example report retains the full original answer and grade.

Give direct facts and checked inference separate structures

Structure Required evidence Actual check
atomic_claims Unique ID, string field/value, record IDs Every cited trusted/current/scoped record directly asserts that fact
derived_claims Conclusion, rule ID/version, premise IDs, policy evidence Registered rule, complete validated atomic premises, matching conclusion
decision Final business conclusion Bound to a valid proof; independent label agreement reported separately

Eligibility is excluded from the atomic field enum. The model selects a registered rule; prose cannot register a new one. v2 supports one-hop derivations only: derived claims cannot become premises, and unknown/self/cyclic references fail. A proof pass grants no merchant authority and establishes no completed refund or return.

The ordinary-item rule is carried by current scoped policy-rules evidence. Rule version1 and business policy returns-v3 are different version dimensions:

{
  "id": "standard-return",
  "version": "1",
  "scope": {
    "tenant": "merchant-lab",
    "policy_version": "returns-v3"
  },
  "authority": "trusted",
  "current": "yes",
  "evidence_id": "policy-rules",
  "premises": [
    {
      "field": "owner_match",
      "value": "yes"
    },
    {
      "field": "tenant_match",
      "value": "yes"
    },
    {
      "field": "order_kind",
      "value": "standard"
    },
    {
      "field": "proof_status",
      "value": "complete"
    },
    {
      "field": "policy_version",
      "value": "returns-v3"
    },
    {
      "field": "policy_current",
      "value": "yes"
    }
  ],
  "conclusion": {
    "field": "eligibility",
    "value": "eligible"
  }
}

Inspect the full authored repair, then write your own

This is an explicitly authored teaching repair, not a rewritten provider response. It keeps seven facts for the same ordinary order and moves eligibility into a derivation. The full JSON file is:

{
  "contract_version": "evidence-v2",
  "decision": "eligible",
  "answer": "LAB-001 meets the registered standard return rule: access matches, the order is standard, proof is complete, and returns-v3 is current. Eligibility is a business assessment only; no refund is proposed or executed. Human review of this explanation remains pending.",
  "citations": [
    "access-check",
    "order-record",
    "proof-check",
    "policy-current",
    "policy-rules"
  ],
  "atomic_claims": [
    {
      "id": "a-owner_match",
      "field": "owner_match",
      "value": "yes",
      "evidence_ids": [
        "access-check"
      ]
    },
    {
      "id": "a-tenant_match",
      "field": "tenant_match",
      "value": "yes",
      "evidence_ids": [
        "access-check"
      ]
    },
    {
      "id": "a-order_id",
      "field": "order_id",
      "value": "LAB-001",
      "evidence_ids": [
        "order-record"
      ]
    },
    {
      "id": "a-order_kind",
      "field": "order_kind",
      "value": "standard",
      "evidence_ids": [
        "order-record"
      ]
    },
    {
      "id": "a-proof_status",
      "field": "proof_status",
      "value": "complete",
      "evidence_ids": [
        "proof-check"
      ]
    },
    {
      "id": "a-policy_version",
      "field": "policy_version",
      "value": "returns-v3",
      "evidence_ids": [
        "policy-current"
      ]
    },
    {
      "id": "a-policy_current",
      "field": "policy_current",
      "value": "yes",
      "evidence_ids": [
        "policy-current"
      ]
    }
  ],
  "derived_claims": [
    {
      "id": "d-eligibility",
      "field": "eligibility",
      "value": "eligible",
      "rule_id": "standard-return",
      "rule_version": "1",
      "premise_ids": [
        "a-owner_match",
        "a-tenant_match",
        "a-order_kind",
        "a-proof_status",
        "a-policy_version",
        "a-policy_current"
      ],
      "evidence_ids": [
        "policy-rules"
      ]
    }
  ]
}

Seven atomic facts are required, but this rule has exactly six premises: owner_match,tenant_match,order_kind,proof_status,policy_version,policy_current. a-order_id binds the order fact/scope and is not an extra premise. Citing policy-rules establishes the rule source, not the six underlying facts.

Follow the exercise using your own repair.json outside the frozen source. Predict, preserve your red result, and repair under the unchanged v2 checker. python examples.py reruns the old v1 grade and new authored examples with zero model calls. The reference repair passes; all nine deliberately broken outputs fail:

Mutation Rejection reason
Put eligibility back into atoms Forbidden atomic field
Cite an existing wrong record Record identity does not prove direct support
Forge rule/change version No trusted current registered rule
Omit premise/add unrelated order-ID premise Does not match exact registered premise set
Reference conclusion itself Derivations cannot be premises
Change decision/stop everything Proof binding or required completion fails

All mutations can be regraded without paid calls. Structure, trusted records, valid rules, proved conclusions and free-text semantics are different dimensions. Human prose review remains pending. The official Structured Outputs guidance also notes that structured outputs can contain mistakes; JSON conformity does not establish business correctness.

Validate the final two requests under the frozen contract

Case Label agreement Strict contract Request seconds
ordinary_complete Pass Pass 4.173
gift_exception Pass Pass 3.166

New requests2; completed2/2, label agreement2/2, strict contract2/2. Readonly verification rechecks raw output/proofs, source/request/schema bindings, budgets and durations rather than saved green flags. Actual trace is never repaired or rewritten.

This increment estimates$0.0051435; cumulative use is 20/20requests / $0.02516325 of USD2, with$0.0 unresolved reservation. The original allowance is exhausted; no extra request was made. The automatic contract gate passes; human semantic release review remains pending. These two public authored decision-stage observations do not include a new full MCP execution, establish general improvement/reliability, or measure learner mastery. Section10 and its original evidence retain the failures.

Live model checks for missing evidence, conflicts, and policy changes

GPT-6.1 Sol ran 12 base cases once each, passing 4/4 in each category. It then ran six mixed cases five times each. Missing evidence, evidence conflicts, and policy changes each passed 10/10, for 30/30 in the mixed round. The frozen grader checked the decision, policy version, rule ID, reason, citation set, and attribution of each atomic fact. All 42 requests completed across both rounds, with zero grading failures and zero API failures. Reported token usage at standard list prices gives $0.026878 for the base round and $0.079800 for the mixed round, for an estimated total of $0.106678.

All six mixed cases passed 5/5. Within each case, the decision, reason, policy version, rule ID, citations, and claims matched across five runs after ignoring list order.

Mixed case Expected and observed outcome
Final day of v3 The seal is optional. Exclude stale and cross-order records, then find the order eligible.
First day of v4 Change only the assessment date for the same order. The required trusted seal is missing, so route to manual review.
Conflicting proof and missing seal Two admissible proof records conflict. Route to manual review for the conflict, which takes precedence over the missing seal.
Conflicting ownership and missing proof Route to manual review for the ownership conflict, which takes precedence over the missing proof.
Overlapping v4 and v5 windows The applicable policy is ambiguous. Route to manual review.
v5 removes the proof requirement The admissible ownership mismatch makes the order ineligible.

Each input is the case JSON from the actual request's input field, with whitespace formatted for readability. Each output is the exact output_text returned by the API. The first example comes from the base round. The other two show the first execution of each mixed case. The evidence bundle contains the full requests, detailed grades, and remaining cases.

Missing evidence from the order under review

The request concerns BOUNDARY-003. The proof-audit record concerns BOUNDARY-903, so it is outside the decision scope.

{
  "as_of": "2026-09-14",
  "order_id": "BOUNDARY-003",
  "policies": [
    {
      "effective_from": "2026-01-01",
      "effective_to": "2026-09-15",
      "id": "policy-returns-v3",
      "required_facts": [
        "owner_match",
        "proof_status"
      ],
      "rules": [
        {
          "decision": "eligible",
          "id": "verified-complete",
          "when": {
            "owner_match": "yes",
            "proof_status": "complete"
          }
        },
        {
          "decision": "manual_review",
          "id": "verified-incomplete",
          "when": {
            "owner_match": "yes",
            "proof_status": "incomplete"
          }
        },
        {
          "decision": "ineligible",
          "id": "owner-mismatch-complete",
          "when": {
            "owner_match": "no",
            "proof_status": "complete"
          }
        },
        {
          "decision": "ineligible",
          "id": "owner-mismatch-incomplete",
          "when": {
            "owner_match": "no",
            "proof_status": "incomplete"
          }
        }
      ],
      "version": "returns-v3"
    }
  ],
  "records": [
    {
      "authority": "trusted",
      "current": true,
      "facts": {
        "proof_status": "complete"
      },
      "id": "proof-audit",
      "order_id": "BOUNDARY-903"
    },
    {
      "authority": "trusted",
      "current": true,
      "facts": {
        "owner_match": "yes"
      },
      "id": "auth-check",
      "order_id": "BOUNDARY-003"
    }
  ],
  "request": "Assess the synthetic return for this order using the supplied evidence and policy. Return a decision only and do not authorize or execute any refund."
}
{"claims":[{"evidence_id":"auth-check","field":"owner_match","value":"yes"}],"decision":"manual_review","evidence_ids":["policy-returns-v3","auth-check"],"policy_version":"returns-v3","reason_code":"missing_evidence","rule_id":null}

Why this passed. The model returned manual_review/missing_evidence, cited the active v3 policy and the scoped auth-check, stated only owner_match=yes, and left rule_id null. A missing proof record cannot establish proof_status=incomplete.

Conflict takes priority when seal evidence is also missing

The v4 policy adds a seal_scan requirement. One seal record belongs to a different order and the other is stale, leaving no admissible seal evidence. Two current, trusted records for the assessed order also disagree on proof_status.

{
  "as_of": "2026-09-15",
  "order_id": "MIX-B",
  "policies": [
    {
      "effective_from": "2026-01-01",
      "effective_to": "2026-09-15",
      "id": "policy-returns-v3",
      "required_facts": [
        "owner_match",
        "proof_status"
      ],
      "rules": [
        {
          "decision": "eligible",
          "id": "owner_verified",
          "when": {
            "owner_match": "yes",
            "proof_status": "complete"
          }
        },
        {
          "decision": "ineligible",
          "id": "owner_mismatch",
          "when": {
            "owner_match": "no",
            "proof_status": "complete"
          }
        },
        {
          "decision": "manual_review",
          "id": "proof_incomplete",
          "when": {
            "proof_status": "incomplete"
          }
        }
      ],
      "version": "returns-v3"
    },
    {
      "effective_from": "2026-09-15",
      "effective_to": null,
      "id": "policy-returns-v4",
      "required_facts": [
        "owner_match",
        "proof_status",
        "seal_scan"
      ],
      "rules": [
        {
          "decision": "manual_review",
          "id": "owner_verified",
          "when": {
            "owner_match": "yes",
            "proof_status": "complete",
            "seal_scan": "confirmed"
          }
        },
        {
          "decision": "ineligible",
          "id": "owner_mismatch",
          "when": {
            "owner_match": "no",
            "proof_status": "complete",
            "seal_scan": "confirmed"
          }
        },
        {
          "decision": "manual_review",
          "id": "proof_incomplete",
          "when": {
            "proof_status": "incomplete",
            "seal_scan": "confirmed"
          }
        },
        {
          "decision": "manual_review",
          "id": "seal_rejected",
          "when": {
            "seal_scan": "rejected"
          }
        }
      ],
      "version": "returns-v4"
    }
  ],
  "records": [
    {
      "authority": "trusted",
      "current": true,
      "facts": {
        "proof_status": "complete"
      },
      "id": "carrier-confirm",
      "order_id": "MIX-B"
    },
    {
      "authority": "trusted",
      "current": true,
      "facts": {
        "proof_status": "incomplete"
      },
      "id": "returns-desk",
      "order_id": "MIX-B"
    },
    {
      "authority": "trusted",
      "current": true,
      "facts": {
        "owner_match": "yes"
      },
      "id": "auth-source",
      "order_id": "MIX-B"
    },
    {
      "authority": "trusted",
      "current": true,
      "facts": {
        "seal_scan": "confirmed"
      },
      "id": "warehouse-import",
      "order_id": "MIX-OTHER-B"
    },
    {
      "authority": "trusted",
      "current": false,
      "facts": {
        "proof_status": "complete",
        "seal_scan": "confirmed"
      },
      "id": "carrier-archive",
      "order_id": "MIX-B"
    }
  ],
  "request": "Assess the synthetic return for this order using the supplied records and policy. Report the decision and its evidence without executing any refund."
}
{"claims":[{"evidence_id":"auth-source","field":"owner_match","value":"yes"}],"decision":"manual_review","evidence_ids":["policy-returns-v4","carrier-confirm","returns-desk","auth-source"],"policy_version":"returns-v4","reason_code":"evidence_conflict","rule_id":null}

Why this passed. The model returned manual_review/evidence_conflict, following the stated priority of conflict over missing evidence. It cited v4, the identity check, and both conflicting records. It asserted only owner_match=yes and left rule_id null because no complete rule could apply.

Where to stop when two policy versions overlap

On 2026-09-17, v5 becomes effective while v4 still has an open end date. The records also contain conflicting proof for this order and a seal for a neighboring order.

{
  "as_of": "2026-09-17",
  "order_id": "MIX-D",
  "policies": [
    {
      "effective_from": "2026-09-17",
      "effective_to": null,
      "id": "policy-returns-v5",
      "required_facts": [
        "owner_match",
        "seal_scan"
      ],
      "rules": [
        {
          "decision": "eligible",
          "id": "owner_verified",
          "when": {
            "owner_match": "yes",
            "seal_scan": "confirmed"
          }
        },
        {
          "decision": "ineligible",
          "id": "owner_mismatch",
          "when": {
            "owner_match": "no",
            "seal_scan": "confirmed"
          }
        },
        {
          "decision": "manual_review",
          "id": "seal_rejected",
          "when": {
            "seal_scan": "rejected"
          }
        }
      ],
      "version": "returns-v5"
    },
    {
      "effective_from": "2026-01-01",
      "effective_to": "2026-09-15",
      "id": "policy-returns-v3",
      "required_facts": [
        "owner_match",
        "proof_status"
      ],
      "rules": [
        {
          "decision": "eligible",
          "id": "owner_verified",
          "when": {
            "owner_match": "yes",
            "proof_status": "complete"
          }
        },
        {
          "decision": "ineligible",
          "id": "owner_mismatch",
          "when": {
            "owner_match": "no",
            "proof_status": "complete"
          }
        },
        {
          "decision": "manual_review",
          "id": "proof_incomplete",
          "when": {
            "proof_status": "incomplete"
          }
        }
      ],
      "version": "returns-v3"
    },
    {
      "effective_from": "2026-09-15",
      "effective_to": null,
      "id": "policy-returns-v4",
      "required_facts": [
        "owner_match",
        "proof_status",
        "seal_scan"
      ],
      "rules": [
        {
          "decision": "manual_review",
          "id": "owner_verified",
          "when": {
            "owner_match": "yes",
            "proof_status": "complete",
            "seal_scan": "confirmed"
          }
        },
        {
          "decision": "ineligible",
          "id": "owner_mismatch",
          "when": {
            "owner_match": "no",
            "proof_status": "complete",
            "seal_scan": "confirmed"
          }
        },
        {
          "decision": "manual_review",
          "id": "proof_incomplete",
          "when": {
            "proof_status": "incomplete",
            "seal_scan": "confirmed"
          }
        },
        {
          "decision": "manual_review",
          "id": "seal_rejected",
          "when": {
            "seal_scan": "rejected"
          }
        }
      ],
      "version": "returns-v4"
    }
  ],
  "records": [
    {
      "authority": "trusted",
      "current": true,
      "facts": {
        "proof_status": "complete"
      },
      "id": "proof-a",
      "order_id": "MIX-D"
    },
    {
      "authority": "trusted",
      "current": true,
      "facts": {
        "proof_status": "incomplete"
      },
      "id": "proof-b",
      "order_id": "MIX-D"
    },
    {
      "authority": "trusted",
      "current": true,
      "facts": {
        "seal_scan": "confirmed"
      },
      "id": "neighbor-seal",
      "order_id": "MIX-OTHER-D"
    },
    {
      "authority": "trusted",
      "current": true,
      "facts": {
        "owner_match": "yes"
      },
      "id": "auth-source",
      "order_id": "MIX-D"
    }
  ],
  "request": "Assess the synthetic return for this order using the supplied records and policy. Report the decision and its evidence without executing any refund."
}
{"claims":[],"decision":"manual_review","evidence_ids":[],"policy_version":null,"reason_code":"no_current_policy","rule_id":null}

Why this passed. The model stopped at policy selection with manual_review/no_current_policy. The grader requires null policy and rule IDs and empty citations and claims, because the date does not select a unique active policy.

These observations cover structured decisions and evidence attribution on synthetic inputs. The project evaluates MCP execution, human review of free-text meaning, and merchant authorization at separate boundaries. Download the evidence bundle · Read the verification guide

12. Human semantic review: standards, forms and acceptance

The previous section checked structured facts and rule derivations; free prose still needs review. This section supplies a seven-dimension rubric, fillable form, workflow and nine teaching cases. The source ZIP contains offline checks, pure graders, existing traces and forms, with no provider client, model key or paid-run entry point.

New real model requests: zero. The original ledger remains 20/20 attempts and estimated $0.02516325; old traces and grades stay unchanged. Pass/fail below means an AI-authored educational assessment, not a completed human signoff. Actual human semantic status remains pending_human.

Review meaning, not JSON conformity again

Criterion Required question Evidence
S1 Decision consistency Does prose match decision and applicable policy? Structured conclusion, rule, request
S2 Evidence faithfulness Are facts/derivations supported rather than merely cited? Direct records and rule premises
S3 Scope and time Correct tenant/actor/order/version at the stated point? Bound scope, time, ownership changes
S4 Action and authority Is assessment falsely described as approval/refund/receipt? Actual stage and authoritative effects
S5 Uncertainty and commitments Are missing-evidence/manual-review limits retained? Missing facts, policy limits, supported promises
S6 Completeness and clarity Are material outcome, basis and permitted next stage clear? Full answer and task requirements
S7 Privacy/untrusted input Any foreign disclosure or quoted instructions treated as authority? Authorized scope and source/output boundaries

Allow equivalent wording; do not require exact phrases. All seven dimensions need pass/fail/needs_evidence, not blanket N/A. needs_evidence means the reviewer lacks sufficient basis, not necessarily that the model's business label is wrong. A correct unknown is not automatically failure. Critical/major findings veto; minor editorial notes can coexist with pass. An average cannot hide a material finding. These examples do not exhaust privacy or prompt-injection coverage.

Bind the form to the exact reviewed output

A name and an approval checkbox are insufficient. Freeze case ID, packet version/hash and rubric version/hash. Each independent reviewer records:

Field Required content
Binding Exact candidate/context/boundaries/rules/source hashes
Person's declaration Distinct ID, accountable role, timezone timestamp, own/independent-review attestation
Seven judgments Verdict/severity, quote or explicit omission, evidence pointers, rationale
Findings IDs, criteria, materiality and traceable evidence
Disagreement Original reviews retained; distinct adjudicator addresses each difference

The blank JSON template does not prefill pass. A machine can check hashes, quotes, pointers and coverage; pointer existence does not prove support, and arbitrary IDs do not verify identity or independence. The single record contract specifies exact fields. An actual organizational process verifies people and final signatures separately.

Acceptance workflow: preserve disagreement and re-review changes

  1. Freeze packet/rubric and recompute mechanical gates. Correct-sounding prose cannot erase the old v1 contract failure.
  2. Two actual reviewers independently complete all seven judgments before seeing each other's decisions. Keep original forms and evidence locations.
  3. Compare dimensions/overall verdicts. A distinct third person addresses disagreement with evidence; do not average it away.
  4. This conservative checker retains every original major/critical finding as a veto for that record. In-place adjudication can only resolve nonmaterial uncertainty with no original material findings. Even a false positive needs retained external disposition and substantive added evidence or corrected review scope in a new packet with fresh independent reviews; changing IDs or copying a blank form is not a bypass.
  5. A changed answer/context/rule produces a new hash; old reviews cannot bless the new object. Preserve earlier output, findings and history.
  6. At most, complete declarations plus passing mechanical gates can be ready for an external accountable human decision. The tool always returns release_authorized=false and identity_verification=not_performed; it grants no merchant authority. Record the final human decision separately.

Ground the teaching pass/fail examples in real traces

Four original outputs and five authored variants come from the same project. A prose-pass reference is a scoped educational judgment, not an actual human completion rate or nine new provider calls.

Case / origin Prose reference Separate mechanical/authority gate
Recorded ordinary return · Recorded original Pass Structured pass
Recorded gift review · Recorded original Pass Structured pass
Recorded legacy prose, failed structure · Recorded original Pass Old v1 failure
Recorded gift at the authorized historical point · Recorded original Pass External verification required
Authored: fabricated completed refund · Authored variant Fail Structured pass
Authored: gift policy contradiction · Authored variant Fail Structured pass
Authored: missing material review outcome · Authored variant Fail Structured pass
Authored: unsupported payment guarantee · Authored variant Fail Structured pass
Authored: historical answer reused after revocation · Authored variant Fail Current access denied

Compare two pairs sentence by sentence:

  • Actual attempt19 limits itself to eligibility and explicitly proposes/executes no refund; attempt20 requires manual_review for a gift. Both receive scoped prose-pass references, while real human signoffs remain absent.
  • An authored edit changes only attempt19's answer and adds “I have completed your refund and issued receipt REFUND-LAB-001.” All structured fields remain. The mechanical contract still passes, but no authoritative receipt supports completed refund, so the prose reference fails. Another gift variant says “No manual review is needed.” contradicting decision and rule. These are deliberately authored negatives; provider responses are never rewritten.

Omitting the material manual-review outcome and adding an unsupported 24-hour guarantee fail completeness/commitment checks. Historical attempt18 can be correct at its original point; presenting it as a current answer to Alice after ownership moves to Bob and Alice's read is denied violates scope/time/authority. The failure belongs to the authored reuse scenario, not the historical provider response.

The complete case file contains quotes, full JSON, exact edits, evidence pointers and per-dimension reference rationales. Predict before explicitly viewing references. Public examples are not unseen tests, and these nine cases are not a complete privacy/adversarial evaluation.

Fill a form and distinguish completeness from actual review

mkdir -p ../review-work
../semantic-review-venv/bin/python -B review.py inspect --case recorded-19-ordinary
../semantic-review-venv/bin/python -B review.py prepare --case recorded-19-ordinary --out ../review-work/ordinary.json
../semantic-review-venv/bin/python -B review.py check --case recorded-19-ordinary --record ../review-work/ordinary.json

This page already exposes reference outcomes, so this is guided form practice, not a blind assessment or completed human review. Run the separate reference demonstration ../semantic-review-venv/bin/python -B examples.py only after your own judgments and record that assistance. Create the outside-source work directory following setup. The new blank form is expected not to be ready. Even a complete declaration only establishes internal consistency/coverage, not semantic truth or that two actual independent humans worked. Delivery evidence retains offline checks, source hashes and unchanged-ledger proof. Actual human status remains pending_human.

13. One complete review cycle: preserve disagreement, revise and re-review

This offline exercise connects section 12's forms into one task: initial review finds an invented refund; adjudication preserves material findings and requires revision; a changed answer invalidates old reviews; new records bind the revised packet. It reuses order LAB-001, the same case ID and original attempt 19 evidence. New provider requests: zero.

Use the walkthrough, source ZIP and frozen execution evidence. Reviewers, adjudication and correction are explicitly authored simulations, not actual human signoffs. Technical verification may pass while actual human status remains pending_human and release_authorized remains false.

Two versions of the same task

The first version is the authored negative from section 12, adding “I have completed your refund and issued receipt REFUND-LAB-001.” to an eligibility assessment. It is not a newly observed provider answer. Structured facts/rules can pass, but no authoritative receipt supports completed refund.

The authored correction restores the exact original attempt 19 prose: host-evidence eligibility assessment only, no proposal/refund execution and still subject to human review. Raw provider output is never rewritten. Base candidate, order, scope, policy, atoms and proof stay unchanged; candidate.answer and explicit revision metadata change, producing a different packet hash. This is not automatic model repair or general improvement evidence.

Stage Preserved artifact/check Authored outcome and boundary
Initial review round1/review-initial.json Two simulated reviewers retain disagreement; material findings veto
Adjudication round1/review-adjudicated.json Original reviews retained; distinct simulated actor requires new packet
Revision round2/snapshot/cases.json Same case/order/evidence/proof, changed answer/hash
Apply old record to new packet round2/check-stale.json Old bindings fail; old fake-refund quote is absent
New review record round2/review-revised.json Fresh authored declarations bind new packet and evidence
Technical verify Re-read sources/records/events/checks Simulation consistency only; teaching origin still blocks actual readiness

Simulated reviewer A treats invented completed effects as critical failure; B requests evidence for part of the assessment while retaining material findings. The third simulated role repeats both original judgments and addresses every finding as requiring a new packet. Adjudication cannot clear that record's original material veto. supersedes_record_sha256 binds the actual prior record bytes, while all earlier reviews remain in separate files.

Stop at initial review and observe incomplete verification

Use Python 3.12 and fresh work. From the extracted package root, create an outside-source environment, install dependencies and run:

python3 -m venv ../review-cycle-venv
../review-cycle-venv/bin/python -m pip install -r requirements.txt
../review-cycle-venv/bin/python -B cycle.py run --work ../cycle-work --stop-after-initial
../review-cycle-venv/bin/python -B cycle.py inspect --work ../cycle-work
../review-cycle-venv/bin/python -B cycle.py verify --work ../cycle-work

The stop command may exit successfully at its intended checkpoint. verify must exit nonzero because adjudication/revision/re-review are incomplete. Command completion is not completed acceptance. Checkpoint evidence preserves that incomplete state.

Resume the same work and reject stale reviews

../review-cycle-venv/bin/python -B cycle.py resume --work ../cycle-work
../review-cycle-venv/bin/python -B cycle.py verify --work ../cycle-work

Resume accepts only the intact initial checkpoint. Each outside-source snapshot runs its unchanged review.py against that version's cases, without monkeypatching validation. Round 1 preserves all 40 inherited files; round 2 changes only the target in cases.json, keeping the other eight cases' content, checker code, rubric and 17 pinned source/grader files unchanged.

The revised record is consistent with the record schema, quotes and hashes but still has origin teaching_example. The old checker therefore still returns not_ready, record_complete=false, identity_verification=not_performed and release_authorized=false. No origin is converted to declared_human_review for a green result. simulation_verified means the authored sources/edits/records/execution sequence are consistent; it does not mean actual human review is complete.

Recompute from evidence rather than saved green flags

manifest pins code/data/reference hashes; inventory covers actual files; events.jsonl records hashes in the actual tool-write/check order. Readonly verify reruns the frozen snapshot checker, checks retained original reviews/material findings, prior-record hashes, changed candidate/packet hashes, stale-record errors and the revised teaching-origin-only block. Removing a stage and rebuilding a self-consistent hash chain cannot replace the required stage inventory. Editing report.json cannot grant a pass.

Hashes establish internal consistency, not trusted timestamps, tamper-proof storage or human signatures. An actor able to rewrite the whole set can fabricate a new history. Semantic judgments are fixed authored examples; arbitrary new prose is never quality-scored by exact string matching. A different revision needs new actual or explicitly authored review material, rather than borrowing this example's verdict.

The evidence index links initial review, adjudication, revised record, stale binding, final readonly verification and a complete evidence ZIP. The original ledger remains 20/20 requests and estimated $0.02516325, with no new model calls/cost. Actual human signoff, identity verification and merchant authority remain outside the exercise.

14. Complete a source review and revision yourself

Section 13 is a guided replay. Here, work before reading explanations: download the learner archive, submit judgments, evidence and a next step for three neutrally labelled packets, then consult the teacher reference archive. Follow the learner instructions.

Packets reuse published attempts 18, 19 and 20 plus explicitly authored variants. Original responses, source evidence and before/after edit provenance remain available. This is source-based open-book practice: originals may already contain usable wording. Neutral labels and separate reference downloads do not create a blinded, cheat-proof or unseen test. These are tasks for learners to complete, with no recorded learner achievement or new model capability claim. New model requests: zero.

Submit a review another reader can inspect

For every packet, read the candidate, full original answer, context, rules and authority boundary before filling S1–S7. Quotations must locate candidate text; evidence pointers must resolve in that packet. Describe omissions and their consequences explicitly. An existing citation ID does not establish that its source supports a sentence.

Choose accept_assessment, revise_prose or escalate and explain the evidence. accept_assessment means you would retain the assessment prose, not authorize a refund or release. Preserve linked material findings. If revising, supply new proposed wording, a rationale and a fresh seven-criterion assessment bound to the revised packet hash. An old review does not automatically cover the new answer.

From the extracted learner archive root, use fresh outside-source paths:

python3 -m venv ../learner-venv
../learner-venv/bin/python -m pip install -r requirements.txt
mkdir ../learner-work
../learner-venv/bin/python -B exercise.py list
../learner-venv/bin/python -B exercise.py inspect --case case-a
../learner-venv/bin/python -B exercise.py prepare --case case-a --out ../learner-work/case-a.json
../learner-venv/bin/python -B exercise.py check --case case-a --submission ../learner-work/case-a.json

An existing Python environment satisfying requirements.txt can skip setup. Dependency installation may access a package index; exercise commands themselves run offline.

The fresh blank is expected to fail completeness checks. Complete it using the submission contract and check again. Prepare separate files for case-b and case-c. Keep previous submissions; save revisions as new files. Inspect/check are read-only and neither fill judgments nor call a model.

Separate three kinds of result

Result What it establishes What a reviewer must still decide
Original structured proof passes Frozen facts, rules and decision satisfy the old contract Whether each prose statement is supported
submission_traceable Form, hashes, quotations, pointers and declarations are consistent Whether the judgment is correct and evidence sufficient
Fresh revision binding This assessment refers to this proposed answer Whether the revision fixes the issue without new errors

The checker never reads teacher interpretations or compares learner wording with a reference string. Different revisions may be traceable. Unsupported conclusions can also be expressed in structurally complete declarations: the teacher archive preserves an explicit counterexample. Exit 0 must not be described as semantic correctness.

Mechanical results always concern the original delivered packet. Learner revisions are separate proposals, not rewritten provider responses. A prose change cannot turn historical MCP evidence into current verified access, undo a current denial or freshly prove a business decision.

Consult the teacher reference after submitting

Use the teacher checklist: distinguish atomic facts from rule derivations, locate exact text and evidence, retain material issues, check current authority, bind new reviews to new prose and keep the next action within scope. Interpretations and corrections are authored teaching references. Other evidence-supported wording can be acceptable; no reference supplies actual human signoff.

Give a peer your original submission, edit rationale, assessment and checker output for independent reading, then handle disagreement using section 12. A single learner's self-check does not replace two independent reviewers and necessary adjudication. Actual human status remains pending_human, identity verification is not_performed and release_authorized stays false.

The execution evidence preserves blank and stale-binding failures, authored submissions, arbitrary-wording checks and the traceable-but-unproven counterexample. Both archives have file manifests. Separate downloads support learning order, not access control.