Repository navigation
fix(slack): preserve dispatch custody for structured payloads - #123710
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 14, 2026, 11:56 AM ET / 15:56 UTC. ClawSweeper reviewWhat this changesThis PR preserves the durable dispatch-custody callback for structured Slack payload sends while retaining the single-message-only delivery reconciliation marker. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessNo blocking correctness finding: the patch restores the custody callback at the Slack facade and structured-fanout owner while keeping one-to-many reconciliation IDs suppressed. Keep this maintainer-labeled PR open until the queued exact-head gate completes and a maintainer lands it. Priority: P2 Review scores
Verification
How this fits togetherThe bundled Slack plugin receives durable outbound delivery contexts and renders structured payloads into one or more Slack API requests. Dispatch custody must reach the request boundary before recipient-visible I/O, while provider reconciliation IDs remain limited to one-message deliveries. flowchart LR
A[Durable delivery queue] --> B[Slack channel facade]
B --> C[Structured payload renderer]
C --> D[Send context preserves custody callback]
D --> E{Single-message reconciliation?}
E --> F[Slack platform request]
F --> G[Delivery receipt and recovery]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -19, Tests +34. Total +15 across 4 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land this net-negative owner-boundary repair after the exact-head delivery gate succeeds, keeping custody propagation and one-to-many marker suppression on their separate contracts. Do we have a high-confidence way to reproduce the issue? Yes—current-main source deterministically drops the callback in the facade and multi-segment fanout paths, and the PR adds focused boundary regressions for both cases. Is this the best way to solve the issue? Yes—the patch removes duplicate forwarding overrides and carries the existing context through the Slack owner, rather than adding another delivery path or weakening one-to-many reconciliation rules. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9386ac096632. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
|
Landed proof summary:
|
Closes #123707
What Problem This Solves
Fixes an issue where queued Slack structured payload and presentation fanout sends could cross the Slack platform boundary without refreshing final dispatch custody. If cancellation or producer lease loss occurred after adapter entry, recovery no longer had the expected dispatch fence protecting against duplicate recipient-visible delivery.
Why This Change Was Made
The Slack lazy facade explicitly discarded
onPlatformSendDispatchfor payloads, and the structured fanout owner incorrectly tied callback forwarding todeliveryQueueId. The callback now follows the existing send context into every structured platform request, whiledeliveryQueueIdremains suppressed for one-to-many fanout because exact provider reconciliation is a distinct single-message contract.The repair also deletes the duplicate callback/queue-id override plumbing from the facade. Production code is net −19 lines (
+0/-19); tests are net +34 (+37/-3). No config, protocol, storage, authentication, dependency, or public Plugin SDK surface changes.Provenance: PR #97480 introduced the facade override/nulling shape while adding exact Slack reconciliation, and PR #104539 later coupled structured fanout callback forwarding to its single-message marker.
AI-assisted: yes. The implementation and proof were reviewed by Claude and by the repository Codex autoreview workflow.
User Impact
Slack structured messages now retain the same cancellation and delivery-lease custody as ordinary text and media sends. Multi-message structured fanout continues to avoid claiming a single exact reconciliation identifier for several Slack messages.
Evidence
undefinedinstead of the callback.node scripts/run-vitest.mjs extensions/slack/src/channel.message-adapter.test.ts extensions/slack/src/outbound-payload.test.ts— 34/34 tests passed.node scripts/check-changed.mjs -- extensions/slack/src/channel.ts extensions/slack/src/outbound-adapter.ts extensions/slack/src/channel.message-adapter.test.ts extensions/slack/src/outbound-payload.test.ts— passed on Blacksmith Testbox leasetbx_01m00ea864sxtas4kfgjf9g1ts; run https://github.com/openclaw/openclaw/actions/runs/31814802516.git diff --checkpassed.@slack/[email protected]request types and itschat.postMessage→apiCalltransport boundary.3a16cefeb280600d20f4e818d8c562155439735b; no touched-path owner overlap and no semantic or LOC drift.