From 6963e7868d5be7f09e2eb2670004d7dc1a648a65 Mon Sep 17 00:00:00 2001 From: Shane Kidd <33380501+StarshipSuperjam@users.noreply.github.com> Date: Tue, 30 Jun 2026 09:54:17 -0700 Subject: [PATCH 1/2] Bound the boot collapse relay to the grounding reply (stop mid-session boilerplate) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The AI-facing collapse contract (D-269) told the assistant HOW to render a collapsed standing alarm but never bounded WHEN — so a session could re-staple the "(unchanged since last session)" framing onto an invented "boot check" / "before we start setup" preamble on a later, non-boot turn. That re-introduces exactly the habituation D-269 fights, one layer up at the relay, and leaks internal-machinery jargon into operator copy. Add a bounding clause to the AI-facing instruction in boot.py (and mirror it in the boot-session-start runbook): the relay is a once-per-session act in the grounding reply, named in plain words, with no invented preamble and no re-surfacing on later turns. Text-only — the deterministic collapse logic (boot_alarm_ledger, _relay_lines) is unchanged. New test asserts the bound is present in the assembled briefing. Co-Authored-By: Claude Opus 4.8 --- .engine/knowledge/graph.json | 6 +++--- .engine/operations/boot-session-start.md | 4 ++++ .engine/tools/boot.py | 13 +++++++++++-- .engine/tools/test_boot.py | 12 ++++++++++++ 4 files changed, 30 insertions(+), 5 deletions(-) diff --git a/.engine/knowledge/graph.json b/.engine/knowledge/graph.json index 144305e..fe32eba 100644 --- a/.engine/knowledge/graph.json +++ b/.engine/knowledge/graph.json @@ -2684,7 +2684,7 @@ }, "slug": "boot-session-start", "source": { - "fingerprint": "sha256:e4bfb5d394d5472371e3d2220be624de8161e41af26580fd59fafe5d041ba983", + "fingerprint": "sha256:d90d6fc411f942130ab0026d167b6675bb55adcb0687213361d08b991ccee17e", "path": ".engine/operations/boot-session-start.md" }, "status": "active", @@ -4002,7 +4002,7 @@ }, "slug": "boot", "source": { - "fingerprint": "sha256:5a26c1c51f59caee6a2b484b6ffc973466cf9134ef62ba9da9bcceb87c0393cb", + "fingerprint": "sha256:4f5e52a3f9f9d22f61bca893bdc0b9de124ffd2740353661499c92a467420cb1", "path": ".engine/tools/boot.py" }, "status": "active", @@ -5651,7 +5651,7 @@ }, "slug": "test_boot", "source": { - "fingerprint": "sha256:bee5261ab0ea9f5b5e9e37628b3aed09021d2ab03eb5dd2b0e3468b678794b18", + "fingerprint": "sha256:760e716a7ae967b9aebfb0fd8c31afb249f5c2d83de11ac81f0aba5483fe7dee", "path": ".engine/tools/test_boot.py" }, "status": "active", diff --git a/.engine/operations/boot-session-start.md b/.engine/operations/boot-session-start.md index 2e4e8cc..27810e0 100644 --- a/.engine/operations/boot-session-start.md +++ b/.engine/operations/boot-session-start.md @@ -48,6 +48,10 @@ only, never the whole pack, and the session never halts. the terse-versus-full decision, and the write all run in the deterministic hook (`boot_alarm_ledger`), never the model, and are **fail-toward-full**: a missing/unreadable/write-failed ledger, or any ambiguity, renders the alarm in full (repetition is the tolerable failure; suppression is not). + The relay is a **once-per-session act in the grounding reply**: each alarm is named with its + consequence in plain words, never wrapped in an invented "boot check" / "before we start setup" + preamble, and the "(unchanged since last session)" framing is **not re-surfaced on later turns** of + the same session (if asked again, answer plainly without restapling the boot wrapper). To print the assembled briefing by hand (a debug view of what the hook injects): `python tools/boot.py pack`. diff --git a/.engine/tools/boot.py b/.engine/tools/boot.py index 80826f7..9dd9c12 100644 --- a/.engine/tools/boot.py +++ b/.engine/tools/boot.py @@ -997,11 +997,20 @@ def assemble_pack(session_id: str | None = None, *, use_ledger: bool = False) -> # (unchanged since last session)" is a standing one already seen — relay it as the brief reminder # it is; a new or worsened item is stated in full. If a standing alarm has dropped off entirely # since last session, that means the engine re-checked and it is resolved — not that it stopped - # watching; say so plainly if the operator asks. + # watching; say so plainly if the operator asks. This relay is a once-per-session act that belongs + # in this grounding reply: name each alarm and its consequence in plain words — never invent a + # "boot check" / "before we start setup" preamble or attribute it to "the boot check" — and do not + # re-surface the "(unchanged since last session)" / boot-card framing on later turns of the same + # session; if the operator asks about it again, answer plainly without restapling the boot wrapper. out.append(" (An item marked 'still … (unchanged since last session)' is a standing one the " "operator already saw — relay it as a brief reminder, not a fresh alarm; a new or " "worsened item is stated in full. An alarm that dropped off since last session means " - "the engine verified it resolved, never that it stopped checking.)") + "the engine verified it resolved, never that it stopped checking. Relay each alarm " + "once, here in this grounding reply, naming the thing and its consequence in plain " + "words — do not invent a 'boot check' or 'before we start setup' preamble, and do not " + "re-surface this '(unchanged since last session)' framing on later turns of the same " + "session; if the operator asks about it again, answer plainly without restapling the " + "boot wrapper.)") else: out.append("2. No governance alarm to relay this session.") out.append("3. Then surface a brief plain-language headline of anything in the status below that needs " diff --git a/.engine/tools/test_boot.py b/.engine/tools/test_boot.py index 3cd0a5b..820f50b 100644 --- a/.engine/tools/test_boot.py +++ b/.engine/tools/test_boot.py @@ -1046,6 +1046,18 @@ def test_marker_token_in_briefing_on_the_alarm_branch(self): self.assertIn(boot.PRESENT_MARKER, pack) # ...but the instruction still names it self.assertIn(boot.RELAY_MARKER, pack) # ...and the governance alarm is INFORM-marked + def test_collapse_contract_bounds_the_relay_to_the_grounding_reply(self): + # The AI-facing collapse contract must not just say HOW to render a collapsed alarm — it must bound + # WHEN: a once-per-session act in this grounding reply, with no invented "boot check" preamble and no + # re-surfacing of the "(unchanged since last session)" framing on later turns. This is the guard + # against a model restapling the boot wrapper mid-session (the leak the operator caught). + with mock.patch.object(boot, "gather_signals", + return_value=_signals(gate="off", reason="no pull request")): + pack = boot.assemble_pack() + self.assertIn("Relay each alarm once", pack) # once-per-session bound + self.assertIn("do not invent a 'boot check'", pack) # no invented preamble + self.assertIn("later turns of the same session", pack) # no mid-session re-surfacing + def test_must_push_carries_the_inform_marker_for_governance(self): items = boot.must_push(_signals(gate="off", reason="no pull request")) self.assertTrue(items) From 91637fc479b714e6d17eb76b1d129be6a27c663b Mon Sep 17 00:00:00 2001 From: Shane Kidd <33380501+StarshipSuperjam@users.noreply.github.com> Date: Tue, 30 Jun 2026 10:01:08 -0700 Subject: [PATCH 2/2] Tighten the collapse-contract wording after the deliverable-gate review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address two convergent nits from the cold review (no blocking/serious found): reduce the bound's triplication by having the code comment defer to the emitted instruction (only the emitted string is test-pinned), and trim the emitted string — drop the "restapling the boot wrapper" coinage and a negation — so the instruction is less skimmable. Test-pinned substrings unchanged; 115 boot tests green, graph + self-map back in sync. Co-Authored-By: Claude Opus 4.8 --- .engine/knowledge/graph.json | 2 +- .engine/tools/boot.py | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.engine/knowledge/graph.json b/.engine/knowledge/graph.json index fe32eba..abaf4a4 100644 --- a/.engine/knowledge/graph.json +++ b/.engine/knowledge/graph.json @@ -4002,7 +4002,7 @@ }, "slug": "boot", "source": { - "fingerprint": "sha256:4f5e52a3f9f9d22f61bca893bdc0b9de124ffd2740353661499c92a467420cb1", + "fingerprint": "sha256:c2cc6eea7825e50fc787057a8b92cde6a7ab3a8229ead24c0a3b2010abc7c0e0", "path": ".engine/tools/boot.py" }, "status": "active", diff --git a/.engine/tools/boot.py b/.engine/tools/boot.py index 9dd9c12..cb9c632 100644 --- a/.engine/tools/boot.py +++ b/.engine/tools/boot.py @@ -997,20 +997,17 @@ def assemble_pack(session_id: str | None = None, *, use_ledger: bool = False) -> # (unchanged since last session)" is a standing one already seen — relay it as the brief reminder # it is; a new or worsened item is stated in full. If a standing alarm has dropped off entirely # since last session, that means the engine re-checked and it is resolved — not that it stopped - # watching; say so plainly if the operator asks. This relay is a once-per-session act that belongs - # in this grounding reply: name each alarm and its consequence in plain words — never invent a - # "boot check" / "before we start setup" preamble or attribute it to "the boot check" — and do not - # re-surface the "(unchanged since last session)" / boot-card framing on later turns of the same - # session; if the operator asks about it again, answer plainly without restapling the boot wrapper. + # watching; say so plainly if the operator asks. The emitted instruction below also bounds WHEN the + # relay happens — once, in this grounding reply, with no invented "boot check" preamble and not + # re-surfaced on later turns; keep this comment and that emitted text in step. out.append(" (An item marked 'still … (unchanged since last session)' is a standing one the " "operator already saw — relay it as a brief reminder, not a fresh alarm; a new or " "worsened item is stated in full. An alarm that dropped off since last session means " "the engine verified it resolved, never that it stopped checking. Relay each alarm " "once, here in this grounding reply, naming the thing and its consequence in plain " "words — do not invent a 'boot check' or 'before we start setup' preamble, and do not " - "re-surface this '(unchanged since last session)' framing on later turns of the same " - "session; if the operator asks about it again, answer plainly without restapling the " - "boot wrapper.)") + "re-surface this framing on later turns of the same session. If the operator asks " + "again, answer plainly, without the boot-time framing.)") else: out.append("2. No governance alarm to relay this session.") out.append("3. Then surface a brief plain-language headline of anything in the status below that needs "