Repository navigation
fix(mattermost): wake agents from edited mentions - #97316
yungchentang wants to merge 7 commits into
Conversation
|
Thanks for the contribution. This PR still needs the requested real-behavior proof, and the branch has been idle since that ask. Close as stalled and unproven: the branch predates Mattermost’s durable-ingress rewrite, remains dirty, and still lacks both the required ingress adaptation and real-provider evidence. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. So I’m closing this for now to keep the review queue honest. Please reopen or open a fresh PR with real-behavior proof (a live run, logs, or a reproducible validation transcript) and it will be reviewed again. Review detailsBest possible solution: If the linked issue still needs a fix, start a fresh current-main PR that extends the durable ingress event classifier and edit-specific identity, then prove one edited mention produces one durable agent wake without regressing normal posts. Do we have a high-confidence way to reproduce the issue? Yes, from source: inject a Mattermost Is this the best way to solve the issue? No. The branch changes the pre-rewrite WebSocket and replay path, while current main makes durable ingress the authoritative admission and replay owner. Security review: Security review cleared: The diff changes Mattermost event handling and tests only; no dependency, workflow, secret, or privilege boundary concern was found. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 8a3964f87cd2. |
|
This pull request has been automatically marked as stale due to inactivity. |
56dccb2 to
62cddba
Compare
185e3bc to
85398f1
Compare
|
Addressed the max-lines finding on head 135355676af by splitting the edited-mention and debounce cases into focused test modules while preserving all 28 inbound tests. Public CI passes changed tests, test types, dependency/unused-file checks, lint/format, max-lines, and the aggregate gate on the current head. Live Mattermost tenant proof remains unavailable in this environment, so that separate proof request is unchanged. @clawsweeper re-review |
1353556 to
1734e1e
Compare
|
Refreshed this PR on current Additional fixes on
The only CI failures are unrelated current-main drift in the package-acceptance expectation and Android Japanese localization; this PR touches neither surface. Live Mattermost tenant proof remains unavailable, so that separate proof gap remains. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
ClawSweeper applied the proposed close for this PR.
|
Closes #71930
AI-assisted: yes. I understand the change and reviewed the source, dependency contracts, and validation below.
What Problem This Solves
Fixes an issue where Mattermost users who edited an existing message to add an
@openclawmention would not wake the agent becausepost_editedWebSocket events were ignored.Why This Change Was Made
Mattermost edit events now enter the existing inbound post path. Transport-facing message identity stays the canonical Mattermost post id, while replay protection derives edit-specific keys from Mattermost edit metadata so the original post cannot suppress a later edited wake.
Edited events bypass text batching, but the zero-delay path remains FIFO-serialized with ordinary posts from the same sender, channel, and thread. Pending ordinary posts flush first, then each edit is evaluated independently. Mention snapshots require an observed false-to-true transition and fail closed when the prior state is unknown or the sender changes. Bot and system posts are filtered before enqueueing.
User Impact
Users can add an
@openclawmention by editing an existing Mattermost message. Immediatepostedandpost_editedframes retain their order and wake exactly once. Formatting-only, attachment-only, replayed, other-bot, and unknown-prior-state edits do not wake the agent.Evidence
allow_frozen_target_scenario_omissions, and Android Japanese localization drift. This PR touches neither surface.oxfmt --checkpassed for all touched TypeScript files.git diff --checkpassed.postedandpost_edited, exposesedit_at/update_aton posts, and emits the edited-post WebSocket event.Known gap: I do not have a live Mattermost tenant credential in this environment, so I cannot provide a real-provider transcript. Validation therefore uses the official Mattermost event contract plus isolated source-level WebSocket, replay, debounce, ordering, and inbound-context regression coverage.