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

@ -72,14 +72,14 @@ _PORTFOLIO_DEFAULT_REPLY = (
def _anchored_default_replies() -> dict[str, str]:
"""A VALID default proposal PER reference project, quoting that project's OWN first cost line
verbatim (S4.0): since the road path anchors the validator to ``project.cost_items``, a generic
verbatim (S4.0): since the reference path anchors the validator to ``project.cost_items``, a generic
reply carrying an invented magnitude for code ``01.1`` is now — correctly — rejected as a
fabricated cost line. Anchoring the fixture is the fix; weakening the gate is not.
``claimed_saving_nok`` stays ``20_000`` for every project, exactly as the single generic reply
claimed before, so every ledger/goal/budget assertion built on that figure is unchanged. Each
project's first line is ``01.1 Rigg og drift`` at >= 480 000 NOK, so P90 (>= 144 000) clears the
claim on every project."""
project's first line is code ``01.1`` (project management and operations, a lump sum) at
>= 480 000 NOK, so P90 (>= 144 000) clears the claim on every project."""
replies: dict[str, str] = {}
for project in load_reference_projects():
line = project.cost_items[0]
@ -190,7 +190,7 @@ def docs_dir(tmp_path) -> str:
d = tmp_path / "docs"
d.mkdir()
(d / "cost.txt").write_text(
"Asphalt Ab11 unit rate renegotiation reduced the paving cost on the school stretch.",
"Licence unit price renegotiation reduced the office-suite cost for the head office.",
encoding="utf-8",
)
return str(d)