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:
parent
058dd25570
commit
37547fe292
1147 changed files with 24138 additions and 9503 deletions
|
|
@ -1048,7 +1048,7 @@ def test_m8_an_attestation_that_is_not_utf8_is_red_because_it_is_unreadable(
|
|||
|
||||
|
||||
def test_m8_the_output_says_the_stress_row_needs_the_untracked_scratchpad() -> None:
|
||||
"""Finding 7: row 7's 1 of 20 stands on ``scratchpad/`` being present. Without it the row is
|
||||
"""Finding 7: rows 6-7 stand on ``scratchpad/`` being present. Without it the row is
|
||||
NOT MEASURED, and that dependency is a fact about the checkout, not about the product."""
|
||||
assert "scratchpad" in gate.STRESS_DEPENDENCY and "IKKE MÅLT" in gate.STRESS_DEPENDENCY
|
||||
rows = gate.evaluate(
|
||||
|
|
@ -1354,31 +1354,31 @@ def test_row7_not_measured_is_not_green_either() -> None:
|
|||
|
||||
|
||||
def test_row6_measures_the_stress_outboxes_when_they_exist(tmp_path: Path) -> None:
|
||||
"""Against the real artefacts when this machine has them; otherwise the absence is named."""
|
||||
"""Against the real artefacts when this machine has them; otherwise the absence is named.
|
||||
|
||||
The numbers this arm used to pin (15 validated, 15 undeclared, 5 own proposals, 1 named, 20
|
||||
commissioned) were stress round 6's, on context sets this repository no longer carries. No paid
|
||||
round has been run on the three example sets, so the ABSENT half is what runs today — and it
|
||||
runs everywhere, because the knowledge bases now ship with the package and only the outboxes
|
||||
can be missing. The PRESENT half pins the denominator a round on the example sets will be
|
||||
judged against, never a result nobody has measured.
|
||||
"""
|
||||
evidence = _CONFIG["stress_evidence"]
|
||||
root = _REPO / evidence["root"]
|
||||
bundles = frozen_bundles.store_root()
|
||||
if not root.is_dir() or not bundles.is_dir():
|
||||
m = gate.measure_stress(evidence, _REPO, tmp_path / "absent", None)
|
||||
assert m.missing and m.validated == 0
|
||||
pytest.skip(f"stress artefacts not mounted ({root}, {bundles})")
|
||||
assert frozen_bundles.store_root().is_dir(), "the example bases ship with the package"
|
||||
absent = gate.measure_stress(evidence, _REPO, tmp_path / "absent", None)
|
||||
assert absent.missing and absent.validated == 0 and not absent.drift
|
||||
assert "serverrom-2027" in absent.missing, absent.missing
|
||||
row = gate.score_undeclared(_PROBES, _all_pass(_PROBES), absent, "s")
|
||||
assert (row.k, row.status) == (None, gate.NOT_MEASURED)
|
||||
if not root.is_dir():
|
||||
pytest.skip(f"no stress round on the example sets on this machine ({root})")
|
||||
m = gate.measure_stress(evidence, _REPO, root, None)
|
||||
if m.missing:
|
||||
# The mount belongs to another repository and can be mid-rebuild; the gate then says
|
||||
# "ikke målt", which test_row6_missing_artefacts_are_never_zero already pins.
|
||||
assert m.validated == 0
|
||||
pytest.skip(f"stress artefacts not judgeable right now: {m.missing}")
|
||||
# 10 commissioned + 5 of the runs' own proposals (M-3).
|
||||
assert (m.validated, m.undeclared, m.own_validated, m.named, m.commissioned) == (
|
||||
15,
|
||||
15,
|
||||
5,
|
||||
1,
|
||||
20,
|
||||
)
|
||||
assert m.unaddressed > 0 # stress round 6 predates approach-addressed declarations
|
||||
row = gate.score_undeclared(_PROBES, _all_pass(_PROBES), m, "s")
|
||||
assert (row.k, row.status) == (None, gate.NOT_MEASURED)
|
||||
# Three sets of four approaches; the two-base set is judged per base, two rows each.
|
||||
assert (m.commissioned, m.rows) == (12, 12)
|
||||
|
||||
|
||||
def test_row7_is_a_diagnosis_and_never_moves_the_exit_code() -> None:
|
||||
|
|
@ -1467,7 +1467,7 @@ def test_the_command_is_red_today_with_every_row_in_its_output(tmp_path: Path) -
|
|||
assert (rows["types"]["k"], rows["types"]["n"]) == (3, 8)
|
||||
assert rows["kept"]["status"] == gate.RED
|
||||
assert (rows["maf"]["k"], rows["maf"]["n"], rows["maf"]["status"]) == (3, 8, gate.RED)
|
||||
# Probes green since row 6; stress round 6 predates the rule (or is absent) -> never green.
|
||||
# Probes green since row 6; no stress round on the example sets exists -> never green.
|
||||
assert rows["undeclared"]["status"] == gate.NOT_MEASURED
|
||||
assert rows["undeclared"]["k"] is None
|
||||
assert rows["named"]["failing"] is False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue