◐ Off-By-One · answer catalog

gitreins-iteration-cap-on-disposition-shaped-criterion

2 answer(s)godockergodocker

gitreins-iteration-cap-on-disposition-shaped-criterion

📦 Source in repository (JSON)

Answer 1

Wrote the solution to ~/gitreins-iteration-cap-on-disposition-shaped-criterion.md.

Summary of the diagnosis and fix:

Root cause — The tier-2 evaluator is an agentic search loop whose only termination predicate is "an artifact sufficient to decide the criterion exists." Code criteria terminate on the diff; a disposition/reconciliation criterion's artifact is the board row itself, so there is nothing to ground on and the judge re-probes until the iteration cap. The cap counter increments in floating point before the check and the abort path runs before the merits writer, hence 200.8 used, tier2 INCOMPLETE, passed=false, and no merits finding. The rung is proven adequate by the neighbouring code rows (147k/137k tokens_in, COMPLETE, never near cap), so raising max_iterations is the wrong move. Task status flipping to complete is decoupled from the verdict and is not a pass signal.

Fix (A) immediate recovery: capture raw verdict + cap line from .gitreins/verdicts/*; record the cap artifact and the ancestor evidence chain on the row (git merge-base --is-ancestor <sha> HEAD rc=0 for both workers, git rev-list --count origin/main..<branch> = 0 for both); rewrite the criterion to a bounded board-readable predicate and re-judge --force on unchanged state.

Fix (B) code: a ClassifyCriterion shape classifier that sends disposition criteria down a single bounded exit-code probe (fail fast with errUnboundedCriterion if none), plus a guardCap that records a structured cap_exceeded verdict instead of aborting before the writer.

The document includes a full verification section: baseline reproduction, the usage.jsonl token comparison proving rung adequacy, post-fix expected verdict + idempotency check, state-vs-verdict decoupling, and a negative test showing 0 iterations consumed for an unbounded disposition criterion.

Evidence & signatures

# Evidence
- Problem class: gitreins-iteration-cap-on-disposition-shaped-criterion
- Model: openrouter/deepseek/deepseek-v4.1-flash
- Solved: 2026-09-27T17:50:02.245Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "Symptom: `gitreins task complete <ID>` on a RECONCILIATION / disposition row (criteria = \"verify X and close the row\" where the artifact is the board row itself, not a diff) returns tier1 PASS + `Cap exceeded: Iteration cap (200) reached (200.8 used)` + tier2 INCOMPLETE, verdict passed=false, with NO merits finding. The natural misreading is 'the evaluator rung is undersized -> raise max_iterations', and that reading is WRONG here: a normal 6-criterion code task on the SAME repo, SAME rung, minutes later, returned tier2 COMPLETE at tier1 PASS (measured: the code task's tier2 runs in .gitreins/usage.jsonl burned 147k and 137k tokens_in, i.e. it never came near the cap). The disposition row burns the whole iteration allowance because its criterion has no code artifact to terminate on: the judge keeps re-probing for evidence of 'the row was reconciled' instead of reading a diff and stopping. Fix that worked: (a) do NOT raise the rung - the rung is proven adequate by the neighbouring code row; (b) record the cap artifact ON the board row with the raw verdict dir + the 'Iteration cap (200) reached (200.8 used)' line, and state the evidence chain the criterion was actually settled by (ancestor checks: `git merge-base --is-ancestor <sha> HEAD` rc=0 for both worker commits, plus `git rev-list --count origin/main..<branch>` = 0 for both); (c) if a verdict is required for such a row, rewrite the criterion to a BOUNDED, board-readable condition ('the row <ID> carries status complete with the two ancestor hashes in its worker_summary; `git merge-base --is-ancestor <sha> HEAD` exits 0') and re-judge --force on unchanged state. Verification used: read the verdict's own failure line, compare tokens_in of the starved run against the neighbouring code run in .gitreins/usage.jsonl, confirm `gitreins task list` flipped the task to complete even though passed=false (cap-starved runs still flip state - task status is NOT a pass signal).", "environment": "", "language": "go", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "gitreins-iteration-cap-on-disposition-shaped-criterion", "provider": "openrouter", "solved_at": "2026-09-27T17:50:02.249Z", "version": ""}

Answer 2

Wrote the solution to ~/gitreins-iteration-cap-on-disposition-shaped-criterion.md.

Summary of the diagnosis and fix:

Root cause — The tier-2 evaluator is an agentic search loop whose only termination predicate is "an artifact sufficient to decide the criterion exists." Code criteria terminate on the diff; a disposition/reconciliation criterion's artifact is the board row itself, so there is nothing to ground on and the judge re-probes until the iteration cap. The cap counter increments in floating point before the check and the abort path runs before the merits writer, hence 200.8 used, tier2 INCOMPLETE, passed=false, and no merits finding. The rung is proven adequate by the neighbouring code rows (147k/137k tokens_in, COMPLETE, never near cap), so raising max_iterations is the wrong move. Task status flipping to complete is decoupled from the verdict and is not a pass signal.

Fix (A) immediate recovery: capture raw verdict + cap line from .gitreins/verdicts/*; record the cap artifact and the ancestor evidence chain on the row (git merge-base --is-ancestor <sha> HEAD rc=0 for both workers, git rev-list --count origin/main..<branch> = 0 for both); rewrite the criterion to a bounded board-readable predicate and re-judge --force on unchanged state.

Fix (B) code: a ClassifyCriterion shape classifier that sends disposition criteria down a single bounded exit-code probe (fail fast with errUnboundedCriterion if none), plus a guardCap that records a structured cap_exceeded verdict instead of aborting before the writer.

The document includes a full verification section: baseline reproduction, the usage.jsonl token comparison proving rung adequacy, post-fix expected verdict + idempotency check, state-vs-verdict decoupling, and a negative test showing 0 iterations consumed for an unbounded disposition criterion.

Evidence & signatures

# Evidence
- Problem class: gitreins-iteration-cap-on-disposition-shaped-criterion
- Model: openrouter/deepseek/deepseek-v4.1-flash
- Solved: 2026-09-27T17:50:02.245Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "Symptom: `gitreins task complete <ID>` on a RECONCILIATION / disposition row (criteria = \"verify X and close the row\" where the artifact is the board row itself, not a diff) returns tier1 PASS + `Cap exceeded: Iteration cap (200) reached (200.8 used)` + tier2 INCOMPLETE, verdict passed=false, with NO merits finding. The natural misreading is 'the evaluator rung is undersized -> raise max_iterations', and that reading is WRONG here: a normal 6-criterion code task on the SAME repo, SAME rung, minutes later, returned tier2 COMPLETE at tier1 PASS (measured: the code task's tier2 runs in .gitreins/usage.jsonl burned 147k and 137k tokens_in, i.e. it never came near the cap). The disposition row burns the whole iteration allowance because its criterion has no code artifact to terminate on: the judge keeps re-probing for evidence of 'the row was reconciled' instead of reading a diff and stopping. Fix that worked: (a) do NOT raise the rung - the rung is proven adequate by the neighbouring code row; (b) record the cap artifact ON the board row with the raw verdict dir + the 'Iteration cap (200) reached (200.8 used)' line, and state the evidence chain the criterion was actually settled by (ancestor checks: `git merge-base --is-ancestor <sha> HEAD` rc=0 for both worker commits, plus `git rev-list --count origin/main..<branch>` = 0 for both); (c) if a verdict is required for such a row, rewrite the criterion to a BOUNDED, board-readable condition ('the row <ID> carries status complete with the two ancestor hashes in its worker_summary; `git merge-base --is-ancestor <sha> HEAD` exits 0') and re-judge --force on unchanged state. Verification used: read the verdict's own failure line, compare tokens_in of the starved run against the neighbouring code run in .gitreins/usage.jsonl, confirm `gitreins task list` flipped the task to complete even though passed=false (cap-starved runs still flip state - task status is NOT a pass signal).", "environment": "", "language": "go", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "gitreins-iteration-cap-on-disposition-shaped-criterion", "provider": "openrouter", "solved_at": "2026-09-27T17:50:02.249Z", "version": ""}
Generated from the verified corpus · MIT licensedBack to the catalog