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
|
|
@ -16,7 +16,7 @@ from portfolio_optimiser.run import run_project
|
|||
from portfolio_optimiser.validator import Rejection, ValidatedProposal
|
||||
|
||||
_VALID = (
|
||||
'{"project_id":"FV42-GSV-E1","measure":"Reduce scope",'
|
||||
'{"project_id":"KONTOR-IT-E1","measure":"Reduce scope",'
|
||||
'"affected_items":[{"code":"05.2","quantity":4300,"unit_cost":215},'
|
||||
'{"code":"03.1","quantity":1800,"unit_cost":310}],"claimed_saving_nok":200000}'
|
||||
)
|
||||
|
|
@ -27,7 +27,7 @@ _VI = {"decision": "approved", "rationale": "feasible within range"}
|
|||
|
||||
async def test_a_valid_proposal_end_to_end(docs_dir, make_client_factory, fresh_store) -> None:
|
||||
result = await run_project(
|
||||
"FV42-GSV-E1",
|
||||
"KONTOR-IT-E1",
|
||||
"local",
|
||||
docs_dir=docs_dir,
|
||||
verdict_input=_VI,
|
||||
|
|
@ -48,7 +48,7 @@ async def test_a1_provenance_stamps_injected_client_model_not_sentinel(
|
|||
(SyntheticUsageChatClient.model == 'synthetic'), never the 'fake-model' literal — the leak
|
||||
falsified provenance on the public deployer seam (run.py:197)."""
|
||||
result = await run_project(
|
||||
"FV42-GSV-E1",
|
||||
"KONTOR-IT-E1",
|
||||
"local",
|
||||
docs_dir=docs_dir,
|
||||
verdict_input=_VI,
|
||||
|
|
@ -61,7 +61,7 @@ async def test_a1_provenance_stamps_injected_client_model_not_sentinel(
|
|||
|
||||
async def test_b_out_of_range_is_rejected(docs_dir, make_client_factory, fresh_store) -> None:
|
||||
result = await run_project(
|
||||
"FV42-GSV-E1",
|
||||
"KONTOR-IT-E1",
|
||||
"local",
|
||||
docs_dir=docs_dir,
|
||||
verdict_input={"decision": "rejected", "rationale": "claim too high"},
|
||||
|
|
@ -74,7 +74,7 @@ async def test_b_out_of_range_is_rejected(docs_dir, make_client_factory, fresh_s
|
|||
|
||||
async def test_c_layer2_verdict_is_persisted(docs_dir, make_client_factory, fresh_store) -> None:
|
||||
result = await run_project(
|
||||
"FV42-GSV-E1",
|
||||
"KONTOR-IT-E1",
|
||||
"local",
|
||||
docs_dir=docs_dir,
|
||||
verdict_input=_VI,
|
||||
|
|
@ -89,7 +89,7 @@ async def test_d_second_run_retrieves_prior_verdict(
|
|||
) -> None:
|
||||
factory = make_client_factory(_VALID)
|
||||
r1 = await run_project(
|
||||
"FV42-GSV-E1",
|
||||
"KONTOR-IT-E1",
|
||||
"local",
|
||||
docs_dir=docs_dir,
|
||||
verdict_input=_VI,
|
||||
|
|
@ -97,7 +97,7 @@ async def test_d_second_run_retrieves_prior_verdict(
|
|||
store=fresh_store,
|
||||
)
|
||||
r2 = await run_project(
|
||||
"FV42-GSV-E1",
|
||||
"KONTOR-IT-E1",
|
||||
"local",
|
||||
docs_dir=docs_dir,
|
||||
verdict_input=_VI,
|
||||
|
|
@ -113,7 +113,7 @@ async def test_e_tiny_budget_halts_without_exceeding(
|
|||
) -> None:
|
||||
with pytest.raises(BudgetExceeded):
|
||||
await run_project(
|
||||
"FV42-GSV-E1",
|
||||
"KONTOR-IT-E1",
|
||||
"local",
|
||||
docs_dir=docs_dir,
|
||||
verdict_input=_VI,
|
||||
|
|
@ -143,7 +143,7 @@ async def test_wiring_budget_middleware_and_retrieval_tool(
|
|||
|
||||
monkeypatch.setattr(run_mod, "fresh_workflow", spy_fresh)
|
||||
await run_project(
|
||||
"FV42-GSV-E1",
|
||||
"KONTOR-IT-E1",
|
||||
"local",
|
||||
docs_dir=docs_dir,
|
||||
verdict_input=_VI,
|
||||
|
|
@ -174,7 +174,7 @@ async def test_g_validated_proposal_derives_from_debate(
|
|||
|
||||
monkeypatch.setattr(run_mod, "generate_via_llm", spy_generate)
|
||||
result = await run_project(
|
||||
"FV42-GSV-E1",
|
||||
"KONTOR-IT-E1",
|
||||
"local",
|
||||
docs_dir=docs_dir,
|
||||
verdict_input=_VI,
|
||||
|
|
@ -205,7 +205,7 @@ async def test_h_tiny_budget_halts_via_debate_middleware(
|
|||
monkeypatch.setattr(run_mod, "generate_via_llm", _forbidden)
|
||||
with pytest.raises(BudgetExceeded):
|
||||
await run_project(
|
||||
"FV42-GSV-E1",
|
||||
"KONTOR-IT-E1",
|
||||
"local",
|
||||
docs_dir=docs_dir,
|
||||
verdict_input=_VI,
|
||||
|
|
@ -227,7 +227,7 @@ async def test_i_injected_meter_is_used(docs_dir, make_client_factory) -> None:
|
|||
|
||||
factory = make_client_factory(_VALID)
|
||||
baseline = await run_project(
|
||||
"FV42-GSV-E1",
|
||||
"KONTOR-IT-E1",
|
||||
"local",
|
||||
docs_dir=docs_dir,
|
||||
verdict_input=_VI,
|
||||
|
|
@ -237,7 +237,7 @@ async def test_i_injected_meter_is_used(docs_dir, make_client_factory) -> None:
|
|||
injected = TokenMeter(Budget(max_tokens=100_000, max_rounds=max(3 * 4, 4)))
|
||||
injected.charge(pre_charged)
|
||||
result = await run_project(
|
||||
"FV42-GSV-E1",
|
||||
"KONTOR-IT-E1",
|
||||
"local",
|
||||
docs_dir=docs_dir,
|
||||
verdict_input=_VI,
|
||||
|
|
@ -260,7 +260,7 @@ async def test_f_malformed_contract_raises_before_any_chat(docs_dir, make_client
|
|||
|
||||
with pytest.raises(ValidationError):
|
||||
await run_project(
|
||||
"FV42-GSV-E1",
|
||||
"KONTOR-IT-E1",
|
||||
"local",
|
||||
docs_dir=docs_dir,
|
||||
verdict_input=_VI,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue