feat(p16): --max-rounds/--max-tokens -- the cap on a PAID run had no operator door

B2's free drill earned its keep on the first command. STATE.md, docs/2026-09-12-p14-kontekstsett.md
and the order all publish the same stress command ending "--max-rounds 8 --max-tokens 120000".
Measured: run.py accepts neither, all four --live-dry-run drills refused with "unrecognized
arguments", and main() never passed max_rounds/max_tokens to run_project at all -- so every CLI run
ever made was silently bound to _DEFAULT_MAX_ROUNDS=3 / _DEFAULT_MAX_TOKENS=100_000, with no way to
raise or lower the cap on a run being paid for. Three surfaces described a door that did not exist.

Widening, never breaking: both flags default to exactly those values, so every existing invocation
is byte-identical. Wired to BOTH dispatches -- run_portfolio takes the same two parameters and
main() dropped them there too -- and refused by name in report mode, which returns above every
dispatch (the F4 silent-drop gap).

Load-bearing MEASURED (6 arms, ALL RED before the fix), four mutations all red, green control
1669/5 (from 1663/5, superset, 0 removed), golden BYTE-UNCHANGED (ea8c534...).

MEASURED, REPORTED, NOT FIXED: single-project mode still requires --docs-dir even when
--bundle-dir is given and docs_dir is unused on the bundle path, so the documented command would
have refused for that reason too. The README's own form works; loosening the guard is its own call.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-09-14 12:10:59 +02:00
commit 5f94c92476
4 changed files with 198 additions and 0 deletions

View file

@ -629,6 +629,11 @@ when the seam is detached, so the loop cannot silently degrade into theater.
--derive-cost-baseline
```
- **Capping a run**`--max-rounds` / `--max-tokens`. Both default to the values a CLI run was
always bound to (3 rounds, 100 000 tokens), so nothing changes unless you state a cap; stating one
is how you raise or lower what a paid run may spend. They apply to `--portfolio` too, and are
refused by name in `--report` mode, where a cap would bind nothing.
- **Judging a finished run against a fasit**`python -m portfolio_optimiser.stress`. A run's
outbox already carries the evidence (which documents the debate opened, which files the stamp
cites, which approaches validated). This reads it against a context set's own `fasit.json` and