test: neutral names for the reference path and the office-IT baseline

Rename the reference-project helpers and test names (_reference_k,
test_reference_path_*) and the cost-baseline helper (_kontor_it_baseline,
which already returned KONTOR-IT-E1). Names only; no assertion changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-09-23 17:31:13 +02:00
commit 9cdbd57cf6
Signed by: ktg
SSH key fingerprint: SHA256:JakMjO6FTBBzN0Bhfj9saOoEjaFxlSdYuZQQpM/lF9Q
8 changed files with 25 additions and 22 deletions

View file

@ -59,7 +59,7 @@ _FAKE_UNIT_COST = 10_000_000.0
_FAKE_CLAIM = 3_000_000.0
def _fv42_baseline() -> CostBaseline:
def _kontor_it_baseline() -> CostBaseline:
return baseline_from_project(
next(p for p in load_reference_projects() if p.id == "KONTOR-IT-E1")
)
@ -83,7 +83,7 @@ def test_fabricated_cost_code_is_rejected() -> None:
rejected, even though its own arithmetic clears the LP/P90/nominal stages. Detach the
reconciliation stage and the SAME proposal validates."""
result = validate_proposal(
_proposal(_FAKE_CODE, 1.0, _FAKE_UNIT_COST, _FAKE_CLAIM), baseline=_fv42_baseline()
_proposal(_FAKE_CODE, 1.0, _FAKE_UNIT_COST, _FAKE_CLAIM), baseline=_kontor_it_baseline()
)
assert isinstance(result, Rejection), "a hallucinated cost code must never reach validated"
assert "unknown cost code" in result.reason
@ -95,7 +95,8 @@ def test_real_baseline_line_still_validates() -> None:
rejection above is caused by the code being absent from the baseline, not by the new stage
rejecting everything."""
result = validate_proposal(
_proposal(_REAL_CODE, _REAL_QTY, _REAL_UNIT_COST, _REAL_CLAIM), baseline=_fv42_baseline()
_proposal(_REAL_CODE, _REAL_QTY, _REAL_UNIT_COST, _REAL_CLAIM),
baseline=_kontor_it_baseline(),
)
assert isinstance(result, ValidatedProposal)
@ -117,7 +118,7 @@ def test_inflated_unit_cost_on_a_real_code_is_rejected() -> None:
line then validates, because the code itself is genuine."""
inflated = _REAL_UNIT_COST * 1.20
result = validate_proposal(
_proposal(_REAL_CODE, _REAL_QTY, inflated, _REAL_CLAIM), baseline=_fv42_baseline()
_proposal(_REAL_CODE, _REAL_QTY, inflated, _REAL_CLAIM), baseline=_kontor_it_baseline()
)
assert isinstance(result, Rejection)
assert "unit_cost" in result.reason and _REAL_CODE in result.reason
@ -127,7 +128,7 @@ def test_inflated_quantity_on_a_real_code_is_rejected() -> None:
"""RED: the same for quantity — a real code at an invented quantity (+20%) is rejected."""
result = validate_proposal(
_proposal(_REAL_CODE, _REAL_QTY * 1.20, _REAL_UNIT_COST, _REAL_CLAIM),
baseline=_fv42_baseline(),
baseline=_kontor_it_baseline(),
)
assert isinstance(result, Rejection)
assert "quantity" in result.reason
@ -139,7 +140,7 @@ def test_within_tolerance_deviation_is_admitted() -> None:
at all."""
result = validate_proposal(
_proposal(_REAL_CODE, _REAL_QTY, _REAL_UNIT_COST * 1.02, _REAL_CLAIM),
baseline=_fv42_baseline(),
baseline=_kontor_it_baseline(),
)
assert isinstance(result, ValidatedProposal)
@ -149,7 +150,7 @@ def test_tolerance_is_configurable() -> None:
caller-supplied tolerance."""
result = validate_proposal(
_proposal(_REAL_CODE, _REAL_QTY, _REAL_UNIT_COST * 1.02, _REAL_CLAIM),
baseline=_fv42_baseline(),
baseline=_kontor_it_baseline(),
tolerance=0.001,
)
assert isinstance(result, Rejection)
@ -204,7 +205,9 @@ def _factory(reply: str):
return factory
async def test_road_path_anchors_the_gate_to_the_reference_baseline(docs_dir, fresh_store) -> None:
async def test_reference_path_anchors_the_gate_to_the_reference_baseline(
docs_dir, fresh_store
) -> None:
"""RED (reference wiring): a numerically-impeccable fabricated cost line is REJECTED end-to-end
through ``run_project``. Detach the reference-path baseline (stop passing it) and the same run
returns a ValidatedProposal."""
@ -220,7 +223,7 @@ async def test_road_path_anchors_the_gate_to_the_reference_baseline(docs_dir, fr
assert "unknown cost code" in result.outcome.reason
async def test_road_path_control_real_line_validates(docs_dir, fresh_store) -> None:
async def test_reference_path_control_real_line_validates(docs_dir, fresh_store) -> None:
"""Causality control for the reference wiring: the real 05.2 line validates through the same path."""
result = await run_project(
"KONTOR-IT-E1",