Conversation
ff25d69 to
4a6fe5c
Compare
Include kind:40003 in the default mention subscriptions across normal, dynamic-channel, and setup listeners. Preserve explicit kind overrides and document the actionable default. Signed-off-by: npub1em3jmyn4vu57urqf03txrwreccvejvwdy5c4er8nnrwt7rc4tncscs3ssu <cee32d92756729ee0c097c5661b879c6199931cd25315c8cf398dcbf0f155cf1@buzz.block.builderlab.xyz> (cherry picked from commit 7ad7d79) Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
81f8baf to
d4ed2d5
Compare
4a6fe5c to
681ae2c
Compare
jedwards27
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Reviewed: d4ed2d5d3a49067d61049fff79de62b7ab0d4a78..681ae2c4d34dccf1adb9fb82908fd9eb88fcf3d1 (exact live head verified immediately before submission)
Risk: High — this changes agent wake admission across relay subscription, local rule matching, queue/prompt delivery, and setup-mode nudging.
Blocking finding
The new regression assertions do not protect both production admission seams needed for the advertised behavior. Two causal mutations independently restored the old failure while the full package suite remained green:
- Removing kind
40003from the normal startup rule atcrates/buzz-acp/src/lib.rs:2099-2106still leftcargo test -p buzz-acpgreen (830 unit + 9 integration, 0 failed). Relay subscription admission remained enabled viaresolve_channel_filters, butfilter::match_eventlater dropped the edit atlib.rs:2922. - Removing kind
40003from the setup subscription rule construction atcrates/buzz-acp/src/setup_mode.rs:529-535also left the same full suite green (830 + 9, 0 failed).is_setup_nudge_kindaccepted the event, butfilter::match_eventatsetup_mode.rs:449dropped it.
The added tests cover the shared kind helper/dynamic filter and setup kind predicate independently, not the production compositions that must both admit the event. Consequently, the exact regression this PR fixes can return with green tests.
Author action: Add causal behavioral coverage through the normal listener and setup listener production seams, or extract a single tested admission seam used by each. Prove that a kind 40003 edit carrying the agent's newly-added p tag reaches queue/prompt and setup nudge respectively, while an edit without that p tag does not wake. Mutation-removing each production inclusion must fail the intended assertion.
Verification owner: Author runs the causal mutations; reviewer/tooling reruns the full cargo test -p buzz-acp suite and confirms each mutant fails for the intended assertion.
Contracts traced / non-blocking results
No separate runtime, security, or product defect was found. The implementation centralizes actionable mention defaults while preserving explicit --kinds and config-rule overrides (config.rs:1277-1323, lib.rs:2099-2111, setup_mode.rs:516-559). Subscriptions remain channel- and recipient-scoped, and local matching requires the exact agent p tag (relay.rs:3213-3245, filter.rs:352-396). Desktop emits edit p tags only for newly added mentions, so ordinary and removal edits do not re-wake agents (desktop/src/features/messages/ui/submitMessageEdit.ts:97-136, hooks.ts:762-801, desktop/src-tauri/src/events.rs:357-381). Existing routing resolves and signature-checks the original, isolates edit batches, and anchors prompt/reactions to the visible original (pool.rs:3353-3391, queue.rs:335-369,1544-1559,1698-1773); relay ingest enforces same-channel edit ownership (buzz-relay/src/handlers/ingest.rs:918-997,2491-2495). This aligns with the repository's Nostr-first, channel-scoped agent model.
Validation
At exact head 681ae2c4d34dccf1adb9fb82908fd9eb88fcf3d1, clean worktree:
cargo test -p buzz-acp: PASS — 830 unit + 9 integration, 0 failed.cargo fmt --all -- --check: PASS.cargo clippy -p buzz-acp --all-targets -- -D warnings: PASS.- Both production-seam mutants above: package suite incorrectly PASS, establishing the test defect.
- GitHub required checks at this head: green/skipped as expected; no PR-caused gate failure observed.
Manual/native evidence: No live Desktop → isolated relay → real ACP child workflow was run.
Residual risk / confidence gap: After test repair, reviewer/integration tooling should exercise: original unmentioned message → edit adds agent mention → exactly one turn anchored to the original; then typo edit and mention removal → zero further turns. This live-workflow gap is not itself author rework; the blocking item is the mutation-proven regression-test blind spot above.
— :bot: Jude’s code review agent
🤖
Summary
Agents currently subscribe to original messages by default, so editing a message to add an agent mention does not wake the newly mentioned agent. This change activates edit mentions on top of the routing foundation in #4741.
kind:40003) to the default actionable-mention kinds at startup, on dynamically discovered channels, and in setup mode.--kindsand config-rule overrides.ptags, so ordinary edits do not re-wake an agent.Stack position
2 of 3 — default activation, based on #4741 (
fix/edit-message-agent-mentions).Previous: #4741. Next: #6132 (native steer and lifecycle fencing).
Related issue
None found. Split from #4741's original combined scope.
Testing
cargo test -p buzz-acp --all-targets— one unrelatedidle_resets_on_stdout_activitytiming failure; isolated rerun passedcargo check -p buzz-acp