refactor(examples): replace sector-specific example material with generic, fictitious examples

The context sets, the packaged knowledge bases and the example bundles are
replaced by one fictitious example set about IT operations in an invented
organisation: three context sets (serverrom-2027, driftsavtale-2027 and the
two-base drift-og-avtale-2027), two synthetic knowledge bases under
src/portfolio_optimiser/data/kunnskapsbaser and two example bundles under
src/portfolio_optimiser/data/bundles. Numbers, codes and structural values in
tests and fixtures are kept; names, ids and wording change. Dated measurement
documents that only recorded runs on the replaced material are deleted.

Gate figures measured on the new set are not comparable with earlier ones.
The exclusion gate from the previous commit is green: 0 tracked files hit
outside the shared/ subtree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-09-23 15:04:21 +02:00
commit 37547fe292
Signed by: ktg
SSH key fingerprint: SHA256:JakMjO6FTBBzN0Bhfj9saOoEjaFxlSdYuZQQpM/lF9Q
1147 changed files with 24138 additions and 9503 deletions

View file

@ -50,7 +50,7 @@ def _features(
codes: frozenset[str] = frozenset({"05.2", "03.1"}),
measure_type: str = "scope_reduction",
saving: float = 220_000.0,
description: str = "asphalt base course reduction near school",
description: str = "licence scope reduction near head office",
) -> types.SimpleNamespace:
"""Duck-typed stand-in for ``ProposalFeatures`` — semretrieval never imports ``verdicts``
at runtime, so the unit tests do not need the real (MAF-bound) type either."""
@ -134,7 +134,7 @@ def test_fake_embedder_is_bit_stable_across_processes(tmp_path: Path) -> None:
" affected_codes=frozenset({'05.2', '03.1'}),\n"
" measure_type='scope_reduction',\n"
" claimed_saving_nok=220000.0,\n"
" description='asphalt base course reduction near school',\n"
" description='licence scope reduction near head office',\n"
")\n"
f"np.save({str(there)!r}, FakeEmbedder()(f))\n"
)
@ -197,7 +197,7 @@ _QUERY = ProposalFeatures(
affected_codes=frozenset({"05.2", "03.1"}),
measure_type="scope_reduction",
claimed_saving_nok=220_000, # bucket [100k, 500k)
description="asphalt base course reduction near school",
description="licence scope reduction near head office",
)
@ -222,7 +222,7 @@ def _store_with_true_match_and_decoys() -> tuple[VerdictStore, str]:
affected_codes=frozenset({"09.1"}),
measure_type="rate_renegotiation",
claimed_saving_nok=50_000,
description="asphalt base course reduction near school",
description="licence scope reduction near head office",
),
decision="rejected",
rationale="surface-text decoy",
@ -233,7 +233,7 @@ def _store_with_true_match_and_decoys() -> tuple[VerdictStore, str]:
affected_codes=frozenset({"21.2"}),
measure_type="material_substitution",
claimed_saving_nok=700_000,
description="asphalt base course reduction extra words",
description="licence scope reduction extra words",
),
decision="rejected",
rationale="surface-text decoy",