Repository navigation
docs(adr): ADR-018 D6.3 — a reply addresses its target regardless of species - #1205
Conversation
…species D6.1 settled that targeting is respected and only broadcast gambles, but left "what counts as targeting" to the implementation, which answered it with a species gate: #703's implicit-reply path is gated on `sender.isBot === false`, so a bot's reply to an agent never addresses that agent. Observed live on the SEO squad 2026-08-24 — Sage stood down twice on Anvil's claim, from a thread about Sage's own message. Records Sam's ratified direction: a reply or quote addresses its target whoever sent it, with anti-ping-pong moving to three bounded guards (wake dampener, thread convergence, an exit-teaching frame). The principle the next widening inherits: bound on evidence of a loop, never on who is speaking. States plainly that this is less built than decided — the interim ship carries per-target evidence on the existing message.posted fan-out and does not widen ADDRESSED_EVENT_TYPES, and the convergence guard does not exist. Points the interim code comment at the ADR rather than at a pod-local task id, and adds the ADR-020 scope-boundary note that #963's regression earned. Co-Authored-By: Claude Opus 5 <[email protected]>
D6.3 already records that the convergence guard is not implemented. What it did not say is why, and the gap matters: the obvious implementation is a countDocuments that always returns zero. A total-match NO_REPLY takes the !sanitizedContent branch and persists no message row, so "two consecutive silent turns" leaves nothing to count. The only durable trace is a system_exchanges entry written solely in agent-dm pods, which is the wrong population. And neither layer knows the thread — postMessage never learns one, and AgentEvent has no thread column, its payload being Mixed. So a converged exchange is indistinguishable from one the instrument cannot see, and guard 2 belongs in the ack path: a wake already knows its thread at enqueue, and a seat that acks a thread-scoped wake and posts nothing into that thread is the convergence event, keyed by (seat, thread) where both are in hand. Also records that guard 2 must state its own failure direction. Guard 1 fails open because dropping a genuine wake is the worse error; guard 2 failing open risks the unbounded reply chain the species gate existed to prevent. Copying guard 1's shape would import an answer reasoned for a different question. Status line now names the two open items inside D6.3 — signal source and threshold — so the ratified direction cannot be read as deciding them. Co-Authored-By: Claude Opus 5 <[email protected]>
|
Gated at The backend change is provably inert. Every changed line in
The three things CLAUDE.md requires of a wake-policy ADR are all present, checked rather than taken on the description:
One observation on the loop bound — non-blockingD6.3 stakes its safety on the dampener being the sole loop bound, so it's worth stating what that bound actually is. The asymmetry worth knowing: the gate is sender-scoped, the counter is not. Suppression only applies when AgentEvent.countDocuments({
agentName, instanceId, podId,
type: 'message.posted',
createdAt: { $gte: new Date(Date.now() - MENTION_LOOP_WINDOW_MS) },
}) // ← no sender fieldHuman-originated Direction of failure is the safe one — it errs toward silence, not toward unbounded reply chains, so it doesn't weaken what D6.3 relies on. But it does mean the sole loop bound is exhaustible by traffic unrelated to any loop, and that's worth knowing when guard 2 gets specified, since guard 2 is meant to be the thing that lets this one relax. A correction to my own measurementI first ran the two Not verified: I did not execute the suites against the PR's own tree (the comment-only proof is what stands in for that); I did not run the full backend suite; and I have not measured how often the dampener's window is actually consumed by human traffic in a live pod — the exhaustion path above is read from the query, not observed. |
The comment called convergence "D6.3's third guard"; the ADR it points at calls it guard 2 throughout (1 = dampener, 2 = convergence, 3 = frame). The comment's whole job is to route a reader to the right section before they widen this path, so a wrong guard number defeats it. Comment-only; zero non-comment lines changed. Co-Authored-By: Claude Opus 5 <[email protected]>
|
Re-gated at Inertness reproduces. Three-dot diff against I nearly filed the opposite. A two-dot The guard-number correction checks out exactly. At One count to correct, since it will get quoted. The backend change is 5 insertions / 2 deletions, not 3/3 — What I did not verify: that the convergence guard is genuinely absent from the codebase — I checked the comment against the ADR, not against an exhaustive search for an implementation under another name. And |
Closes TASK-058.
The seam
D6.1 settled that targeting is respected and only broadcast gambles — a directly addressed seat proceeds peer-aware past a peer's claim. It did not say which messages count as targeting, and the implementation answered that with a species gate.
#703's implicit-reply path is gated onsender.isBot === false(agentMentionService.ts:1685), so a bot's reply to an agent never produces achat.mentionfor the agent it answers. The author sees only ambient activity, is therefore not "addressed" in D6.1's sense, and has no standing to proceed past the replier's claim.Observed live on the SEO squad, 2026-08-24: Anvil threaded on Sage's message, Sage got an ambient wake, Anvil claimed, and Sage stood down — twice, from a conversation about Sage's own message.
Each half is defensible alone. Together they produce a rule nobody wrote: bot-to-bot thread conversations are inert unless the replier repeats an
@name, which is the one thing a reply edge already means.The decision (Sam, 2026-08-24)
A reply or quote addresses its target, whoever sent it. The claim layer needs no change — addressed seats already proceed peer-aware, so restoring the addressing signal restores the behaviour through machinery that exists.
Anti-ping-pong moves to three bounded guards: the existing bot-to-bot wake dampener, a convergence rule (two consecutive
NO_REPLYs mute further implicit wakes for that seat+thread; explicit@mentionsalways pass), and a frame that teaches the exit.The principle, stated so the next widening inherits it: ping-pong is content-free reciprocity, work is substantive. A guard against ping-pong must key on evidence of a loop, never on who is speaking — a species gate cannot distinguish the two and will always suppress the wrong one.
What is built, which is less than what is decided
The amendment says this in place rather than leaving a reader to infer production from a ratified decision:
repliesToYourMessage+ the frame) on the existingmessage.postedfan-out. Does not widenADDRESSED_EVENT_TYPES, adds no event type, needs no wrapper release.The status line now carries that caveat, so
Acceptedcannot be read as having decided the unbuilt part. Same discipline as D4's 90s lease.Also in this PR
TASK-058, a pod-local id that decays. It now points at ADR-018 D6.3 and states which guard is missing.#963read ADR-020 D6 as governing and demoted every multi-agent workspace to mention-only. This amendment widens what D8's fan-out treats as addressing, so it lands in the same blast radius.Verification
tsc --noEmiton Node 22: 51 errors before, 51 after, none inagentMentionService.ts(pre-existing, all intest-discord-interactions.ts). No behaviour change — docs plus two comment lines.🤖 Generated with Claude Code