From ae51b795cc55082b33248631ba490ec09512b733 Mon Sep 17 00:00:00 2001 From: homen Date: Thu, 15 Oct 2026 09:34:58 -0700 Subject: [PATCH] fix: reject invalid iteration budgets before judging --- .tours/02-agent-execution.tour | 6 +- docs/START_HERE.md | 20 +++-- iterate.mjs | 7 +- package.json | 3 +- test/iteration-budget.test.mjs | 139 +++++++++++++++++++++++++++++++++ 5 files changed, 163 insertions(+), 12 deletions(-) create mode 100644 test/iteration-budget.test.mjs diff --git a/.tours/02-agent-execution.tour b/.tours/02-agent-execution.tour index 2c0f105..0ec6d84 100644 --- a/.tours/02-agent-execution.tour +++ b/.tours/02-agent-execution.tour @@ -61,14 +61,14 @@ }, { "file": "iterate.mjs", - "line": 62, + "line": 67, "pattern": "for \\(let r = 1; r <= rounds", "title": "9 — The loop: render, judge, revise", - "description": "One round per iteration against a pass mark, default 28/40. Read the header comment above: a gate that runs once, after the work, is a grade. A gate that runs every round, before the work is called done, is a process. One thing the step order here hides: this is not the judge you just read. `iterate.mjs:72` (`judge-rubric.mjs`) spawns the other, gate-aware judge, and nothing in this repository spawns `iterate.mjs` at all — `npm run iterate` is its only caller." + "description": "One round per iteration against a pass mark, default 28/40. Read the header comment above: a gate that runs once, after the work, is a grade. A gate that runs every round, before the work is called done, is a process. One thing the step order here hides: this is not the judge you just read. `iterate.mjs:77` (`judge-rubric.mjs`) spawns the other, gate-aware judge. `npm run iterate` is the application entry; offline iteration-budget tests also spawn it against a synthetic child judge." }, { "file": "iterate.mjs", - "line": 99, + "line": 104, "pattern": "writeFileSync\\(`\\$\\{base\\}\\.next-cut\\.md`", "title": "10 — It writes a brief and refuses to apply it", "description": "Below the gate, the critic's revision brief is written to `