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
|
|
@ -44,9 +44,9 @@ _ENERGY_DIM = Dimension(
|
|||
)
|
||||
_VERDICT_INPUT = {"decision": "approved", "rationale": "expert reviewed (sim)"}
|
||||
|
||||
# A marker that appears ONLY in the asfalt-marked concept file's body, so it can reach the prompt
|
||||
# A marker that appears ONLY in the lisens-marked concept file's body, so it can reach the prompt
|
||||
# solely through un-filtered context — its presence/absence is the §4.1a leak probe.
|
||||
_ASFALT_SENTINEL = "ASFALT-LEAK-SENTINEL-x7y8z9"
|
||||
_LISENS_SENTINEL = "LISENS-LEAK-SENTINEL-x7y8z9"
|
||||
|
||||
|
||||
def _valid_reply(measure: str, code: str) -> str:
|
||||
|
|
@ -80,7 +80,7 @@ async def test_foreign_dimension_candidate_rejected_when_dimension_set() -> None
|
|||
that has nothing to do with the dimension, and this arm would have ridden on that instead of on
|
||||
``admits``. Only the MEASURE is foreign now, which is what §4.1b is about."""
|
||||
factory = _role_factory(
|
||||
_valid_reply("paving_renegotiation", "ENERGI-TOTAL-EL"), "VERDICT: APPROVE"
|
||||
_valid_reply("licence_renegotiation", "ENERGI-TOTAL-EL"), "VERDICT: APPROVE"
|
||||
)
|
||||
|
||||
result = await run_project(
|
||||
|
|
@ -125,19 +125,19 @@ async def test_in_dimension_candidate_passes() -> None:
|
|||
# --- Context scope (§4.1a) -----------------------------------------------------------------------
|
||||
|
||||
|
||||
def _bundle_with_asfalt_file(tmp_path: Path) -> str:
|
||||
"""A throwaway copy of the shared bundle with one extra asfalt-marked concept file carrying the
|
||||
def _bundle_with_lisens_file(tmp_path: Path) -> str:
|
||||
"""A throwaway copy of the shared bundle with one extra lisens-marked concept file carrying the
|
||||
sentinel in its body, linked from the index so ``navigate_bundle`` reaches it. The shared,
|
||||
framework-neutral fixture is never mutated (mirrors ``_copy_bundle``)."""
|
||||
dst = tmp_path / "bundle"
|
||||
shutil.copytree(BUNDLE_DIR, dst)
|
||||
(dst / "asfalt-note.md").write_text(
|
||||
f"---\ntype: methodology\ndimension: asfalt\n---\n\n{_ASFALT_SENTINEL} — paving method note\n",
|
||||
(dst / "lisens-note.md").write_text(
|
||||
f"---\ntype: methodology\ndimension: lisens\n---\n\n{_LISENS_SENTINEL} — licence method note\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
index = dst / "index.md"
|
||||
index.write_text(
|
||||
index.read_text(encoding="utf-8") + "\n- [asfalt](asfalt-note.md)\n", encoding="utf-8"
|
||||
index.read_text(encoding="utf-8") + "\n- [lisens](lisens-note.md)\n", encoding="utf-8"
|
||||
)
|
||||
return str(dst)
|
||||
|
||||
|
|
@ -194,20 +194,20 @@ async def test_dimension_scopes_the_agent_context(tmp_path) -> None:
|
|||
Asserts on the FILE NAME rather than the body sentinel, because a listing carries names and
|
||||
sizes, never bodies — an assert on the sentinel would be green against every implementation
|
||||
and would prove nothing (the vacuous form this repo keeps measuring)."""
|
||||
bundle_dir = _bundle_with_asfalt_file(tmp_path)
|
||||
bundle_dir = _bundle_with_lisens_file(tmp_path)
|
||||
|
||||
scoped = await _listing_the_debate_can_see(bundle_dir, _ENERGY_DIM)
|
||||
assert "asfalt-note.md" not in scoped, (
|
||||
assert "lisens-note.md" not in scoped, (
|
||||
"another dimension's document is listed to the agents — the tools are not dimension-scoped"
|
||||
)
|
||||
|
||||
|
||||
async def test_no_dimension_leaves_context_unscoped(tmp_path) -> None:
|
||||
"""CAUSALITY CONTROL: with ``dimension=None`` the asfalt document IS listed — proving its
|
||||
"""CAUSALITY CONTROL: with ``dimension=None`` the lisens document IS listed — proving its
|
||||
absence above is caused by the dimension scope, not by the file being unreachable."""
|
||||
bundle_dir = _bundle_with_asfalt_file(tmp_path)
|
||||
bundle_dir = _bundle_with_lisens_file(tmp_path)
|
||||
|
||||
unscoped = await _listing_the_debate_can_see(bundle_dir, None)
|
||||
assert "asfalt-note.md" in unscoped, (
|
||||
"the asfalt file is unreachable even without a filter — the control does not prove causality"
|
||||
assert "lisens-note.md" in unscoped, (
|
||||
"the lisens file is unreachable even without a filter — the control does not prove causality"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue