Bound the boot collapse relay to the grounding reply (stop mid-session boilerplate)#356
Merged
Merged
Conversation
…n boilerplate) 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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Stop the boot grounding relay from leaking into mid-session as invented boilerplate.
(unchanged since last session)machinery (the D-269 anti-habituation collapse) is correct and deterministic; the defect was a relay-discipline gap, not a logic bug.Impact: standing alarms read as a once-per-session reminder in plain words, not recurring wallpaper — which is exactly what D-269 exists to prevent.
Scope
Bound the AI-facing collapse contract to the grounding reply, and mirror the rule in the runbook.
boot.py: extend the AI-facing collapse-contract instruction (and its adjacent comment) to say the relay is a once-per-session act in the grounding reply — no invented "boot check" / "before we start setup" preamble, no re-surfacing the framing on later turns of the same session.boot-session-start.md: mirror the same one-sentence rule in the D-269 bullet so the inline instruction and the canonical runbook agree.test_boot.py: new assertion that the assembled briefing carries the bound.graph.json: regenerated for the two surface edits.Impact: future sessions relay a standing alarm once, at boot, in plain words.
Out of scope
The deterministic collapse mechanism itself.
boot_alarm_ledger.py,_relay_lines,_pushed_alarms, or the ledger compare — the structured-value collapse decision is correct and untouched.disposition-issue-resolutionoffline-only meta-check note (no local GitHub token) is unrelated and present on cleanmain.Impact: this is the smallest fix that closes the leak — instruction text, one test, a regen.
Risk
Low; guardrail-adjacent, not guardrail-weakening. This touches a guarded engine tool (
boot.py), soengine-guardwill flag it and hold the merge until theguardrail-acklabel is applied.boot.pyis on the guarded list, so the flag is expected.Impact: the guard flag is the engine doing its job; the ack is a deliberate, separate acknowledgment of the guarded-file touch — left for the maintainer to apply, never self-applied.
Validation
Full unittest discover green for everything touched; the pre-existing offline FAIL is unrelated.
test_boot.py: 115 tests pass, including the newtest_collapse_contract_bounds_the_relay_to_the_grounding_reply.test_knowledge.py(59) andtest_self_map.py(41) pass after thegraph.jsonregen;self-map.mdwas already in sync (a content edit doesn't move the manifest).python tools/boot.py packshows the AI-facing instruction now carries the once-per-session / no-preamble / no-mid-session-resurface bound, and the operator-visible relay lines are unchanged.disposition-issue-resolutiondid not catch its fixture) is the known token-less environment limitation — it reproduces identically on cleanmainand bites correctly in CI where the token exists.Impact: an approver can rely on the change being mechanically clean and behaviour-preserving for the collapse logic.
Review
A four-lens deliverable-gate cold review ran (each lens grounded against the source itself); all four cleared it with no blocking or serious findings.
Nothing here is something you can run yourself — there's no settled description for this project yet.
Impact: the engine's own account of the review — the approver's merge is the binding gate.
Files of interest
The AI-facing instruction is the load-bearing change.
.engine/tools/boot.py— the collapse-contract instruction + comment (the actual fix)..engine/operations/boot-session-start.md— the mirrored D-269 rule..engine/tools/test_boot.py— the new assertion..engine/knowledge/graph.json— regenerated.Impact: the boot.py instruction is what future sessions read every session start.
Claude involvement
Diagnosis and wording are AI judgment; the edits are mechanical.
boot-session-start.md— is where this judgment lives.Impact: the load-bearing judgment is the wording of the bound; everything else is mechanical.