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

@ -62,8 +62,9 @@ from portfolio_optimiser import explore, okf
from portfolio_optimiser.explore import navigator_tools
_EXAMPLES = Path(__file__).resolve().parents[1] / "shared" / "examples"
#: The largest FLAT base shipped - the one the MAJOR-3 gate bounds.
_TUNNEL = _EXAMPLES / "tunnel-hauglia"
_BUNDLES = Path(__file__).resolve().parents[1] / "src" / "portfolio_optimiser" / "data" / "bundles"
#: The largest FLAT example base the package ships - the one the MAJOR-3 gate bounds.
_KJOLING = _BUNDLES / "driftssenter-kjoling"
#: The only NESTED base shipped, and it is tiny: three levels, six concepts. It proves the shape is
#: read correctly; it cannot prove the shape pays for itself, which is what arm (b) is for.
_NESTED = _EXAMPLES / "nav-golden-hierarchy" / "bundle"
@ -140,8 +141,8 @@ def test_a_flat_base_lists_exactly_what_it_listed_before() -> None:
"""(a) The order names this one explicitly. Every base shipped in this repo except one is flat,
and the whole MAJOR-3 measurement was taken over them: if the new rung changed what a flat base
answers, this change would be a rewrite of that result rather than a level above it."""
bundle = okf.navigate_bundle(str(_TUNNEL))
listing = _read_bundle(_TUNNEL)
bundle = okf.navigate_bundle(str(_KJOLING))
listing = _read_bundle(_KJOLING)
assert listing["documents"] == [_entry(f, f.name) for f in bundle.context_files]
assert listing["directories"] == [], "a flat base has no subdirectories to report"
@ -255,10 +256,10 @@ def test_the_whole_document_is_still_one_call_away() -> None:
"""(f) The bound is a disclosure LEVEL, not data loss - MAJOR-3's arm (e), re-asserted over the
new shape because a listing that no longer names documents the way ``read_file`` takes them
would have broken the ladder while every cost arm stayed green."""
listing = _read_bundle(_TUNNEL)
listing = _read_bundle(_KJOLING)
biggest = max(listing["documents"], key=lambda e: int(e["chars"]))
whole = _tools(_TUNNEL)["read_file"].func(bundle_id=_TUNNEL.name, path=str(biggest["name"]))
whole = _tools(_KJOLING)["read_file"].func(bundle_id=_KJOLING.name, path=str(biggest["name"]))
assert len(whole) > _CEILING_CHARS
assert int(biggest["chars"]) <= len(whole)