Handbook
201-05 — Verification and repair
A workflow sketch: run task → capture Err → classify failure → choose deterministic repair vs model-mediated repair using library primitives.
Updated
What you will build
A workflow sketch: run task → capture Err → classify failure → choose deterministic repair vs model-mediated repair using library primitives.
Prerequisites
- 201-04
- Read Verification and Repair loops
Files you will touch
Browse tests under tests/ matching verification, repair, or task-specific regression folders—read-only.
Step 1 — Run a focused pytest slice
pytest -q tests/docs tests/reference tests/examples
Confirms tutorials/examples alignment after local edits.
Step 2 — Trace verification hooks
Open forge_lcdl.verification registry concepts from the guide: validators run after LLM output parsing.
Step 3 — Decide repair strategy
| Failure class | Typical first move |
|---|---|
| JSON parse | Retry with stricter prompt / smaller temperature |
| Schema mismatch | Deterministic trim / coerce when safe |
| Policy violation | Do not silently retry—surface Err |
Expected output
You can narrate which subsystem rejected output without opening transport internals.
Common failures
| Anti-pattern | Risk |
|---|---|
Infinite until_ok without max iterations |
Hangs / cost blowups |
Verify
Pick one contract.md failure bullet and describe matching Err representation.
What changed
You bridge task contracts with operational observability—prep for enterprise tutorials.