diff --git a/.engine/knowledge/graph.json b/.engine/knowledge/graph.json index 144305e..abaf4a4 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:c2cc6eea7825e50fc787057a8b92cde6a7ab3a8229ead24c0a3b2010abc7c0e0", "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..cb9c632 100644 --- a/.engine/tools/boot.py +++ b/.engine/tools/boot.py @@ -997,11 +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. + # 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.)") + "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 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 " 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)