Repository navigation
refactor(channels): mattermost event-plan builder and whatsapp durable admission - #114763
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 27, 2026, 6:21 PM ET / 22:21 UTC. ClawSweeper reviewWhat this changesThe branch centralizes Mattermost monitor-event planning and carries WhatsApp receive-time admission decisions through its durable queue instead of reconstructing them during replay. Merge readiness⛔ Blocked until real behavior proof is added - 4 items remain Keep open for protected-label maintainer review. The refactor changes Mattermost routing/reply planning and WhatsApp durable-admission handoff, but the PR body still has only test and changed-gate claims rather than after-fix runtime evidence for delivery and replay behavior. Priority: P3 Review scores
Verification
How this fits togetherMattermost inbound posts, reactions, and interactive callbacks are normalized into a shared event plan before the plugin routes an agent turn and delivers a reply. WhatsApp receives messages, records admission facts in durable ingress, then drains and replays the accepted work into the channel monitor. flowchart LR
A[Mattermost events] --> B[Shared event plan]
B --> C[Route and thread context]
C --> D[Agent turn and reply delivery]
E[WhatsApp inbound message] --> F[Durable admission]
F --> G[Persisted queue replay]
G --> H[Channel monitor delivery]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -170, Tests +27. Total -143 across 12 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one canonical Mattermost planning path and one WhatsApp receive-time admission path, then attach redacted after-fix evidence showing a Mattermost event reply and a WhatsApp durable replay preserve the intended target, dedupe, and delivery outcome. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR reports a behavior-preserving refactor rather than a currently reproducible user bug; the supplied evidence names focused tests but no failing baseline scenario. Is this the best way to solve the issue? Unclear: centralizing facts is consistent with the repository's prepared-facts guidance, but the available review evidence does not establish that the shared path preserves every real Mattermost and WhatsApp delivery contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0d32f85155ff. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Live replay evidence for exact PR head Environment: Blacksmith Testbox Command: Mattermost replayed through the raw ingress monitor and real interaction callback pipeline:
The post, button, and model-picker paths produced the same prepared routing/context facts: WhatsApp replayed real serialized Baileys envelopes through Result: 2 scenario tests passed in 2 Vitest shards; Testbox wrapper exit code 0. The harness files were temporary/uncommitted evidence fixtures (SHA-256: Mattermost |
|
Merged via squash.
|
…e admission (openclaw#114763) * refactor(mattermost): consolidate event planning * refactor(whatsapp): use shared durable admission * refactor(channels): keep ingress helpers private * fix(whatsapp): preserve receive-time ingress identity * style(whatsapp): format durable receive helper
What Problem This Solves
Mattermost event handling repeated the same routing and reply-planning work across handlers, while WhatsApp durable admission reconstructed facts after persistence instead of carrying the receive-time decision through the queue.
Why This Change Was Made
This adds one shared Mattermost event-plan builder and routes WhatsApp through the shared durable-admission integration. Prepared routing, context, lifecycle, and admission facts are carried forward rather than rediscovered, while existing retry, dedupe, thread, typing, and delivery contracts remain intact.
AI-assisted; reviewed with the repository autoreview workflow.
User Impact
No intended visible behavior change. Mattermost events follow the same routing and reply semantics through less duplicated code, and WhatsApp durable delivery preserves receive-time admission decisions consistently across persistence and replay.
Evidence
origin/main: clean, no accepted/actionable findings.