← Harness Engineering From First Principles

Independent Review and Bounded Repair

Preserve the original chapter and factual invariants; independently review bounded repair candidates.

Chapter 4 of this book contained a sentence that became false on 23 November 2026. Its evidence box said that Project 01’s second corrective freeze “is a candidate awaiting independent re-review”. Later that day the re-review completed, and its verdict was REJECT. An independent book review found the sentence and recorded a precise repair:

Current Text: “… A second freeze is a candidate awaiting independent re-review. …” Recommended Change: Replace the third sentence with: “The second freeze was independently re-reviewed and returned REJECT — candidate returned for correction (HARNESS-PROJECT-01-REVIEW-02, 2026-11-23): RER-01 and RER-03 corrected; RER-02 NOT CLOSED; RER-04/P01R-07 PARTIAL; P01R-02 NOT CLOSED (fresh zero-tool false success); P01R-27 blocking for IR-02. …” Priority: Blocking.

(HARNESS-BOOK-REVIEW-01/RECOMMENDED-EDITS.md, E-04-01; OBSERVED.)

That record is a small, complete example of the mechanism this chapter is about. A defect was found by a reviewer who did not write the text. The repair is bounded: one sentence, in one box, replaced by stated text. It states its reason, and it carries a priority. The review document also declares its own constraint: “No wholesale rewrites.”

Contrast that with the obvious alternative: hand Chapter 4 and the review to a model and ask it to “fix the chapter”. The model may fix the sentence. It may also tighten the prose elsewhere, merge two tables, change “PROPOSED” to “proposed” in a dozen places, drop an EXPERIMENT PENDING marker that looked redundant, and “update” a status it inferred rather than read. The result could be better English and a worse book. The chapter brief states the requirement precisely: preserve the original chapter and factual invariants; independently review bounded repair candidates.

Evidence status. Draft manuscript. Formal Project 07 (Book Quality Lab) study has not started. The bounded-repair demonstration D16-REPAIR-01 is implemented and executed (examples/pi-harness-lab/src/repair.ts; test/repair.test.ts, 14/14 pass offline): deterministic invariants, bounded repair budgets with stale-base and authority checks, revalidation, terminal ACCEPTED/REJECTED/UNRESOLVED states, replayed attempts and decisions — including the E-04-01 bounded-hunk pattern and the oversized-rewrite refusal. Two real review-and-repair histories from this repository are used as OBSERVED case material: the Project 01 review, correction and re-review cycle, and the Chapters 1–10 book review. Neither is an experiment. Both are histories recorded in repository documents. The book review’s blocking status edits were subsequently applied by HARNESS-BOOK-RECONCILE-01; the worked example below replays the record as it stood when the finding was made. AHE’s results are DOCUMENTED via R03. The seeded-corpus study with model judges and human review (§16.8) remains PROPOSED and EXPERIMENT PENDING.

16.1 Repair is not rewrite

A repair is a change made in response to a specific finding, intended to remove that finding without affecting anything else. A rewrite replaces a larger region with new text or code that the author believes is better overall. Both have their place. Only repair can be verified cheaply, because verification scales with the size of the change and the number of properties it might disturb.

Bounded repair makes the distinction operational. It has four bounds:

  1. Scope. Each repair is tied to a finding, and it may change only the region the finding identifies, plus any declared consequential regions.
  2. Invariants. Properties of the artifact that every repair must preserve are declared before repair begins (§16.2).
  3. Budget. There is a maximum number of rounds, a maximum change size, and a resource budget for the repair loop as a whole.
  4. Stopping rule. Explicit conditions end the loop: success, no progress, regression, or escalation.

An unbounded loop has none of these. Its natural failure modes are easy to predict. It changes more than it was asked to. It breaks things the evaluator was not checking, because the evaluator is the only brake. And it never converges, because each rewrite creates new things for the evaluator to criticize.

16.2 What a chapter must preserve

Project 07’s artifact is a chapter of this book. Its invariants fall into three groups, which correspond to the evaluator types of Chapter 15.

Factual and structural invariants are mechanically checkable.

  • Front matter: title, weight, draft status, part and outputs. The repository’s validator already enforces several of these.
  • Every EXPERIMENT PENDING marker, and every evidence label (DOCUMENTED, OBSERVED, PROPOSED, UNKNOWN, and Established, Implemented, Experimentally demonstrated), attached to the same claims.
  • Every number, digest, finding ID (P01R-xx, RER-xx, E-xx-xx), research claim ID (R02 C08, H01-C13), citation, DOI and URL.
  • Every code block that is quoted from source, byte for byte against the cited file at the cited revision.
  • Relative links and shortcodes, which must resolve.

A deterministic invariant checker extracts these sets from the original and from the candidate and compares them. Any difference must be declared by the repair or it is a violation.

Semantic invariants need judgment. The modality of claims is the central one. A claim labelled PROPOSED must not become phrased as a result. “Is predicted to” must not become “does”. A limitation must not disappear. Labels can be checked mechanically, but phrasing that upgrades a claim without changing its label cannot. A model judge can screen for it, and a human adjudicates disagreements (Chapter 15 §15.3).

Editorial properties are the improvement target, not invariants. Clarity, concision and structure are what repair is allowed to change.

The split matters for one reason: repair candidates come from a model, and the checks that protect invariants must not depend on that model’s account of what it changed. A candidate that reports “only the evidence box was modified” is a claim. The invariant checker’s diff is the evidence. This is Chapter 14’s path-gate principle applied to text.

16.3 The repair candidate as a contract

A repair candidate should carry enough structure that it can be checked without trusting its author. The book review’s own entry format, Current Text / Recommended Change / Reason / Priority, already does most of this. A PROPOSED candidate contract adds what an automated loop needs:

Field Purpose
findingId The defect being repaired; there must be no repair without a finding
base Digest of the chapter the candidate was computed against (Chapter 6’s stale-base rule applies to text)
hunks Exact current text and replacement text, each locatable uniquely in base
declaredInvariantChanges Every invariant the candidate intends to change, with justification. For example, “replaces a status claim with the REVIEW-02 verdict”, citing the source record
rationale Why this hunk removes the finding

Two properties make the contract enforceable. Uniqueness: each hunk’s current text must occur exactly once in the base, or the candidate is rejected as ambiguous. This is Chapter 6’s search-and-replace precondition. Declaration: the invariant checker compares the extracted invariant sets, and any change not listed in declaredInvariantChanges fails the candidate. A repair that updates a status claim must say so, and must cite the record that justifies it. That makes the E-04-01 kind of change acceptable and the silent upgrade kind rejectable by the same rule.

16.4 Independent review of candidates

The checker establishes that a candidate changed only what it declared. It does not establish that the declared change is right. “Replace with ‘REJECT’” is right only if REVIEW-02 actually says REJECT. That judgment needs a reviewer, and Chapter 15’s independence ladder applies.

  • The reviewer did not produce the candidate. At minimum this means a fresh context, ideally a different model, and for authority decisions a human.
  • The reviewer sees the original, the finding, the candidate and the cited source. It does not see the repairer’s reasoning, which would anchor it.
  • The reviewer decides per hunk. Accept, reject, or reject with a reason, and record the decision as evidence (Chapter 14 §14.2, property 5).
  • The review is recorded with its independence degree. This repository’s reviews already do so. Each states that it is “procedural separation only”, not human or organizational independence.

The two histories in this repository show what independent review catches and what it does not.

The Project 01 cycle (OBSERVED):

  1. The first review returned CONDITIONAL ACCEPT, with blocking corrections among 29 findings (P01R-01 to P01R-29).
  2. The implementer corrected them. A re-review of the first freeze found four new blocking defects (RER-01 to RER-04) and returned BLOCKED.
  3. The implementer produced a second freeze, with a regression suite that grew from 56 to 106 tests.
  4. REVIEW-02 confirmed real progress (RER-01 and RER-03 corrected; the original four-milestone attack rejected). It then found, through a supported scripting path, that a pre-authored answer with zero tool calls still completed and replayed as verified. It returned REJECT.

Each round of repair closed the findings it targeted and left a neighbouring false-success path open. Each was found only by a reviewer designing new attacks, not by rerunning the old ones. That is a scoped observation of this repository history, not a general measured law. These repairs closed particular findings while neighbouring defect-class failures remained discoverable by new attacks. In Project 01 specifically, RER-01 and RER-03 were corrected, but RER-02, RER-04, P01R-02 and P01R-27 remained open, and the overall candidate was returned for correction (REJECT). Closing a targeted finding is not the same as closing the defect class, and it is not acceptance of the candidate.

The book review (OBSERVED). It verified things the self-review could not establish on its own authority. It independently recomputed Chapter 7’s corrected arithmetic, and it confirmed several source-inspection claims against the working tree. It also caught that six chapters’ status sentences had become false since they were written. No self-review could have caught that, because the facts changed after drafting.

16.5 Agents predicting their own regressions

A repair loop is tempted to let the repairer certify its own work: “this change fixes X and does not affect Y”. Published evidence suggests treating that claim with particular suspicion. In the Agentic Harness Engineering study, R03 records a regression recall of 11.1% in the authors’ Appendix D (R03-HARNESS-RESEARCH.md R03-C06; DOCUMENTED). R03’s reading is that self-attributed predicted fixes are hypotheses, that task flips also reflect randomness, shared edits and infrastructure, and that “low regression recall makes autonomous acceptance particularly weak”. That is one study, in one setting, and it is not replicated here. It points the same way as this repository’s two histories: the producer of a change is the wrong party to certify what the change broke.

The design consequence is simple. A repair candidate’s own claims about its effects are inputs to review, never substitutes for it. The invariant checker and the independent reviewer produce the evidence about effects. The repairer produces only the change and its stated intent.

16.6 Stopping rules

Without a stopping rule, a repair loop runs until its budget is exhausted, and that is not a decision. A PROPOSED rule set:

  • Success. All targeted findings are closed by accepted hunks, the invariant checker passes, and a fresh review of the whole artifact finds no new blocking findings in the changed regions.
  • No progress. A round produces no accepted hunks. Stop and escalate. Another round with the same inputs is unlikely to differ.
  • Regression. Any invariant violation, or any reviewer-confirmed new defect introduced by a hunk. Revert that hunk. If regressions recur across rounds, stop.
  • Round cap. At most R rounds, registered in advance. The Project 01 history suggests that a small R followed by human escalation is more informative than a large one. Each round there surfaced a new defect class. More rounds of the same process would probably have surfaced more without converging, but that is an inference from one history, not a measurement.
  • Size cap. A candidate whose diff exceeds a registered fraction of the artifact is reclassified as a rewrite. A rewrite goes to a different process: full review and a human decision.

Escalation is not failure. Its output is a precise record: what was found, what was repaired, what was rejected and why, and what remains. That is exactly the shape of the documents this repository’s reviews already produce.

16.7 Worked example: repairing E-04-01

16.7 Worked example: repairing E-04-01

The finding below is real, and the bounded-hunk and oversized-rewrite cases are executed (D16-REPAIR-01, E-04-01 pattern tests). The corrected E-04-01 repair was applied to Chapter 4 by HARNESS-BOOK-RECONCILE-01; the demonstration reconstructs the record as it stood when the finding was made, on an excerpt file rather than the chapter itself, and this chapter applies no second repair. The independent human/model review of a new hunk — Candidate C’s fate — is represented by the test’s own verdict, not by a live reviewer; that step remains pending.

Finding. E-04-01: Chapter 4’s evidence box states the second freeze is “awaiting independent re-review”. REVIEW-02 shows a completed re-review with verdict REJECT.

Candidate A, bounded.

  • base: digest of the current 04-chapter.md.
  • One hunk: the exact third sentence of the evidence box, replaced with the recommended text.
  • declaredInvariantChanges: “status claim: second-freeze review status changes from pending to REJECT, source REVIEW-02 §9; adds finding IDs RER-01, RER-02, RER-03, RER-04, P01R-07, P01R-02, P01R-27”.

The invariant checker extracts the evidence labels, the EXPERIMENT PENDING markers, the finding IDs and the numbers from the base and from the candidate. The only differences are the declared added finding IDs and the changed status claim. Pass. The reviewer opens REVIEW-02 §9 and §4, and confirms the verdict and each disposition named in the hunk. Accept. The stopping rule’s success condition holds after a fresh read of the changed box. That read covers the changed box; the rule’s whole-artifact review for new blocking findings in the changed regions is still owed before success is declared.

Candidate B, unbounded. The model rewrites the whole evidence box “for clarity”. The new box reads well. It also omits “Live qualification (P01-E) and the comparative experiment (P01-F) have not been run”. It describes the second freeze as “largely corrected”. And it drops the scripted-responder caveat. The checker finds that two evidence-relevant sentences have disappeared, without declaration: P01-E and P01-F have dropped out of the extracted set of finding and gate IDs, and the “scripted responder is not a model” limitation is no longer present. Fail, before any reviewer reads it. Had the checker missed the semantic upgrade (“largely corrected”), the reviewer would be asked whether REVIEW-02 supports “largely corrected”. It does not. It says REJECT.

Candidate C, bounded but wrong. One hunk, correctly scoped, but it says “verdict CONDITIONAL ACCEPT”. The checker passes, because it declared a status change and cited a source. The reviewer opens REVIEW-02 §9, finds “VERDICT: REJECT”, and rejects the hunk with that reason. This case is why the checker alone is not enough. Bounded and correct are different properties, checked by different evaluators. In the executed demo the reviewer’s role is played by the test’s own verdict — a stand-in, not an independent review. A scripted or human reviewer independent of the test author remains the pending part.

16.8 Project 07 checkpoint: Book Quality Lab

Blueprint requirement: diagnose and improve a chapter. The new mechanisms are independent deterministic checks and model-assisted evaluation, with calibrated repair loops. The verification is to preserve factual and semantic invariants, and to distinguish correctness, evidence and editorial judgment.

Status: formal study not started. This book’s authoring process has the shape of Project 07: drafting, self-review, independent review, recommended bounded edits. But it is a manual, observed process, not an implemented lab, and it produces no experimental evidence about repair mechanisms. The repair-loop mechanics — bounded proposals, invariant checks, stopping rules, replay — are executed in D16-REPAIR-01; seeded-corpus comparison, model judges and human review are not.

Proposed study. All of the following is PROPOSED; EXPERIMENT PENDING.

  • Corpus. Frozen copies of drafted chapters into which defects are seeded with known labels. These include stale status claims, wrong numbers, broken citations, a PROPOSED claim phrased as a result, a dropped EXPERIMENT PENDING, and an unclear paragraph (an editorial defect). The originals are never modified. The study works on copies, as the frozen-fixture rule requires.
Arm Repair process
U Unbounded: “fix the issues in this chapter”
B Bounded candidates (§16.3) + invariant checker + independent review + stopping rules
B−rev B without the independent reviewer (checker only). Ablation
B−chk B without the invariant checker (reviewer only). Ablation
  • Endpoints. Seeded defects correctly repaired; invariants violated, by class; new defects introduced; candidate acceptance and rejection rates; human minutes at escalation; rounds to stop; and diff size.
  • Registered predictions.
    • U repairs many seeded defects but introduces invariant violations, especially label and modality changes, at a rate B does not.
    • B−rev accepts bounded but wrong candidates (the Candidate C class) that B rejects.
    • B−chk misses silent omissions (the Candidate B class) that the checker catches.
    • B is slowest.
  • Falsifiers. U introducing no more violations than B would mean the bounding machinery is unnecessary for this corpus. Either ablation matching B on its target defect class would mean the removed component is not doing that work.

16.9 Failure modes

  • Rewrite as repair. A large diff is presented as a fix. Defence: a size cap, and reclassification as a rewrite.
  • Self-certified effects. The repairer’s “nothing else changed” is accepted. Defence: the invariant checker’s diff, and an independent reviewer (R03-C06 caution).
  • Checker as reviewer. Bounded-but-wrong candidates pass (Candidate C). Defence: the reviewer checks content against the cited source.
  • Closing findings, not classes. Each round fixes the reported case, and the defect class survives (the Project 01 history). Defence: the review designs new attacks on the class, not only reruns of old ones.
  • Stale-base repair. A candidate is computed against an older chapter version. Defence: the base digest is checked at application, as in Chapter 6.
  • Endless loop. No stopping rule. Defence: round, size, no-progress and regression stops, with escalation.

16.10 What you can build and test now

D16-REPAIR-01 already implements the core loop: candidate records with finding IDs, base digests, exactly-located hunks and declared changes; the stale-base and authority gates; per-round budgets; the invariant checker with revalidation; no-progress detection; terminal states with reasons; and replay of every attempt and decision. The E-04-01 bounded-hunk and oversized-rewrite cases run as tests. Extend it with a chapter-text invariant extractor (evidence labels, EXPERIMENT PENDING markers, finding/claim IDs, numbers, URLs, quoted code blocks, front matter) applied to real recommended edits, and with the §16.8 seeded corpus, model-judge and human-review arms.

16.11 What remains unverified

  • The formal Project 07 and §16.8 study: seeded corpus, model-judge and human-reviewer arms, and the ablation comparison.
  • Whether model judges can reliably detect modality upgrades, for example PROPOSED claims rephrased as results. This is untested, and it is the hardest semantic invariant.
  • The full outcome of BOOK-REVIEW-01’s recommended edits: the blocking status edits were applied by RECONCILE-01; the remaining optional edits and their review are not recorded here.
  • AHE’s regression-recall finding comes from one external study in a different setting (R03-C06). It is not replicated here.

EXPERIMENT PENDING. The formal repair study with seeded corpus, model judges and human review has not run; D16-REPAIR-01 executes the bounded-repair mechanics on scripted fixtures, with test-authored verdicts standing in for independent review.

Part III has added structure (workflows and typed gates), judgment (evaluation) and correction (bounded repair) to the single-run harness of Parts I and II. All of it assumed that things would mostly work, and that budgets, deadlines and failures were edge cases. In practice they are the normal case. Chapter 17 treats failures, budgets and timeouts as first-class parts of a harness’s design.

Previous: Chapter 15: Evaluation: Outcome, Process, and Evidence.

Next: Chapter 17: Failures, Budgets, and Timeouts.