portfolio-optimiser-claude/tests
Kjell Tore Guttormsen 82d46148e2 test(loadbearing): measure the last 8 all-negative tests instead of assuming them
Point 2 of the vacuity sweep is now MEASURED, not paired-by-reading. Every
one of the 8 got a mutation that detaches the seam it claims to guard, run
through a harness that asserts the anchor is unique before mutating, restores
in `finally`, and sha256-verifies the restore.

Six were value-proven — the negative itself went RED under its detach:
  hitl :260  load_routing invents a default        -> RED
  hitl :298  route_pending hardcodes a fallback    -> RED
  step7 :145 the is_dir() guard deleted            -> RED
  step7 :171 the §4.2 vocabulary filter deleted    -> RED
  step7 :253 the id grammar off the model          -> RED
  prov  :111 sdk_version becomes required          -> RED

Two did not, and both are fixed here.

hitl :197 — the guard it appeared to prove is DEAD. Deleting the `is_dir()`
early-out from load_outbox_proposals leaves all 711 tests green: the tolerance
comes from `Path.glob`, which yields nothing on a missing directory and never
raises. The contrast is the finding: load_inbox carries an identically-shaped
guard that IS load-bearing, because it walks with `Path.iterdir`, which DOES
raise (measured both ways). Same guard, opposite verdict, and the difference
is the stdlib call behind it — the point-3 lesson one level out, where the
default being pinned belongs to the standard library rather than the SDK.
The stdlib baseline is now anchored explicitly, so a Python that makes glob
raise turns this red instead of quietly promoting a dead line to a seam.
What the test always did prove is kept and stated: replacing the early-out
with a raise turns it red, so it does hold tolerance.

portfolio :175 — the negative asserted over an unheld population. Measured, it
is real today (6 prompts), so the test is not vacuous now; nothing in it says
so, and a run_portfolio that stopped prompting would leave it green while
proving nothing. A positive control now runs first. Value-proven: green before,
red after the same mutation (iterate no projects), and it is that assertion
which fails, not an import.

The sibling repo sent the same rule from the other stack this week, arrived at
independently via its B4 empty-negative: on a negative assert, prove FIRST that
the event happened.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qr6TwWrHDHeukHy3bL4hgb
2026-08-09 10:08:12 +02:00
..
data feat(portfolio): K11 — per-run value report, pure projection over the three layers (parity row 25) [skip-docs] 2026-07-25 06:25:02 +02:00
_scripted.py feat(loop): S8 — D7 agentic loop: budget meter, maker-checker gate, informed refinement 2026-07-03 07:21:02 +02:00
test_budget.py feat(portfolio): C3.5 — pre-call run-total USD budget belt (parity row 16/31) [skip-docs] 2026-07-23 22:45:37 +02:00
test_bygg_energi_mikro.py feat(validator): S6 — deterministic backbone: typed IR, golden-frozen validator, provenance stamp 2026-07-03 06:27:40 +02:00
test_checker_gate_loadbearing.py feat(loop): S8 — D7 agentic loop: budget meter, maker-checker gate, informed refinement 2026-07-03 07:21:02 +02:00
test_cli_paritet_loadbearing.py test(loadbearing): positive controls for three measured-vacuous negatives 2026-08-01 20:24:58 +02:00
test_contracts.py feat(portfolio): K2 — sequential multi-project run (parity row 4) 2026-07-23 21:39:39 +02:00
test_costsim.py test(loadbearing): positive controls for the static-guard half of the sibling-vacuity class 2026-08-01 20:01:21 +02:00
test_dry_run_loadbearing.py feat(portfolio): K8 — live-run drill, pre-call artifact capture (parity row 21) [skip-docs] 2026-07-24 06:54:58 +02:00
test_goals.py feat(ledger): K1 — savings ledger + goal contract (parity rows 2-3) 2026-07-17 04:00:14 +02:00
test_hitl_loadbearing.py test(loadbearing): measure the last 8 all-negative tests instead of assuming them 2026-08-09 10:08:12 +02:00
test_ingest.py chore(deps): re-pin llm-ingestion-okf to v0.3.1 + migrate tests to stable error codes 2026-07-20 07:22:09 +02:00
test_ingest_adoption.py chore(deps): re-pin llm-ingestion-okf to v0.3.1 + migrate tests to stable error codes 2026-07-20 07:22:09 +02:00
test_ingest_golden.py feat(ingest): I3 — D7-speil av ingest (filkatalog/CSV), bygget fra commons-spec alene 2026-07-04 06:12:43 +02:00
test_ingest_loadbearing.py test(loadbearing): positive controls for the vacuous-negative class 2026-07-31 21:15:57 +02:00
test_ingest_spec_loadbearing.py test(loadbearing): positive controls for the static-guard half of the sibling-vacuity class 2026-08-01 20:01:21 +02:00
test_ingest_sql.py chore(deps): re-pin llm-ingestion-okf to v0.3.1 + migrate tests to stable error codes 2026-07-20 07:22:09 +02:00
test_ingest_sql_golden.py feat(ingest): I5 — SQL D7-speil, bygget fra commons-spec alene 2026-07-04 07:18:59 +02:00
test_ingest_sql_loadbearing.py feat(ingest): adopt llm-ingestion-okf as Door A implementation (first consumer) 2026-07-16 20:46:51 +02:00
test_ir.py fix(validator): C2.6 — finiteness hardening, Infinity can no longer vacuously clear the gate (closes R-2) 2026-07-16 20:10:12 +02:00
test_ledger_loadbearing.py fix(ledger): normalize every load rejection to ValueError at the ledger's own entrance 2026-07-25 15:29:27 +02:00
test_loop.py test(loadbearing): close the vacuous-negative class across the whole suite 2026-07-31 21:39:28 +02:00
test_method_spec_loadbearing.py test(loadbearing): positive controls for the static-guard half of the sibling-vacuity class 2026-08-01 20:01:21 +02:00
test_notify_loadbearing.py test(loadbearing): positive controls for the static-guard half of the sibling-vacuity class 2026-08-01 20:01:21 +02:00
test_notify_seam_loadbearing.py feat(portfolio): K10 — notification/notifier seam, opt-in webhook egress (parity row 23) [skip-docs] 2026-07-24 20:16:56 +02:00
test_okf.py test(loadbearing): positive controls for the static-guard half of the sibling-vacuity class 2026-08-01 20:01:21 +02:00
test_outbox_loadbearing.py feat(portfolio): K5 — outbox persistence, run_id-named pairs (parity row 7) [skip-docs] 2026-07-23 22:31:18 +02:00
test_persona_skill_loadbearing.py feat(learning): S9 — D7 læringssløyfe: verdict-inbox, fail-closed promoteringsgate, artefakt-sourced persona 2026-07-03 07:36:15 +02:00
test_portfolio.py feat(portfolio): K2 — sequential multi-project run (parity row 4) 2026-07-23 21:39:39 +02:00
test_portfolio_learning_loadbearing.py test(loadbearing): measure the last 8 all-negative tests instead of assuming them 2026-08-09 10:08:12 +02:00
test_preflight.py test(loadbearing): positive controls for the static-guard half of the sibling-vacuity class 2026-08-01 20:01:21 +02:00
test_provenance.py feat(validator): S6 — deterministic backbone: typed IR, golden-frozen validator, provenance stamp 2026-07-03 06:27:40 +02:00
test_provenance_sdk_version_loadbearing.py feat(run): stamp the drill's SDK build in the dry-run run-config [skip-docs] 2026-07-25 15:35:16 +02:00
test_run_entrance_loadbearing.py test(loadbearing): close the vacuous-negative class across the whole suite 2026-07-31 21:39:28 +02:00
test_s10_run_layer.py test(loadbearing): close the vacuous-negative class across the whole suite 2026-07-31 21:39:28 +02:00
test_sdk_isolation.py test(loadbearing): positive controls for three measured-vacuous negatives 2026-08-01 20:24:58 +02:00
test_sdk_version_guard.py test(loadbearing): close the vacuous-negative class across the whole suite 2026-07-31 21:39:28 +02:00
test_simulation_loadbearing.py test(loadbearing): close the vacuous-negative class across the whole suite 2026-07-31 21:39:28 +02:00
test_step1_expel_loadbearing.py test(loadbearing): close the vacuous-negative class across the whole suite 2026-07-31 21:39:28 +02:00
test_step5_refine_loadbearing.py test(loadbearing): close the vacuous-negative class across the whole suite 2026-07-31 21:39:28 +02:00
test_step7_async_loop_loadbearing.py test(loadbearing): close the vacuous-negative class across the whole suite 2026-07-31 21:39:28 +02:00
test_step8_promotion_loadbearing.py test(loadbearing): close the vacuous-negative class across the whole suite 2026-07-31 21:39:28 +02:00
test_validator.py fix(validator): C2.6 — finiteness hardening, Infinity can no longer vacuously clear the gate (closes R-2) 2026-07-16 20:10:12 +02:00
test_valuereport_loadbearing.py test(loadbearing): close the vacuous-negative class across the whole suite 2026-07-31 21:39:28 +02:00
test_valuereport_seam_loadbearing.py feat(portfolio): K11 — per-run value report, pure projection over the three layers (parity row 25) [skip-docs] 2026-07-25 06:25:02 +02:00