portfolio-optimiser/src/portfolio_optimiser
Kjell Tore Guttormsen 9eec31b7da
fix(b-gate): a probe is bound to its step, a reason cannot be empty, and the row's limit is what was measured [skip-docs]
Row 1 goes 3 of 17 -> 0 of 17. Nothing was removed from the product and no row
changed colour; the three that counted stopped counting because the contract they
satisfied was satisfiable without capability.

BEARING 1 -- the probe is bound to the step, and the binding is MEASURED in the
probe's own source. Chosen: read the probe (ast) rather than demand it live in a
contract-named file, because a file name is a convention a stub meets as easily as a
real probe. Three traits, each measured: it drives the DOOR (the dotted module or the
registered command name appears as a string it uses -- anywhere but a docstring,
because the honest form assembles argv in a variable first), it names the STEP (the
symbol, id or subcommand as a whole WORD in what it passes INTO a call or calls), and
it asserts at all. A probe claimed by two steps proves at most one and the gate cannot
tell which -- so neither.

Two traps found while measuring, both closed:
  - substring: "gate" is not named by portfolio_optimiser.evals.v1_gate
  - local alias: the first cut accepted step `gate` because the probe file imports the
    module AS `gate`. Names are therefore read only where they are sent or called.

What that costs, measured against the contract that stands:
  rundebinding  drives the door, names no step         (was green)
  rapport       never goes through the door at all     (was green)
  gate          drives the door, names no step         (was green)

BEARING 2 -- the limit statement said exactly TWO ways remained; the checkpoint
planted 21 call forms and measured SIX. Four are closed with a guard each (the
official Python SDK in both spellings, the node and uv runners, a dynamic import);
three remain and are now named: a runtime-composed name, a name from an environment
variable, a base64-decoded name. Left open deliberately -- the encodings are not
enumerable and our own contract stores base64 by design. Row 3: 9 of 9 -> 12 of 12,
still GREEN, 0 hits over 512 files. One of the three caught a command written in this
round's own test docstring; it was rewritten, not exempted.

BEARING 3 -- held_out accepted an EMPTY reason and shrank the denominator, while the
summary said "held out with a reason" either way. A blank reason is no reason: the
symbol stays in the denominator as a call without a door, the summary counts reasons,
and the four steps declared OUTSIDE the run path are now named one by one as having no
derived source instead of being counted in silence.

Five small rests, closed: a pruned manifest (451 of 512 was still GREEN) is now NOT
MEASURED, one sentinel per area the old handlist missed; a non-UTF-8 file is read as
byte text instead of counted and skipped; a symlink out of the tree is named and
fails the row; a runbook whose whole content is "x" no longer passes, the contract
names its sections; and the row states that its ratio is not a coverage measure.

Two stated, not closed, each with its reason in the row's own attestation: a po call
moved one floor down into a helper leaves the denominator (following helpers would
pull private ones in and make the denominator the curated list this row exists to
avoid), and row 3's k/n can still be padded by a guard with no measured escape behind
it. The ledger's two precision errors are corrected: "no row became greener" is true
of colour, not of numbers, and ENTRY_KINDS has three arts, not four.

Suite: 2172 passed, 5 skipped, 5 xfailed in 645 s. ruff and mypy clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 21:48:44 +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
evals fix(b-gate): a probe is bound to its step, a reason cannot be empty, and the row's limit is what was measured [skip-docs] 2026-09-19 21:48:44 +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(prepass): the debate is handed the declared cut and the navigator tools are withdrawn [skip-docs] 2026-09-07 11:10:54 +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 feat(row6): a proposal whose approach declared no requirement is unsupported 2026-09-17 16:40:54 +02:00
frozen_bundles.json test(frozen-pin): an added or removed file, and listing order, pinned by tests; drift named apart from missing 2026-09-18 18:49:54 +02:00
frozen_bundles.py feat(frozen-bundles): the measurements read a pinned copy, not another repo's build dir 2026-09-18 03:22:22 +02:00
generate.py feat(p20): the requirement that is RIGHT, and a clause number that is not a price 2026-09-15 06:02:46 +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(row6): a proposal whose approach declared no requirement is unsupported 2026-09-17 16:40:54 +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 fix(okf): close the inert ingest-stamp guard, then land okf 0.8.5 -- and read the block sources form all four bases actually write 2026-09-12 23:02:38 +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(row6): a proposal whose approach declared no requirement is unsupported 2026-09-17 16:40:54 +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(p22): a refusal names the DOCUMENTS when the ancestor has no subdirectories 2026-09-16 01:17:39 +02:00
outbox.py feat(row6): a proposal whose approach declared no requirement is unsupported 2026-09-17 16:40:54 +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
prepass.py feat(prepass): name the delivered excerpt nobody named, never refuse it [skip-docs] 2026-09-10 08:03:38 +02:00
proposal_review.py feat(major2): terminal proposal reviewer - text never repr, closed vocabulary, EOF is never a sign-off [skip-docs] 2026-09-05 06:59:54 +02:00
provenance.py feat(p19): a cost code must have a FORM where the input offers forms 2026-09-15 02:11:29 +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 feat(row6): a proposal whose approach declared no requirement is unsupported 2026-09-17 16:40:54 +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(p19): a direction must NAME the requirement that binds it, and have READ it 2026-09-15 01:21:47 +02:00
stress.py feat(frozen-bundles): the measurements read a pinned copy, not another repo's build dir 2026-09-18 03:22:22 +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(row6): a proposal whose approach declared no requirement is unsupported 2026-09-17 16:40:54 +02:00
value_report.py feat(s54): value_report text + deterministic JSON formatters 2026-07-24 01:29:31 +02:00
verdicts.py fix(v1-gate): row 2 binds a round to the run's own artefact family, and says out loud what it still cannot prove 2026-09-18 15:32:14 +02:00
workflow.py feat(fase3): make the maker-checker checker actually gate the reasoning 2026-06-30 07:24:30 +02:00