docs(6209): wide net, startup, stamps, slippage, miss route and parity tests
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 15s
CI & Build / TypeScript typecheck (push) Successful in 53s
CI & Build / integration (push) Successful in 1m10s
CI & Build / Build & push image (push) Canceled after 0s
CI & Build / Python tests (push) Canceled after 1m23s

Eight more test files state the property they pin as a present-tense
fact. Incident narratives (a dated storage stall, a week of zero tuning
events, a two-project poisoned ledger, a twenty-site owner audit) become
the failure shape each test defends; one-install figures that name a rule
become a general worked example with the calibration numbers kept. The
family-grouping regression guard is renamed for what it checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 21:27:17 -04:00
co-authored by Claude Opus 5.5
parent d41e72d26c
commit ff08500128
8 changed files with 154 additions and 196 deletions
+17 -20
View File
@@ -1,4 +1,4 @@
"""Which rules fired this session, which changed an action, which did not (#4216).
"""Which rules fired this session, which changed an action, which did not.
WHY THIS CANNOT BE ASKED OF THE SERVER
@@ -7,13 +7,13 @@ a SESSION-scoped answer has to be assembled where a session is a thing that
exists. That is the plugin, from four ledgers four hooks already write:
.rules.ids an arm NAMED the rule (a teaser was shown)
.opened.ids the session called get_rule (#4100)
.acted.ids the session called rule_outcome (#4216, new here)
.checkpoint.ids the rule HELD an act (#4214)
.opened.ids the session called get_rule
.acted.ids the session called rule_outcome
.checkpoint.ids the rule HELD an act
EVERY LINE IS AN OBSERVED TOOL CALL. Nothing asks the model what it followed;
milestone 386 ruled that out because a model asked "did you apply rule 156?"
will say yes. These record what happened.
EVERY LINE IS AN OBSERVED TOOL CALL. Nothing asks the model what it followed,
because a model asked "did you apply rule 156?" will say yes. These record
what happened.
WHY THE COMPACTION SEAM
@@ -21,8 +21,8 @@ A rule read and left unresolved is invisible by construction — it looks
exactly like a rule that worked. The compaction is where that invisibility
becomes permanent: the turns holding the evidence are summarised away, and an
unjudged thing that survives as nothing is how a decision quietly becomes
nobody's. A PreCompact hook's stdout becomes the summariser's instructions
(#3680), so this does not say "you slipped" — it says which ids must be
nobody's. A PreCompact hook's stdout becomes the summariser's instructions,
so this does not say "you slipped" — it says which ids must be
carried through, which is the one thing a summary can do about it.
WHAT IS PINNED: the arithmetic, and which conditions produce which lines. NOT
@@ -63,8 +63,7 @@ def ledgers(tmp_path, *, named=(), opened=(), acted=(), held=()) -> Path:
Not hand-rolled files: `scribe_rules_append` is what creates the evidence
twin these read from, so a fixture that wrote the bytes itself would keep
passing if the twin stopped being written — which is the whole defect
#4217 found.
passing if the twin stopped being written.
"""
d = tmp_path / "scribe-priorart"
d.mkdir(parents=True, exist_ok=True)
@@ -140,7 +139,7 @@ def test_a_rule_read_with_no_outcome_is_the_headline(tmp_path):
def test_a_rule_that_held_an_act_is_reported_separately(tmp_path):
"""The strongest evidence a rule changed something: it stopped a call
before it ran (#4214). Kept apart from `read` because reading a rule and
before it ran. Kept apart from `read` because reading a rule and
having it alter what you did are different claims."""
out = readout(ledgers(tmp_path, named=[156], opened=[156], held=[156]))
assert "held an act" in out and "156" in out
@@ -158,7 +157,7 @@ def test_a_session_that_resolved_everything_makes_no_accusation(tmp_path):
def test_a_session_no_rule_touched_says_nothing_at_all(tmp_path):
"""Rule 115's reasoning: a fresh install must not be told something is
"""A fresh install must not be told something is
wrong when the truth is that nothing has happened yet."""
d = tmp_path / "scribe-priorart"
d.mkdir(parents=True)
@@ -256,14 +255,12 @@ def test_the_recorder_is_shell_valid():
subprocess.run(["bash", "-n", str(RECORDER)], check=True)
# ── Evidence outlives the compaction; exclusions do not (#4217) ────────────
# ── Evidence outlives the compaction; exclusions do not ───────────────────
#
# THE DEFECT THIS PINS, measured before it was fixed: across six sessions on
# the instance this was built on, 208 `get_rule` calls produced 3 surviving
# ledger entries. `.opened.ids` was doing two jobs with opposite lifetimes —
# "this context holds the rule" (must be forgotten at a compaction, and three
# hooks depend on that) and "this was opened" (which no compaction makes
# untrue). The sweep, correct for the first, was deleting the second.
# Two jobs with opposite lifetimes: "this context holds the rule" (must be
# forgotten at a compaction, and three hooks depend on that) and "this was
# opened" (which no compaction makes untrue). One ledger doing both loses
# nearly every opened rule to the sweep, which is correct only for the first.
def test_the_readout_is_unchanged_by_the_sweep(tmp_path):
"""The readout runs AT the compaction. If the sweep took its inputs it