Skip to content

Keep Slack progress and final replies in one message - #119376

Merged
pash-openai merged 8 commits into
sjf_openclaw_2026-07-31from
pash/personal-claw-slack-presence
Aug 5, 2026
Merged

pash-openai merged 8 commits into
sjf_openclaw_2026-07-31from
pash/personal-claw-slack-presence

Conversation

@pash-openai

@pash-openai pash-openai commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Slack currently posts a working draft, sends the answer as a separate message, and leaves behind a timing or tool-count receipt. That creates unnecessary notifications and makes a capable assistant feel noisy.

Keep only the latest complete model preamble in a single italicized draft, then edit that same message into the final answer. Existing native and explicitly verbose streaming paths remain intact. Focused coverage includes successive preambles, complete long commentary, stable message identity, safe escaping, oversized replies, and the final in-place handoff.

A live Slack conversation on this exact commit produced one italic progress reply, then replaced that same message with the complete final answer after a real tool call. No second reply, receipt, or timing message remained:

while working, message A: _I’m checking the source and the conversation before answering._
after completion, message A: taste check passed 191f
final bot messages in the thread: 1

This change targets the July 31 release branch and is intentionally limited to Slack message delivery.

@openclaw-barnacle openclaw-barnacle Bot added channel: slack Channel integration: slack size: S maintainer Maintainer-authored PR labels Aug 4, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

return {
text: previewFinalText,
blocks: slackBlocks,

P1 Badge Guard Slack progress final edits against truncation

When status-final progress falls through to this preview-edit path, any final answer over Slack's edit limit is now sent through finalizeSlackPreviewEdit/editSlackMessage; that helper truncates edit text at SLACK_EDIT_TEXT_MAX_BYTES in extensions/slack/src/actions.ts:382, while the old fresh-send path used deliverReplies chunking in extensions/slack/src/monitor/replies.ts:503. So a long Slack progress reply can be marked delivered after silently replacing the draft with only the first ~4KB instead of sending the complete chunked answer; skip in-place finalization or fall back to normal delivery when the edit payload exceeds the update limit.

ℹ️ 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".

@pash-openai
pash-openai force-pushed the pash/personal-claw-slack-presence branch from 6b5dfd4 to 6898d59 Compare August 4, 2026 23:40
@pash-openai
pash-openai force-pushed the pash/personal-claw-slack-presence branch from 6898d59 to 0d47ff4 Compare August 4, 2026 23:50
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Aug 5, 2026
@clawsweeper

clawsweeper Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 4, 2026, 11:08 PM ET / August 5, 2026, 03:08 UTC.

ClawSweeper review

What this changes

This PR makes non-native Slack progress drafts become the final reply in place, removing the separate final reply and timing or tool receipt while preserving native streaming.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open for human release-branch review: current main still posts a fresh Slack final and then a receipt, while this PR routes the non-native draft through the existing finalization path; no concrete patch defect was found.

Priority: P1
Reviewed head: 588a8af47fbd459adf30e5c4344b39fbd4c9476e
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-aligned Slack delivery refinement with convincing live behavior proof and no actionable correctness finding.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The PR body contains redacted exact-head live Slack output showing one draft message become the sole final reply after a real tool call.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body contains redacted exact-head live Slack output showing one draft message become the sole final reply after a real tool call.
Evidence reviewed 7 items Current-main behavior remains noisy: Current main's non-native progress/status-final path sends a fresh final and then collapses the draft into a receipt, so the reported behavior is not already implemented.
PR uses the canonical finalization path: The PR removes the non-native special send-and-receipt branch, allowing the existing preview-finalization adapter to flush and seal the draft, edit when safe, and otherwise fall back to normal delivery.
Shared fallback contract: The shared finalizer seals an editable draft, falls back to normal delivery when it cannot edit, and clears only after successful fallback delivery.
Findings None None.
Security None None.

How this fits together

Slack progress mode creates a temporary draft while an agent works, then completes delivery in the selected thread. The dispatcher decides whether to edit that draft into the final answer or use the normal fallback sender.

flowchart LR
  A[Agent response] --> B[Slack dispatcher]
  B --> C{Native progress stream?}
  C -->|Yes| D[Progress cards and final reply]
  C -->|No| E[Draft preview]
  E --> F[Finalization decision]
  F --> G[Edit draft or send fallback]
Loading

Decision needed

Question Recommendation
Should the July 31 release branch include this Slack delivery behavior change? Include the Slack refinement: Accept the one-message behavior for non-native progress drafts in this release branch.

Why: The patch is technically sound and has exact-head live proof, but whether to change visible Slack notification semantics on a release branch is a maintainer release-scope choice.

Before merge

  • Resolve merge risk (P1) - Merging deliberately changes non-native Slack progress delivery from a fresh final plus receipt to an in-place edit, so the release-branch owner must accept the changed notification and transcript semantics.
  • Complete next step (P2) - A protected maintainer label and release-branch inclusion choice require human approval; no mechanical repair remains.
Agent review details

Security

None.

PR surface

Source -7, Tests +125. Total +118 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 36 43 -7
Tests 1 145 20 +125
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 181 63 +118

Review metrics

Metric Value Why it matters
Production vs test delta production +36/-43, tests +145/-20 The production change removes a specialized delivery path in favor of the existing finalizer, with focused coverage for the newly selected fallback boundaries.

Merge-risk options

Maintainer options:

  1. Accept the one-message release behavior (recommended)
    Approve the tested in-place finalization semantics for this release branch after confirming the changed Slack notification behavior is intended.
  2. Defer the visible behavior change
    Keep this release branch on its existing send-and-receipt behavior and move the patch to main for later product review.

Technical review

Best possible solution:

Keep native streaming and all unsafe or oversized cases on their existing fallback paths, while using the shared preview finalizer for safe non-native status-final drafts.

Do we have a high-confidence way to reproduce the issue?

Yes: current main's non-native progress/status-final branch source-proves the fresh-final-plus-receipt behavior, and the PR body supplies an exact-head live Slack transcript showing the changed path.

Is this the best way to solve the issue?

Yes: removing the special branch lets the existing preview finalizer retain its safe edit gates, fallback delivery, and delivery bookkeeping rather than creating a second finalization mechanism.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 22de30f99821.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body contains redacted exact-head live Slack output showing one draft message become the sole final reply after a real tool call.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body contains redacted exact-head live Slack output showing one draft message become the sole final reply after a real tool call.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P1: This changes a live Slack reply workflow and removes an extra visible message for affected users.
  • merge-risk: 🚨 message-delivery: The PR intentionally changes how non-native Slack progress and final replies are emitted in a conversation.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body contains redacted exact-head live Slack output showing one draft message become the sole final reply after a real tool call.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body contains redacted exact-head live Slack output showing one draft message become the sole final reply after a real tool call.

Evidence

What I checked:

Likely related people:

  • steipete: Current-line blame and repeated Slack progress, preview, and channel-delivery refactors connect this person to the owner boundary. (role: current Slack delivery and preview owner; confidence: high; commits: 7a0a4c5f2a3b, edfeec49e7a7, bd9a996b7892; files: extensions/slack/src/actions.ts, extensions/slack/src/monitor/message-handler/dispatch.ts, src/channels/message/live.ts)
  • sjf-oa: Recent Slack escaping work and the release-branch history connect this person to the adjacent progress-draft behavior. (role: recent Slack-area contributor; confidence: medium; commits: c56eaca14bd0, 9a79e18270db, d579ea5a9603; files: extensions/slack/src/monitor/message-handler/dispatch-progress.ts, extensions/slack/src/monitor/message-handler/dispatch.preview-fallback.test.ts)

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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-08-05T00:05:51.616Z sha 0d47ff4 :: needs real behavior proof before merge. :: [P1] Preserve oversized progress finals | [P2] Escape commentary even without tool progress
  • reviewed 2026-08-05T01:07:18.820Z sha 27fe615 :: needs real behavior proof before merge. :: [P1] Avoid truncating oversized progress finals | [P2] Escape commentary when tool progress is disabled
  • reviewed 2026-08-05T02:05:44.270Z sha 588a8af :: needs real behavior proof before merge. :: none

@pash-openai
pash-openai requested a review from a team as a code owner August 5, 2026 00:48
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Dependency graph guard cleared

This PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh /allow-dependencies-change comment after the guard blocks that new head SHA.

  • Current SHA: 588a8af47fbd459adf30e5c4344b39fbd4c9476e

@github-actions github-actions Bot removed the dependencies-changed PR changes dependency-related files label Aug 5, 2026
@sjf-oa
sjf-oa force-pushed the sjf_openclaw_2026-07-31 branch from 371584b to 203d54b Compare August 5, 2026 01:19
…sh/personal-claw-slack-presence

# Conflicts:
#	extensions/slack/src/monitor/message-handler/dispatch-progress.ts
#	extensions/slack/src/monitor/message-handler/dispatch.preview-fallback.test.ts
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. label Aug 5, 2026
@pash-openai

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 5, 2026
@pash-openai
pash-openai merged commit a61bd1b into sjf_openclaw_2026-07-31 Aug 5, 2026
112 of 124 checks passed
@pash-openai
pash-openai deleted the pash/personal-claw-slack-presence branch August 5, 2026 04:34
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 5, 2026
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 merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants