Skip to content

fix(slack): preserve authored fallback without duplicate controls - #144653

Merged
obviyus merged 1 commit into
mainfrom
fix/slack-authored-fallback
Sep 11, 2026
Merged

obviyus merged 1 commit into
mainfrom
fix/slack-authored-fallback

Conversation

@obviyus

@obviyus obviyus commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator

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.

@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added channel: slack Channel integration: slack size: L maintainer Maintainer-authored PR labels Sep 11, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 11, 2026
@clawsweeper

clawsweeper Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed September 11, 2026, 12:31 AM ET / 04:31 UTC.

ClawSweeper review

What this changes

The 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
Reviewed head: 6ef5546514949bca0b77e87b880bb96911351a18

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation is focused and has meaningful regression coverage, while real Slack behavior remains unproven.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The reported checks exercise Slack’s registered adapter, sender, and slash planner, but use a fake Slack client or captured response boundary. They support compiler behavior without showing Slack accepting and displaying the after-fix messages. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The reported checks exercise Slack’s registered adapter, sender, and slash planner, but use a fake Slack client or captured response boundary. They support compiler behavior without showing Slack accepting and displaying the after-fix messages. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 7 items Current main still needs the Slack repair: The current-main compiler uses payload.text as independent authored content without checking presentationTextMode. The shared renderer withholds marked fallback text before invoking the channel renderer, establishing the duplicate-text and lost-continuation paths addressed here.
Existing presentation contract: The documented fallback marker distinguishes authored alternative text from independent prose; command fallbacks must remain copyable and opaque callback values remain private.
Introduced normalization and compilation: Normalization replaces saved fallback from the current payload and removes it when presentation is cleared. Compilation distinguishes marked alternatives, preserves companion blocks, and emits the complete authored text when no substantive native presentation survives.
Findings None None.
Security None None.

How this fits together

Slack’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
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The reported checks exercise Slack’s registered adapter, sender, and slash planner, but use a fake Slack client or captured response boundary. They support compiler behavior without showing Slack accepting and displaying the after-fix messages. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Complete next step (P2) - Add real after-fix Slack evidence to the PR body before merge. Redact IP addresses, keys, phone numbers, private endpoints, and other private data. Updating the body should trigger review automatically; otherwise ask a maintainer to comment @clawsweeper re-review.
Agent review details

Security

None.

PR surface

Source +66, Tests +432. Total +498 across 15 files.

View PR surface stats
Area Files Added Removed Net
Source 9 106 40 +66
Tests 6 442 10 +432
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 15 548 50 +498

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +66 net lines; tests +432 net lines Production growth supports shared normalization and fallback handling, with most added code devoted to regression coverage.

Technical review

Best 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.

Labels

Label changes:

  • add P2: This repairs bounded Slack presentation and accessibility failures without evidence of a widespread outage.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The reported checks exercise Slack’s registered adapter, sender, and slash planner, but use a fake Slack client or captured response boundary. They support compiler behavior without showing Slack accepting and displaying the after-fix messages. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P2: This repairs bounded Slack presentation and accessibility failures without evidence of a widespread outage.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The reported checks exercise Slack’s registered adapter, sender, and slash planner, but use a fake Slack client or captured response boundary. They support compiler behavior without showing Slack accepting and displaying the after-fix messages. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Current main still needs the Slack repair: The current-main compiler uses payload.text as independent authored content without checking presentationTextMode. The shared renderer withholds marked fallback text before invoking the channel renderer, establishing the duplicate-text and lost-continuation paths addressed here. (extensions/slack/src/reply-blocks.ts:493, b7402c5b9e99)
  • Existing presentation contract: The documented fallback marker distinguishes authored alternative text from independent prose; command fallbacks must remain copyable and opaque callback values remain private. Public docs: docs/plugins/message-presentation.md. (docs/plugins/message-presentation.md:554, 6ef554651494)
  • Introduced normalization and compilation: Normalization replaces saved fallback from the current payload and removes it when presentation is cleared. Compilation distinguishes marked alternatives, preserves companion blocks, and emits the complete authored text when no substantive native presentation survives. (extensions/slack/src/reply-blocks.ts:62, 6ef554651494)
  • Release check: The latest supplied release, v2026.9.4, also treats payload.text independently in the Slack compiler; it does not contain this marker-aware repair. (extensions/slack/src/reply-blocks.ts:487, 3a9d69db306c)
  • Proof scope verified against the PR body: The complete captured body, sourceRevision 21b719e9e3af54bff9573f96ed9aa8497a96c5f6003b3f03c7ad340179c29c1d, matches the REST response at the pinned head. It reports 444 focused tests and 27 mock-Gateway cases, explicitly identifies a fake Slack client and response-boundary slash checks, and states that no live Slack round-trip occurred. (6ef554651494)
  • Feature-history routing: Recent main history includes shared reply projection, prepared structured replies, and mirrored-control deduplication work. GitHub resolves the projection commit author to steipete. Exact line attribution could not be completed because a historical blob was unavailable; no introduction claim is made. (extensions/slack/src/reply-blocks.ts, 6f46b37dc9c7)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add after-fix Slack evidence showing controls once, complete literal fallback with companion content, and successful dense-select delivery; screenshots or recordings are preferred where visible, and redacted logs or live output also count.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@obviyus
obviyus merged commit 543718e into main Sep 11, 2026
104 checks passed
@obviyus
obviyus deleted the fix/slack-authored-fallback branch September 11, 2026 04:49
@obviyus

obviyus commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

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.

  • Bug: Marked presentation text could repeat beside controls or lose its literal continuation.
  • Fix: One Slack compiler selects native content or complete literal fallback, preserves companions, and bounds derived accessibility text without dropping controls.
Before After
Native controls could repeat their authored alternative text. Native controls appear once.
Fallback could alter command bytes or lose the continuation. Full literal text survives, including long replies split into messages.
Final delivery needed proof after an active preview. Captures show acknowledged preview posts, complete finals, and deletion of the exact previews.

CI run. The approved isolated proof scope did not require a live Slack round-trip; none is claimed. No unrelated-red exception was used.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 12, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: slack Channel integration: slack maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant