Repository navigation
fix(slack): explicitly chunk native-data fallbacks - #117809
Conversation
|
Live-proof update: the exact |
|
Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 7:01 AM ET / 11:01 UTC. ClawSweeper reviewWhat this changesThe PR makes Slack send native-data fallbacks as explicit, ordered text chunks so every delivered fallback message is represented in the receipt and can be reconstructed during readback. Merge readinessThis is an active maintainer-authored bug fix with a coherent owner-boundary repair: the Slack fallback planner now produces explicit receipt-trackable posts, and the canonical send loop records each returned identity for reconciliation. No blocking patch defect was found; retain the explicit 4,000-character cap only for receipt-sensitive fallbacks and complete the normal exact-head merge checks. Likely related people: Peter Steinberger is the high-confidence current feature owner from the introducing code history. Priority: P2 Review scores
Verification
How this fits togetherSlack turns assistant output and Block Kit payloads into flowchart LR
A[Assistant output and Slack blocks] --> B[Slack delivery planner]
B --> C{Native-data fallback required?}
C -->|Yes| D[Receipt-sized explicit chunks]
D --> E[Canonical Slack send loop]
E --> F[Ordered message timestamps]
F --> G[Receipt reconciliation and readback]
C -->|No| E
Before merge
Agent review detailsSecurityNone. PR surfaceSource +109, Tests +203. Total +312 across 8 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the delivery planner as the single owner of receipt-safe fallback chunking, preserve configured limits at or below 4,000 characters, and merge only after the current base and required checks confirm the exact combined result. Do we have a high-confidence way to reproduce the issue? Yes: the changed QA scenario forces the existing Is this the best way to solve the issue? Yes: placing explicit chunking in the native-data fallback planner and retaining the canonical send loop is the narrowest maintainable repair. Inferring unreturned server-generated parts from Slack history would leave receipt ownership ambiguous and would not reliably preserve ordering. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9cf12734e675. 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
History |
* fix(slack): explicitly chunk native-data fallbacks * fix(slack): honor one-character fallback chunks * qa(slack): reconstruct chunked fallback evidence * fix(slack): cap receipt-tracked fallbacks at 4k
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers
can help update the branch when needed.
What Problem This Solves
Large native-data fallbacks could lose their earliest rows from OpenClaw's receipt and readback. Slack can split an over-recommended-size
chat.postMessagerequest while returning only one timestamp. OpenClaw then knew only the later server-generated part.The exact live 8K proof reproduced that remaining loss: OpenClaw's attempted requests reconstructed the complete table, but Slack split the first 8K fallback request around 4K and the retained readback began at row 35.
Why This Change Was Made
The Slack native-data delivery planner is the architectural owner. It now:
The general Slack 8K message policy is unchanged. Only fallback posts whose complete receipt matters use the 4K boundary. There is no new config surface, retry, timeout increase, or alternate delivery path.
Slack's official
chat.postMessagedocumentation recommends keepingtextwithin 4,000 characters and documents truncation above 40,000. Slack's rate-limit guidance says channel clients should limit messages to 4,000 characters. The installed@slack/web-apiresponse contract exposes one optionaltsper call, so explicit calls are the only reliable receipt boundary.Official contracts:
User Impact
Large Slack tables and other native-data fallbacks retain every explicitly delivered message identity. Receipt/readback can reconstruct the complete ordered fallback, including the first and final rows.
Scope and LOC
ef776445b890676f3f18dfde09415eb839de3d3fnative-data-fallback.ts,send.ts,limits.ts).The positive production delta establishes the explicit API-call/receipt ownership boundary, Unicode-safe chunking, ordered receipt accumulation, and exact multi-message readback proof. No connected legacy path was retained or added.
Evidence
native-data-fallback.test.ts,send.blocks.test.ts, andsend.reconcile.test.ts.slack-live.runtime.test.ts, including reverse Slack-history order, exact reconstruction, first/final rows, distinct ordered receipt identities, and later-part failure diagnostics.tbx_01kz112w5knx58z6ywen4qxrs5; command 7m40.542s, total 7m42.725s; backing run https://github.com/openclaw/openclaw/actions/runs/30744269572.Live progression:
.artifacts/qa-e2e/pr117809-872828c-slack-fallback-live-20260802T101627Z/exposed the stale two-attempt QA assumption after product chunking produced three attempts..artifacts/qa-e2e/pr117809-f0f7fe8-slack-fallback-live-20260802T103722Z/proved the 8K product boundary still lost rows 1–34 after Slack split the first request..artifacts/qa-e2e/pr117809-ef77644-slack-fallback-live-20260802T105300Z/passed on the exact head: 24.632s suite, 30s command, one rejected native request plus three explicit fallback chunks, 101 data rows, formatting disabled, no stored native-data blocks, first row present, final row present, and exact normalized complete delivery.Receipt/message identities are intentionally redacted.