fix(slack): preserve buffered thread stream replies#78536
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 19, 2026, 9:00 AM ET / 13:00 UTC. Summary Reproducibility: yes. at source level: Review metrics: 2 noteworthy metrics.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land this four-file Slack-only merge result, or an equivalent patch, after maintainer acceptance of the definitive-error allowlist and exact-head validation. Do we have a high-confidence way to reproduce the issue? Yes at source level: Is this the best way to solve the issue? Yes: the PR extends the existing Slack-owned finalize fallback allowlist and reuses AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ce7f89916522. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
byungskers
left a comment
There was a problem hiding this comment.
Excellent bug fix with thorough documentation and test coverage. The Slack native streaming buffer contract is tricky, and losing short replies because stopStream failed before flush is a frustrating user experience.
A few constructive notes:
-
Fallback delivery duplication risk: The PR mentions that
pendingTextis cleared after acknowledged native flushes, which avoids replay. Could you add a test that explicitly verifies no duplicate delivery occurs if a partial flush succeeded before the final stop failure? -
Error classification: The change broadens the error allowlist for fallback delivery. Is there any error type where fallback delivery would be incorrect (e.g., rate limits or auth failures where retrying via
chat.postMessagewould also fail)? The current approach seems safe since it only posts already-generated text, but worth confirming. -
Testbox gap: You noted Testbox was unavailable for
pnpm check:changed. If this merges before you can run it, consider scheduling a follow-up Testbox run or asking a maintainer to trigger one — the Slack extension has enough surface area that changed-surface validation is valuable.
The real behavior proof section is particularly well done. The before/after flow diagram makes the change easy to understand. LGTM with minor test suggestions.
|
when will this be merged to main? |
552ebcc to
1799121
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b3bec1a3b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if let appGroupStateDirURL { | ||
| return appGroupStateDirURL |
There was a problem hiding this comment.
Migrate existing identity before switching stores
When an installed iOS app is upgraded with the new App Group entitlement, this branch selects the empty App Group container before the old Application Support/OpenClaw directory. Previous builds wrote identity/device.json and identity/device-auth.json only under the legacy directory, so DeviceIdentityStore.loadOrCreate() will generate a new device id and DeviceAuthStore.loadToken() will miss saved gateway tokens, breaking trusted device auth and forcing users to re-pair. Please read/copy the legacy identity and auth files before preferring the App Group store.
Useful? React with 👍 / 👎.
|
Land-ready verification for
Known gap: no live Slack workspace stream interruption; Slack API outcomes are covered through the native-stream test seam. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a3155ca99a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| public enum ShareGatewayRelaySettings { | ||
| private static let suiteName = "group.ai.openclaw.shared" | ||
| private static var suiteName: String { OpenClawAppGroup.identifier } |
There was a problem hiding this comment.
Migrate share settings from the old app group
For users upgrading from builds that saved share relay or default-instruction state under the previous group.ai.openclaw.shared suite, this now reads only OpenClawAppGroup.identifier. That leaves ShareGatewayRelaySettings.loadConfig() empty until the main app reconnects, so the share extension can report that OpenClaw is not connected, and ShareToAgentSettings.loadDefaultInstruction() similarly drops the user's saved default share instruction. Please read/copy the old suite keys once before switching fully to the new app group.
Useful? React with 👍 / 👎.
|
Merged via squash.
Thanks @vincentkoc! |
Merged via squash. Prepared head SHA: 0d8d759 Co-authored-by: vincentkoc <[email protected]> Co-authored-by: steipete <[email protected]> Reviewed-by: @steipete
Summary
Closes #78061. Related: #78059.
Root cause
Slack SDK
ChatStreamerbuffers shortmarkdown_textlocally. OpenClaw already recovered buffered text for a narrow set of finalization failures, but did not includemethod_not_supported_for_channel_type. The original PR idea broadened recovery to every finalization failure; review showed that would risk duplicate messages when a transport failure happened after Slack accepted the stop request.This revision keeps the existing explicit, definitive-error allowlist. It also makes fallback failure observable instead of silently treating an earlier partial stream as overall success.
Verification
node scripts/run-vitest.mjs extensions/slack/src/streaming.test.ts extensions/slack/src/monitor/message-handler/dispatch.preview-fallback.test.ts— 2 files, 103 tests passednode_modules/.bin/oxfmt --check extensions/slack/src/monitor/message-handler/dispatch.ts extensions/slack/src/monitor/message-handler/dispatch.preview-fallback.test.ts— passedgit diff --check— passedpnpm check:changed— passed; runrun_b851396c0d41, leasecbx_f5bb0fdc7b61(stopped)Real behavior proof
node scripts/run-vitest.mjs extensions/slack/src/streaming.test.ts extensions/slack/src/monitor/message-handler/dispatch.preview-fallback.test.tsrun_b851396c0d41.Compatibility and risk