Repository navigation
fix(slack): preserve authored fallback without duplicate controls - #144653
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. Reviewed September 11, 2026, 12:31 AM ET / 04:31 UTC. ClawSweeper reviewWhat this changesThe PR preserves complete authored Slack fallback text, avoids repeating native controls, retains companion content, and bounds generated accessibility summaries. Merge readiness⛔ Blocked before merge - 2 items remain This remains a useful Slack fix that current main does not provide. No concrete introduced correctness defect was found, but the supplied fake-client validation does not satisfy the real-behavior proof gate. Priority: P2 Review scores
Verification
How this fits togetherSlack’s reply compiler converts shared presentations, authored text, and companion blocks into ordered Slack messages. Its output feeds ordinary sends, slash-command responses, and preview or streaming delivery. flowchart TD
A[Authored reply and presentation] --> B[Slack payload normalization]
B --> C[Slack reply compiler]
D[Companion blocks] --> C
C --> E{Native content or literal fallback}
E --> F[Bounded accessible blocks]
E --> G[Complete plain text]
F --> H[Slack delivery]
G --> H
Before merge
Agent review detailsSecurityNone. PR surfaceSource +66, Tests +432. Total +498 across 15 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one Slack compiler responsible for native-versus-fallback selection, literal text preservation, companion ordering, and bounded accessibility output. Do we have a high-confidence way to reproduce the issue? Yes, source tracing establishes the failing path for a marked authored fallback with an unsupported command presentation: shared rendering removes the text before Slack compiles it. This review did not execute the path. Is this the best way to solve the issue? Yes at source level: the patch extends the existing Slack compiler and normalization hook, preserves the shared presentation contract, and keeps literal fallback out of incompatible streaming paths. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b7402c5b9e99. 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
|
|
Landed as 543718e. Proof: 444 focused tests, 27 supplemental mock-Gateway cases, and five baseline/candidate cases through the real Slack Socket Mode receiver. The latter cover complete literal replies after active previews, companion preservation, and all 600 select options. Exact-head CI and ClawSweeper review passed.
CI run. The approved isolated proof scope did not require a live Slack round-trip; none is claimed. No unrelated-red exception was used. |
…enclaw#144653) Related: openclaw#136257. Follows the shared presentation contract in openclaw#144329 and the Telegram behavior in openclaw#140108. ## What Problem This Solves Fixes an issue where Slack replies repeat authored choice text beside native controls, or lose the authored continuation when a presentation needs a text fallback. Large select menus can also make delivery fail when their expanded accessibility summary exceeds the message limit. ## Why This Change Was Made Slack now uses the presentation marker to choose native content or the complete literal fallback. Independent companions survive that choice. The registered channel and outbound adapter share normalization, including removal of saved fallback text after a policy rewrite clears the presentation. Derived accessibility text is bounded while native controls remain intact. Authored text still uses the existing message splitting path. Literal fallbacks bypass incompatible preview and native streaming paths. ## User Impact Supported controls appear once. Unsupported commands remain copyable, with their full authored continuation. Rich-text companions survive long replies, and policy changes cannot revive retired fallback text. ## Evidence - Baseline `c0b5fcea59ff5d2fd609802aca3b9e8a5e34021c`: 13 focused regression failures, plus captured duplication and lost continuation through an isolated Gateway. - 444 focused tests pass across nine Slack owner and sibling files, including the registered channel, outbound adapter, reply compiler, native-data fallback, sends, slash replies, preview dispatch, and preview finalization. - Isolated mock-Gateway proof covers 27 cases: one actions block with six selects of 100 options each, rich-text companions, a continuation above 40,000 characters, policy clear/rewrite, and native-data rejection. - Additional baseline/candidate proof drives five scenarios through the shipped Slack Socket Mode receiver, durable ingress, session admission, and real dispatch. Short and long companion replies follow an acknowledged active preview; API captures include deletion of that preview and complete final delivery. - Formatting, focused lint, line-count and assertion-safety checks pass. Type checks and full CI are left to GitHub. - The approved validation scope for this extraction is isolated mock-Gateway proof; a live Slack round-trip is not required and was not run. Socket Mode proof uses a local Slack service and the real Slack SDK; supplemental outbound proof drives the registered adapter and real sender through a fake client. No live Slack UI or Telegram result is claimed. No config keys, schema, or persistence changes. Co-authored-by: Ayaan Zaidi <[email protected]>
Related: #136257, #144329, #140108.
What Problem This Solves
Channel replies could repeat authored choice text beside native controls, lose continuation text in a fallback, or fail when a large select menu expanded beyond the accessibility-text limit.
Why This Change Was Made
The channel and outbound adapter share presentation normalization. They choose native content or the complete literal fallback while preserving independent companion content. Derived accessibility text is bounded; authored text keeps its existing splitting behavior. Clearing a presentation also clears its saved fallback.
User Impact
Supported controls appear once. Unsupported commands stay copyable with the full continuation. Long replies retain rich-text companions, and policy changes cannot restore retired fallback text. No configuration or stored-state change is required.
Evidence
The original code failed 13 regressions and showed duplication and lost continuation through an isolated Gateway. All 444 focused tests passed. A mock-Gateway run covered 27 cases, including large select menus, long continuations, policy rewrites, and native-data rejection. Five before/after scenarios used the shipped Socket Mode receiver and real dispatch against a local service, including preview deletion and final delivery. A live platform round trip was not run.