T10: gate review and first compression pass
All four gate criteria met. False Adaptation Rate 0/7 with 12 of 13 mechanical mutations absorbed. 178 tests pass. TD-WP-0002 finished. Fitness loop closed via F-0003: actor isolation was a property of scenarios written to expose it, not of runs. Actors now carry an automatic private marker and the runner examines all of them on every scenario, with two permanent regressions behind it. Compression - six abstractions removed, each declared and never used: Verdict.SUSPICIOUS (a verdict no oracle could emit), Step.expect_refusal, ActorIsolationError, World.seed, EvidencePack.latest, Trajectory.method. F-0008: Temperature may be redundant. Crystallization was built without it ever being consulted; measured stability of realization did the work, and is observed rather than declared. Gated for removal alongside energy.py. INTENT_CHANGED and REALIZATION_FAILED had never run. Both now have purpose-built cases and a test that fails if a seventh outcome is added without one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: opus Assistant-Process: 1629012@bnt-lap001 Assistant-Session: 78d4fb13-8a1e-474b-87a3-9b9261c49a39
This commit is contained in:
parent
4f4219d8f7
commit
1b9860a8ee
40 changed files with 1074 additions and 46 deletions
|
|
@ -56,6 +56,24 @@ class Runner:
|
|||
|
||||
# -- independence guards ---------------------------------------------
|
||||
|
||||
def _isolation_violations(self) -> list[str]:
|
||||
"""Does any actor hold another's canary?
|
||||
|
||||
Run on every scenario, not only on ones written to test isolation.
|
||||
"""
|
||||
canaries = {actor.canary: actor.id for actor in self._world.cast}
|
||||
violations: list[str] = []
|
||||
for actor in self._world.cast:
|
||||
for key in actor.known_keys():
|
||||
value = actor.recall(key)
|
||||
owner = canaries.get(value) if isinstance(value, str) else None
|
||||
if owner is not None and owner != actor.id:
|
||||
violations.append(
|
||||
f"actor {actor.id!r} holds the private marker of {owner!r} "
|
||||
f"under key {key!r}"
|
||||
)
|
||||
return violations
|
||||
|
||||
def _assert_collector_independence(self, stratum: Stratum, collector: str) -> None:
|
||||
"""S2 and S3 evidence may never be attributed to an actor.
|
||||
|
||||
|
|
@ -111,6 +129,12 @@ class Runner:
|
|||
EnergyEvent(asset.id, run_id, EnergyEventType.EXECUTED).as_dict()
|
||||
)
|
||||
|
||||
isolation = self._isolation_violations()
|
||||
self._record(
|
||||
pack, Stratum.JUDGMENT, self._observer.name, "actor_isolation",
|
||||
{"violations": isolation, "actors": sorted(self._world.cast.actors)}, None,
|
||||
)
|
||||
|
||||
judgments: list[Judgment] = []
|
||||
scenario_sound = True
|
||||
claims_by_step: dict[str, list] = {}
|
||||
|
|
@ -166,7 +190,6 @@ class Runner:
|
|||
"action": step.action.name,
|
||||
"surface_used": realization.surface_id,
|
||||
"refused_by_sut": refused,
|
||||
"refusal_expected": step.expect_refusal,
|
||||
"postcondition_met": postcondition_met,
|
||||
},
|
||||
step.id,
|
||||
|
|
@ -176,7 +199,7 @@ class Runner:
|
|||
# An action that was accepted but did not take effect did happen —
|
||||
# and that is a statement about the system, judged below, not a
|
||||
# reason to stop judging.
|
||||
if refused and not step.expect_refusal:
|
||||
if refused:
|
||||
scenario_sound = False
|
||||
|
||||
# --- invariants after every step -----------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue