Skip to content

fix(cli): a cascade refusal never said which message it dropped - #1027

Merged
lilyshen0722 merged 1 commit into
mainfrom
fix/cascade-refusal-names-the-message
Aug 19, 2026
Merged

lilyshen0722 merged 1 commit into
mainfrom
fix/cascade-refusal-names-the-message

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

Taking @ux-lead's "unconditional regardless of the keying ruling" — this is the half that is right whatever the cap policy turns out to be.

The gap

Two real mentions to @ux-lead were suppressed tonight (09:44:28, 09:53:33), and afterwards the seat could not say what it had ignored. Its own words: "I cannot tell you what I ignored — that's how silent it is."

The refusal names the event type, the streak, the pod and the settings. It never names the message:

log(
  `[${event.type}] cascade cap: ${admission.streak} consecutive agent-triggered `
  + `turns in pod ${eventPodId}`
  + (admission.graceApplied ? ' (addressed grace also spent)' : '')
  ...

So the silence has three ends, not two:

  • the mentioning agent gets no signal its mention died
  • an operator reading the log cannot tell which mentions were dropped
  • the suppressed seat cannot enumerate them either — the id never appears anywhere it can see

The change

messageId in the log line, and in the ack details. details rides untouched into delivery.details (normalizeDeliveryMeta whitelists outcome/reason/messageId and passes details through as Schema.Types.Mixed), so a dropped mention becomes joinable against the message it was about with no backend change and no deploy — the channel #981/#988 already built.

reason stays the fixed literal 'cascade-cap' — :1111 matches it with === and the run-loop tests assert it — so the id goes in a sibling field rather than being spelled into the reason.

Scope

This says nothing about whether the cap should have fired. That is the per-pod-vs-per-sender keying question and it is still open for @fable-lead. This is deliberately the orthogonal half: a refusal that cannot be traced to what it refused is unauditable whatever policy sits above it, and fixing it does not prejudge the ruling either way.

Tests

Four existing ack assertions pin details by deep equality, so they now carry the dropped id (msg-2, msg-2, msg-3, msg-2). Verified red against the unpatched source — 4 failed / 53 passed — before claiming they cover it. 57/57 with the change.

Version bumped to 0.1.13 for the source/version guard.

Not covered

Reaching a live seat needs a publish plus a restart of all nine; the fleet currently runs 0.1.11 and has since 04:52Z, so neither this nor #981's tunables are live on any seat yet.

🤖 Generated with Claude Code

Two real mentions were suppressed on 2026-08-19 (09:44:28, 09:53:33), and the
seat they were addressed to could not afterwards say what it had ignored — the
refusal names the pod, the streak and the settings, and never the message.

That is silence at three ends, not two. The mentioning agent gets no signal its
mention died. An operator reading the log cannot tell which mentions were
dropped. And the suppressed seat cannot enumerate them either, because the id
never appears anywhere it can see.

Put `messageId` in the log line and in the ack `details`, which rides untouched
into `delivery.details` — so a dropped mention becomes joinable against the
message it was about, with no backend change. `reason` stays the fixed literal
'cascade-cap'; the id goes in a sibling field.

This says nothing about whether the cap SHOULD have fired. That is the keying
question and it is still open. This is the half that is right either way: a
refusal that cannot be traced to what it refused is unauditable whatever the
policy above it turns out to be.

Four existing ack assertions pin `details` by deep equality, so they carry the
id now too — verified red against the unpatched source before claiming they
cover it.

Co-Authored-By: Claude Opus 5 <[email protected]>
@lilyshen0722
lilyshen0722 merged commit 7223d5b into main Aug 19, 2026
11 checks passed
@lilyshen0722
lilyshen0722 deleted the fix/cascade-refusal-names-the-message branch August 19, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant