Skip to content

fix(acp): preserve routing for edited messages - #6130

Closed
loganj wants to merge 7 commits into
mainfrom
larry/pr-4741-foundation
Closed

fix(acp): preserve routing for edited messages#6130
loganj wants to merge 7 commits into
mainfrom
larry/pr-4741-foundation

Conversation

@loganj

@loganj loganj commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

🤖

Summary

Message edits are auxiliary events, but replies, reactions, setup nudges, and queued delivery must remain anchored to the original visible message. This change establishes that routing foundation before native mid-turn steering is introduced.

  • Resolves an edit's original message and thread root before dispatch.
  • Keeps edit-triggered reactions and replies attached to the visible original event, including cancellation and setup-mode paths.
  • Replays queued events chronologically, then isolates edit delivery at its routing boundary so an edit cannot inherit another event's reply target.
  • Falls back to the edit's target ID when the original cannot be fetched within the bounded lookup.

Stack position

1 of 3 — foundation, based on main.

Next: larry/pr-4741-activation (default activation), then larry/pr-4741-native-lifecycle (native steer and lifecycle fencing).

Related issue

None found. Split from #4741.

Testing

  • cargo test -p buzz-acp --all-targets — 787 unit tests and 9 lifecycle tests passed
  • cargo check -p buzz-acp

Brother Darryl and others added 7 commits August 17, 2026 10:06
Signed-off-by: Brother Darryl <146fb160a3266e6165bfa385f6048c975eda9e21cf65da097a0b5ea7952532a5@buzz.block.builderlab.xyz>
(cherry picked from commit 914418d)
Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
Signed-off-by: Brother Darryl <146fb160a3266e6165bfa385f6048c975eda9e21cf65da097a0b5ea7952532a5@buzz.block.builderlab.xyz>
(cherry picked from commit fa5a74e)
Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
(cherry picked from commit acd0a06)
Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
(cherry picked from commit 9811b89)
Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
(cherry picked from commit ab8411f)
Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
Import the edit kind only for explicit setup routing coverage; default subscriptions remain unchanged in this foundation slice.

Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
Sort replayed events chronologically before draining and dispatch each edit independently so its original-message route cannot be hidden by a later event.

Signed-off-by: Larry <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
@loganj

loganj commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator Author

🤖 Superseded by #4741, which now preserves this exact foundation head while retaining the original review history. The activation and native/lifecycle slices remain stacked above #4741 as #6131 and #6132.

@loganj loganj closed this Aug 17, 2026
@loganj
loganj deleted the larry/pr-4741-foundation branch August 17, 2026 15:04
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