Repository navigation
docs(adr-018): D6.3 — replies implicitly address their target, and guard 2 has no signal to count - #1239
Closed
lilyshen0722 wants to merge 1 commit into
Closed
docs(adr-018): D6.3 — replies implicitly address their target, and guard 2 has no signal to count#1239lilyshen0722 wants to merge 1 commit into
lilyshen0722 wants to merge 1 commit into
Conversation
…signal A bot replying to or quoting another bot is a targeted wake today: the reply pings its author, and targeting overrides a peer's claim by the asymmetry D6.1 records as correct. So two bots replying to each other can each override the other indefinitely, which makes "is a reply targeted?" a decision rather than a detail. D6.3 decides it: yes, and D6 applies unchanged, bounded by two guards. Guard 1 (rate) exists and is live — isWakeLoopDampened counts AgentEvent rows in a window and fails open, which is the right direction. Guard 2 (convergence) is the reason this amendment is worth writing. It is specified against a signal that is not recorded: a total-match NO_REPLY takes the !sanitizedContent branch and persists no message row, the only durable trace is a system_exchanges entry written solely in agent-dm pods, and neither layer knows the thread — AgentEvent has no thread column and its payload is Mixed. A countDocuments over silent turns returns 0 and is indistinguishable from a converged exchange. It belongs in the ack path, the one place already holding (seat, thread) together. Two things are named unsettled inside the amendment and added to the status line, so ratifying it cannot be read as deciding them: whether system_exchanges should widen beyond agent-dm pods, and whether two consecutive silences is the right threshold. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Author
|
Closing as a duplicate — I re-derived D6.3 without checking that #1205 already carries it, on a branch I opened myself this morning. #1205 is the amendment; this PR restates it. The one thing here that is not in #1205 is the measured constraint on guard 2 — that it has no signal to count at the message layer, and therefore belongs in the ack path. That is going onto #1205's branch as a commit rather than staying in a competing PR. |
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.
Closes TASK-058.
What this decides
A bot replying to or quoting another bot is a targeted wake today — a reply pings its author, and targeting overrides a peer's claim by the asymmetry D6.1 already records as correct. Two bots replying to each other are therefore two seats that can each override the other indefinitely. That makes "is a reply targeted?" a decision rather than an implementation detail.
D6.3 decides it: yes, and D6 applies unchanged — the target is the addressee and its silence is the answer — bounded by two guards rather than by refusing to treat replies as targeted.
The part worth reviewing
Guard 1 (rate) exists and is live.
isWakeLoopDampened(agentMentionService.ts:943) counts the seat'sAgentEventrows insideMENTION_LOOP_WINDOW_MSand fails open — the direction rule 19 of the reviewer checklist asks for, and its own comment states the reasoning.Guard 2 (convergence) is specified against a signal that is not recorded. This is the finding, and it is why the amendment is worth writing rather than just implementing:
NO_REPLYnever becomes a row —agentMessageService.ts:1124takes the!sanitizedContentbranch and returns{ success: true, skipped: true, reason: 'silent_or_empty' }.system_exchangesentry, written only inagent-dmpods (ADR-012 §4, fired from that same branch).postMessagenever learns one;AgentEventhas no thread column and itspayloadisSchema.Types.Mixed, so a thread id inside it is unqueryable without a migration.A
countDocumentsover silent turns returns0, which is indistinguishable from a converged exchange — an instrument that answers rather than errors. Guard 2 belongs in the ack path, the one place already holding(seat, thread)together.Status line
Updated from two unsettled items to three. D6.3 names its own two open questions — whether
system_exchangesshould widen beyondagent-dmpods, and whether two consecutive silences is the right threshold — and the status line now says so, soAcceptedcannot be read as having decided them. That follows the ADR-status discipline in CLAUDE.md, earned by the #963 regression.Correcting the row
TASK-058 carried "waits on #1205" as its blocker. That was wrong; #1205 does not touch this path. The real blocker was the missing signal, which only became visible by reading what the silent branch persists rather than what it appears to persist.
Not in this PR
The ack-path implementation of guard 2. This is the spec change; the code change should be gated separately, and by someone other than me — I did the measurement.
🤖 Generated with Claude Code