Commit graph

2 commits

Author SHA1 Message Date
5d8844fef5 fix(s7b): BudgetExceeded refuses instead of tracebacking, approaches land in exploration.json
Fiks-ordre 20260904T070930Z-8335015575-from-.claude. Two scoped defects the
S7b syretest observed and left unfixed (docs/2026-09-04-syretest-s7b-k2.md
§ 3.6):

1. `BudgetExceeded` (a RuntimeError, econ 56) could leave `--explore` as a
   raw Python traceback from TWO raise sites: the exploration loop's own
   round/token cap (`explore()`/`resume_exploration()`, uncaught in
   `main()`'s exploration `try`), and `generate_via_llm`'s retry loop when a
   mandate's own-proposal evaluation hits an unparseable reply (the full-run
   dispatch's `except` tuple only knew `ValueError`/`FileNotFoundError`/
   `ValidationError`). Both now end as `run refused: {exc}` on stderr, rc 1,
   same shape as every other loader refusal in run.py.

2. `{run_id}-exploration.json` carried rounds/tool_calls/plan_reviews/
   quick_validations but not the approaches the loop actually shaped — those
   stood only in the stdout mandate announcement. `explore.trace_payload`
   now takes a required `mandate` keyword and renders `mandate.approaches`
   under an "approaches" key, so an operator reading the artefact days later
   (the whole point of the async U12 door) can recover what the run decided
   to evaluate without the terminal.

Fifteen mutations across three detach points, all red against the full
suite: the exploration-loop except clause (2 red), the full-run except
tuple (1 red), and the approaches rendering (1 red) — plus a control per
fix proving the happy path is unaffected. Green control 1295 passed / 5
skipped (supersett of S7b's 1290/5, 0 removed), golden
demo-transcript.stdout byte-unchanged (shasum -a 1 = ea8c534…), ruff +
mypy clean.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 16:33:35 +02:00
f17068b013 feat(explore): sporet sier HVILKE dokumenter navigatoeren aapnet, ikke bare hvilken base
S7a-3 pkt. 3. ExplorationToolRecorder registrerte navn + bundle_id i
kall-rekkefoelge. Over 39 konsepter holdt det; over K2s 629 leser tool_calls
"read_file, k2" to ganger, saa hvilke to av 629 kan ikke leses ut av den
leverte artefakten i det hele tatt - oekt 77 og 81 maatte begge instrumentere
kjoeringen for haand for aa svare.

ToolCall.path registreres for read_file OG read_dir. Resultatet registreres
fortsatt ALDRI: det ER basens innhold, maalt til 89 % av hver prompt-token i en
K2-kjoering. "" for et verktoey som ikke tar argumentet (bundle_id-regelen), og
EN argumentleser for begge felt - to kopier ville staatt fritt til aa vaere
uenige om hva et fravaerende argument betyr.

Load-bearing MAALT: 4 mutasjoner alle roede mot HELE suiten, groenn kontroll
1257 passed / 5 skipped, golden byte-uendret. P1 3 / P2 3 / P3 2 / P4 2.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-03 08:03:36 +02:00