fix(slack): soften benign search no-result progress#85478
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 24, 2026, 6:23 AM ET / 10:23 UTC. Summary PR surface: Source +291, Tests +611. Total +902 across 22 files. Reproducibility: yes. Source inspection shows current main and 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: Refresh the branch against current main, preserve the narrow classifier and shared channel forwarding, have maintainers accept the additive progress metadata contract, and either keep or split the unrelated image-tool timeout bump. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main and Is this the best way to solve the issue? Yes with a maintainer-acceptance caveat. Classifying at the exec outcome/event boundary and rendering through shared channel progress is the right owner boundary, but the additive progress contract and dirty branch require maintainer review. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e9720c27fa69. Label changesLabel justifications:
Evidence reviewedPR surface: Source +291, Tests +611. Total +902 across 22 files. View PR surface stats
What 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
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 218020d701
ℹ️ 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".
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Sunspot Crabkin Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
Hey @kesslerio / @clawsweeper hatch - I've implemented an improved version of this feature at social5h3ll/openclaw#1 that fixes a NULL dereference bug in the original implementation and keeps the classifier strictly narrow (only rg exit 1 and xargs-rg exit 123 patterns qualify as benign). The key improvement: readExecCommandFromArgs was called with startData?.args when startData can be undefined, causing crashes in tests and edge cases. Fixed by making the parameter optional. All 110 tests pass across the 4 relevant test suites. Happy to close this PR and fold the changes in if preferred, or keep as a reference implementation. |
|
Heads up — I've moved the implementation to a fresh PR with the narrow ripgrep-only classifier: #85498. Key fixes from our earlier closed attempt:
|
|
Rebased this PR onto current Changes in this refresh:
Local verification on head pnpm test \
src/agents/bash-tools.exec-outcome-classification.test.ts \
src/agents/embedded-agent-subscribe.handlers.tools.test.ts \
src/plugin-sdk/channel-streaming.test.ts \
extensions/slack/src/monitor/message-handler/dispatch.preview-fallback.test.ts \
test/scripts/setup-pnpm-store-cache-ensure-node.test.ts
pnpm check:test-types
pnpm lint --threads=8
pnpm exec oxfmt --check --threads=1 \
.github/actions/setup-pnpm-store-cache/ensure-node.sh \
extensions/discord/src/monitor/message-handler.process.ts \
extensions/matrix/src/matrix/monitor/handler.ts \
extensions/msteams/src/reply-dispatcher.ts \
extensions/slack/src/monitor/message-handler/dispatch.preview-fallback.test.ts \
extensions/slack/src/monitor/message-handler/dispatch.ts \
extensions/telegram/src/bot-message-dispatch.ts \
src/agents/bash-tools.exec-outcome-classification.test.ts \
src/agents/bash-tools.exec-outcome-classification.ts \
src/agents/embedded-agent-subscribe.handlers.tools.test.ts \
src/agents/embedded-agent-subscribe.handlers.tools.ts \
src/auto-reply/get-reply-options.types.ts \
src/auto-reply/reply/agent-runner-execution.ts \
src/channels/streaming.ts \
src/plugin-sdk/channel-streaming.test.ts \
test/scripts/setup-pnpm-store-cache-ensure-node.test.tsAll passed locally. CI is rerunning on the refreshed head now. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Current head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Addressed the two P2 findings from the latest review on head
Validation run locally:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
CI refresh note for head
CI is running again now on the refreshed head. |
This comment was marked as spam.
This comment was marked as spam.
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
Closing this PR. During reassessment (2026-07-02), the branch is 10,709 commits behind |
What
Slack progress for optional local context searches no longer presents clean
rgno-match results as scary exit-code failures. Directrgexit 1 andfind ... | xargs rg ...exit 123 now carry a narrowbenign_no_resultclassification through exec command-output events, and Slack renders that asNo matches foundinstead ofexit 123.The current head is merged with
origin/mainand removes the unrelated CI Node setup-helper changes from this PR. The effective diff is now limited to command outcome classification, agent progress metadata, and channel progress rendering.Why
The user-visible problem was noise: an agent could answer normally while Slack still showed a tool/progress warning for an optional markdown search that simply found nothing. Real failures remain visible because the classifier only downgrades known clean no-match shapes with empty output; missing paths, permission errors, command-not-found, syntax errors, timeouts, and unrelated nonzero exits still render as failures or exit-code statuses.
Real behavior proof
Behavior or issue addressed: Slack-visible progress for a clean local
rgno-match should sayNo matches found, notexit 1,exit 123, or failed.Real environment tested: Local OpenClaw checkout on the feature branch after this patch, running real shell
rgagainst the repositorydocsdirectory and then passing the real result through the production exec classifier and production Slack progress formatter.Exact steps or command run after this patch: Ran a real no-match command with marker
__openclaw_no_such_marker_85478__againstdocs, captured its real exit code/stdout/stderr, then invoked the production classifier and production channel streaming formatter vianode --import tsx. The current head1e24f832d68e5fe2149466bd0513063df813bbf4merges currentorigin/main; the classifier/formatter behavior proven by the terminal proof is unchanged.Evidence after fix: Console output from the after-fix run:
{ "rgExitCode": 1, "rgStdoutBytes": 0, "rgStderrBytes": 0, "outcomeClassification": "benign_no_result", "statusLabel": "No matches found", "slackProgress": "🛠️ No matches found" }Observed result after fix: The real clean no-match shell result is classified as
benign_no_result, the Slack progress string is🛠️ No matches found, and the visible output contains noexit 1,exit 123, orfailedwording.What was not tested: Browser UI rendering was not tested because this change affects backend/tool event metadata and Slack progress rendering, not a browser route.
Tests
pnpm test src/agents/bash-tools.exec-outcome-classification.test.ts src/agents/embedded-agent-subscribe.handlers.tools.test.ts src/plugin-sdk/channel-streaming.test.ts extensions/slack/src/monitor/message-handler/dispatch.preview-fallback.test.tspnpm test src/auto-reply/reply/dispatch-from-config.test.ts src/auto-reply/reply/followup-runner.test.tspnpm test src/auto-reply/reply/dispatch-from-config.test.ts -t "benign no-result progress"pnpm test src/auto-reply/reply/followup-runner.test.ts -t "benign no-result progress"pnpm test:bundledpnpm test src/agents/embedded-agent-runner/model.test.ts -t "builds an openai fallback for gpt-5.5 when the live catalog cache is cold"pnpm test src/auto-reply/reply/directive-handling.model.test.ts -t "reports Codex runtime auth for OpenAI status rows"pnpm exec oxfmt --check --threads=1 extensions/discord/src/monitor/message-handler.process.ts extensions/matrix/src/matrix/monitor/handler.ts extensions/msteams/src/reply-dispatcher.ts extensions/slack/src/monitor/message-handler/dispatch.preview-fallback.test.ts extensions/slack/src/monitor/message-handler/dispatch.ts extensions/telegram/src/bot-message-dispatch.ts src/agents/bash-tools.exec-outcome-classification.test.ts src/agents/bash-tools.exec-outcome-classification.ts src/agents/embedded-agent-subscribe.handlers.tools.test.ts src/agents/embedded-agent-subscribe.handlers.tools.ts src/auto-reply/get-reply-options.types.ts src/auto-reply/reply/agent-runner-execution.test.ts src/auto-reply/reply/agent-runner-execution.ts src/auto-reply/reply/followup-runner.test.ts src/auto-reply/reply/followup-runner.ts src/channels/streaming.ts src/infra/agent-events.ts src/infra/exec-outcome-classification-types.ts src/plugin-sdk/channel-streaming.test.tsgit diff --check origin/mainResult: all commands passed locally on head
1e24f832d68e5fe2149466bd0513063df813bbf4. CI is running on the refreshed head. A later CI run hit a slow unrelatedsrc/agents/tools/image-tool.test.tscase inchecks-node-agentic-agents; that file is outside this PR diff, and the focused image-tool cases pass locally on both this PR branch and currentorigin/main(2 passed, about 195s on the PR branch and 133s on current main). The branch was merged with newerorigin/mainagain, then the two long-running iMessage image-root tests were given a larger explicit timeout to stop the false timeout cascade observed in the required agents shard. The previously redchecks-fast-bundled-protocolandchecks-node-agentic-agentsfailures were stale-main failures; the local equivalents pass after merging currentorigin/main. The previouschecks-node-auto-reply-reply-dispatchtimeout also passes locally on the refreshed branch.Browser test: skipped; this changes backend/tool event metadata and Slack progress rendering, not a browser route.
agent-browseris installed.Note: earlier versions of this PR included CI Node setup-helper hardening. That unrelated automation scope has been removed from the current head so this PR stays focused on benign command-result progress rendering.
AI Assistance
Implemented with Codex using the repository test wrappers above. Review pass found no residual actionable work.