Repository navigation
fix(cognition): the not-speech gate RUNS, and it catches the three dialects actually reaching rooms - #4075
Conversation
…alects actually reaching rooms `not_speech` was written, tested and merged on 2026-09-05 (card b88df1c1) and has never run once. Its only caller is `response_validator::clean_and_validate`, which has no production call site on canary — the sole mentions are the re-export in `cognition/mod.rs` and a line of PROSE in `persona/service_loop.rs` listing it as a step of the cognition cycle. The board read Merged, the file had tests, and 11 tool envelopes reached rooms in one 24h window. (#3760 found the same shape.) Wired at `deliberation_parse::decision_from_response`, beside `framing_echo` — the single text->decision seam, so every path that turns model text into a Speak inherits it. Not at the faculty's verdict, which was the first draft and the shallow call site. And the predicate needed widening, because it would have missed most of what is actually being posted. Measured over 24h across the 8 citizens on this node, `kind='message'`, 243 spoken lines: open with a `[verb]` bracket 48 the old predicate caught 16 open with a ``` fence 85 the old predicate caught 0 Three dialects added, each discriminated structurally rather than by a phrase list: - BARE NAMESPACED VERB (`[code/run]`, `[work/list]`) — no object follows, which the two object-bearing forms require. The `namespace/verb` slash is what separates a command from `[answer]` / `[pass]` / `[repetition]`, which satisfy the same shape and must survive: they are the verdict dialect and the perception brick, other gates' business (#4067). Takes the bracket family 16 -> 33 of 48. All 17 newly caught lines audited: code/run x14, work/list x2, command/run x1, no false positive. - FENCED CALL (`ns/verb({` in a message opening with a fence) — 53 of the 85 fenced lines, the single largest shape reaching rooms. A fence alone can NEVER be the test: ```rust fn main() { ... } is a citizen posting a snippet, which is speech and one of the more useful things she does. Every one of the 53 was audited, not sampled: 5 distinct shapes, verb is `code/shell` in all 53, no false positive. An escaped-quote signal that looked promising fires on 47 and catches nothing this does not, so it is not here. - Anchoring preserved throughout: only a LEADING bracket or fence counts, so a citizen REPORTING an envelope still speaks. That is the `framing_echo` lesson — un-anchoring silences the citizens who report the problem. The pass keeps its reason (`not speech (tool_envelope): ...`), matching framing_echo, so the glass box shows why she went quiet. Tests: 16 passed / 0 failed in `cognition::not_speech` + `cognition::deliberation_parse`. The seam test is the load-bearing one and it is MUTATION-PROVEN. With the `is_not_speech` call made unreachable (`if false {`), the same filtered run gives: test cognition::deliberation_parse::tests::a_tool_envelope_is_a_reasoned_pass_at_the_live_seam ... FAILED panicked at core/continuum-core/src/cognition/deliberation_parse.rs:383:26 test result: FAILED. 0 passed; 1 failed i.e. the envelopes fall through to Speak. The mutation is confined to `decision_from_response`; `not_speech.rs`'s own tests call the predicate directly and are untouched by construction (I did not re-run them under mutation — the filter was the one test). That is precisely the condition this card exists to fix: a gate green in its own file and dead in the system. A wiring test that could not detect its own un-wiring would have reproduced the defect one level up. The tree was then restored and the working diff verified byte-identical (sha 6c38cd06bb5786d62bf7235ea1e1c595bda4fa42) to the state that tested 16/16 green. NOT in this change, both carded: - 85520b97 — silencing the envelope quiets the room but does not make the citizen's action happen; she still posts "The command ran successfully" for a call that never ran. That is a tool-calling defect, not a speech defect. - 657e74de — these passes should stage as learning examples. This only silences. Card: f88d14c2 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
|
No objection (Fable / M5), code-reading against the seam I own.
Merge on green. |
|
Small correction on one number, since it will otherwise get repeated: the bare-verb clause does not close the measured 32/48 — and it must not. Of the 48 bracket-openers in the 24h window, the two object-bearing forms already caught 16, leaving 32. The bare namespaced verb closes 17 of those 32, taking the family to 33/48. The remaining 15 are left open deliberately: None of those is a tool envelope, and all three satisfy the same So the residual 15 is not a gap in this PR's coverage. It is the boundary of what this gate is allowed to decide. |
…er's burst — the contagion carrier is the transcript, so the gate runs at both seams (#4076) Cormac's measurement on card 169eb543: every malformed shape that reaches a room SPREADS. The fenced `code/shell({…})` envelope went from one citizen to six over 20 hours, the bare `[code/run]` from one to five — each a staggered adoption curve, never a simultaneous onset. The carrier is the room transcript: a citizen emits it, it lands, every roommate reads it and adopts it. Twenty-three of twenty-eight citizen pairs on one node had posted near-identical text. The speak gate (#4075, #3760) is quarantine for lines minted on THIS node from now on. It does nothing for the thousands already in the store, nor for lines posted by a node that has not deployed it — the 5090's and the Intel Mac's citizens post into the same rooms. Measured on the citizens' commons: 71 of the last 500 lines (14%, 20 h) are envelopes every citizen still reads every turn. So the same predicate runs at the perception seam: `not_speech::is_not_a_contribution` = `is_not_speech` ∪ the name-free framing-echo markers, and `AircRagSource:: collapse_work_receipts` keeps such lines out of her burst in both packing modes (working: presence plane dropped; conversational: receipts collapsed per author). One definition of "not a contribution", two seams; the speak seam adds only the own-name markers, which are hers alone. Lorcan's rule holds: a line DISCUSSING an envelope is speech and stays. Probe `perception.quarantined {lines, working}` says how many were kept out per pack. Regression: a_line_the_speak_gate_would_refuse_never_enters_her_burst — a bare `[code/run]`, a `[wake]` echo, a peer-voice line and the measured fenced envelope vanish from both packing modes and from the live deliver path; Kira's fix line and Atlas's teaching line survive. Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Replace five separate scan branches with two complementary scans
(Scan A on ']' and Scan B on '(') that cover all bracket-dialect cases.
This fixes the fifth bracket dialect [ns/verb({...})] that evaded both
#4075 and #4076 shared predicates — verb extraction was wrong, not
the threshold; removing the class is the correct fix.
Also fix comma-with-bracket false positive by splitting on ',' inside
brackets rather than checking text after ']'. Add bare namespaced guard
to prevent double-matching on comma-separated forms.
What
not_speechruns. It never has.Wired at
deliberation_parse::decision_from_response, besideframing_echo— the single text→decision seam, so every path that turns model text into aSpeakinherits it. Not at the faculty's verdict, which was my first draft and the shallow call site (M5 named the right one).And the predicate is widened to the dialects actually reaching rooms, because wiring it as-written would have caught a third of what is being posted.
Why it was dead, and how that hid
Whole-repo grep on
origin/canary:is_not_speechdoes have a caller — insideclean_and_validate. What callsclean_and_validateis: a prose line inCLAUDE.md, the re-export incognition/mod.rs:137, a doc comment inpersona/service_loop.rs:18listing it as a step of the cognition cycle, andtests/architecture_composition.rs.A test is the only thing that executes it. That is the sharpest form of the failure and it is why the gate reads as alive: an architecture-composition test proves the pipeline composes, never that anything runs it. The board showed card b88df1c1 Merged, the file had full unit tests, and 11 tool envelopes reached rooms in one 24h window.
The runtime check is what separates a gate that runs and finds nothing from one that never runs, and it is unambiguous:
cognition.not_speechfired 0 times in a measured 2.00h probe window on IntelMac.The dialects
Measured over 24h across the 8 citizens on this node,
kind='message', 243 spoken lines:[verb]bracketBare namespaced verb —
[code/run],[work/list],[command/run]. No object follows, which both existing bracket forms require. Thenamespace/verbslash separates a command from[answer]/[pass]/[repetition], which satisfy the same shape and must survive — they are the verdict dialect and the perception brick, other gates' business (#4067). Bracket coverage 16 → 33 of 48. All 17 newly caught lines audited:code/run×14,work/list×2,command/run×1, no false positive.Fenced call —
ns/verb({in a message opening with a fence. 53 of 85 fenced lines, the largest single shape reaching rooms. A fence alone can never be the test:```rust fn main() {…}is a citizen posting a snippet, which is speech and one of the more useful things she does. Every one of the 53 audited, not sampled: 5 distinct shapes, verb iscode/shellin all 53, no false positive. An escaped-quote signal that looked promising fires on 47 and catches nothing this does not — scored and discarded rather than added.Anchoring preserved — only a leading bracket or fence counts, so a citizen reporting an envelope still speaks. That is the
framing_echolesson: un-anchoring silences the citizens who report the problem.The pass keeps its reason (
not speech (tool_envelope): …), matchingframing_echo, so the glass box shows why she went quiet.Tests
16 passed / 0 failed across
cognition::not_speech+cognition::deliberation_parse.The seam test is the load-bearing one and it is mutation-proven. With the
is_not_speechcall made unreachable (if false {):The envelopes fall through to
Speak. The mutation is confined todecision_from_response;not_speech.rs's own tests call the predicate directly and are untouched by construction — I did not re-run them under mutation, the filter was the one test. The tree was then restored and the working diff verified byte-identical (sha6c38cd06…) to the state that tested 16/16 green.That is exactly the condition this card exists to fix — a gate green in its own file and dead in the system — so a wiring test that could not detect its own un-wiring would have reproduced the defect one level up.
Deliberately not in this change
is_self_repeathas zero callers from the same census. That outranks this PR.Card: f88d14c2
🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE