portfolio-optimiser/src/portfolio_optimiser
Kjell Tore Guttormsen 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
..
data feat(validator): anchor the deterministic gate to the project's real cost baseline (S4.0) 2026-08-03 17:19:31 +02:00
__init__.py feat(3): flaten sier sant om seg selv, og to gater måler at den fortsetter å gjøre det 2026-08-14 06:57:25 +02:00
backends.py feat(4b): AZURE-profilen leser miljøet sitt, ikke operatørens laptop 2026-08-13 22:27:21 +02:00
budget.py feat(budget): enforce a global portfolio token cap before the call, not after it (S3.4/F10) 2026-07-31 21:34:48 +02:00
contracts.py feat(hitl): ekspertdommen kan ikke oppstaa av stillhet (F2, ORDRE 20260825T214801Z) 2026-08-27 01:22:07 +02:00
costsim.py docs(s54): --report CLI surface + truthful costsim kost_mot_verdi seam note 2026-07-24 01:38:10 +02:00
datasource.py feat(fase2b): OKF-navigated bundle context replaces chunk-stuffing 2026-06-30 06:42:19 +02:00
dimension.py feat(s53): load_dimension fail-fast loader (MAF-free, mirrors load_goal_config) 2026-07-23 21:31:32 +02:00
explore.py fix(s7b): BudgetExceeded refuses instead of tracebacking, approaches land in exploration.json 2026-09-04 16:33:35 +02:00
generate.py feat(1b): proposeren får en grammatikk — strict structured output [skip-docs] 2026-08-14 14:00:32 +02:00
hitl.py feat(explore): plan-reviewen kan besvares over DAGER (U12 + asynkron U13, rad 3) 2026-08-26 12:26:04 +02:00
hosting.py feat(hitl): ekspertdommen kan ikke oppstaa av stillhet (F2, ORDRE 20260825T214801Z) 2026-08-27 01:22:07 +02:00
ingest.py feat(ingest): P2/S1.b — innholdsgaten står, rundt materialize og ikke i den 2026-08-09 22:58:00 +02:00
ingest_mcp.py chore(deps): move the ingest library pin to v0.3.2 — as far as latest goes today 2026-08-05 12:11:12 +02:00
ir.py feat(okf): derive a cost baseline from a priced schedule, or refuse 2026-09-03 03:15:39 +02:00
ledger.py fix(money): quantize NOK to øre in one order, from one source (kø-p) 2026-08-03 20:08:59 +02:00
mandate.py feat(mandate): forslaget OPPSTAAR fra kommisjonen og basens eget prisskjema - null modellkall 2026-09-03 22:27:24 +02:00
mcp_tools.py feat(provenance): a run records which external service it actually called 2026-08-05 21:37:29 +02:00
notify.py fix(s52): resolve ConsoleNotifier default stream at call time 2026-07-17 03:18:00 +02:00
okf.py feat(s7b): IR-projeksjonen er valgfri paa alle tre kallsteder, og fraveret sies 2026-09-04 08:09:03 +02:00
outbox.py feat(explore): plan-reviewen kan besvares over DAGER (U12 + asynkron U13, rad 3) 2026-08-26 12:26:04 +02:00
persona.py feat(persona): load the falsification skill from commons at call time 2026-09-02 21:31:32 +02:00
preflight.py fix(5): preflight kjenner samme endepunkt-variabler som kjørestien [skip-docs] 2026-08-14 10:48:45 +02:00
provenance.py feat(okf): den erklaerte bundle_id-en er identiteten - mountet er en filsystem-tilfeldighet 2026-09-03 06:47:58 +02:00
reference_domain.py feat(hitl): ekspertdommen kan ikke oppstaa av stillhet (F2, ORDRE 20260825T214801Z) 2026-08-27 01:22:07 +02:00
retrieval.py fix(retrieval): fail-closed on uncanonicalisable paths (embedded null byte) 2026-07-21 08:00:11 +02:00
run.py fix(s7b): BudgetExceeded refuses instead of tracebacking, approaches land in exploration.json 2026-09-04 16:33:35 +02:00
semretrieval.py fix(semretrieval): refuse a non-finite embedding instead of scoring it (kø-(l)/S3.1 MINOR) 2026-08-03 21:48:50 +02:00
shared_root.py feat(4a): wheelen bærer shared/ som pakkede data — arbeidstreet er overstyringen 2026-08-13 21:13:08 +02:00
simulation.py feat(explore): den offline generalproeven kan AAPNE en base (MAJOR-1 b, ORDRE 20260902T151931Z) 2026-09-02 18:45:53 +02:00
tools.py feat(okf): adjudication_for names the unknown state and a tool carries it 2026-09-02 20:36:54 +02:00
tracing.py fix(maf): en vakt som gikk inert i STILLHET, funnet ved aa loefte pinnen (F15, ORDRE 20260829T155150Z) 2026-09-02 19:35:49 +02:00
validator.py feat(validator): anchor the deterministic gate to the project's real cost baseline (S4.0) 2026-08-03 17:19:31 +02:00
value_report.py feat(s54): value_report text + deterministic JSON formatters 2026-07-24 01:29:31 +02:00
verdicts.py feat(s7b): IR-projeksjonen er valgfri paa alle tre kallsteder, og fraveret sies 2026-09-04 08:09:03 +02:00
workflow.py feat(fase3): make the maker-checker checker actually gate the reasoning 2026-06-30 07:24:30 +02:00