Repository navigation
auto-reply: suppress reasoning-prefixed NO_REPLY - #80930
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed May 27, 2026, 1:04 AM ET / 05:04 UTC. Summary PR surface: Source +52, Tests +36. Total +88 across 3 files. Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge Review detailsBest possible solution: Retry the Codex review after fixing the execution failure. Do we have a high-confidence way to reproduce the issue? Unclear. The review failed before ClawSweeper could establish a reproduction path. Is this the best way to solve the issue? Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model gpt-5.5, reasoning high; reviewed against 44c1cc8285c8. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +52, Tests +36. Total +88 across 3 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
|
|
@steipete please |
|
This pull request has been automatically marked as stale due to inactivity. |
|
ClawSweeper PR egg 🥚 Incubating: this PR egg is tucked into the review nest. Hatch commandComment Hatchability rules:
What is this egg doing here?
|
martingarramon
left a comment
There was a problem hiding this comment.
Three-tier guard is sound — tagged strip-then-isSilentReplyText, open-tag fallback, plain-prefix fallback. escapeRegExp is already imported. Tests cover the reported cases.
Minor asymmetry: the plain-prefix path uses hasFinalSilentToken directly rather than the strip-then-isSilentReplyText pattern the tagged path uses — so think\n<substantive text>\nNO_REPLY silences while the tagged equivalent correctly delivers. Contradictory model output in practice, but worth a comment or additional test to document the behavior difference.
Proof gate: ClawSweeper needs pnpm vitest run src/auto-reply output in the PR body to clear.
|
Verification for head Behavior addressed: reasoning-prefixed Real environment tested: local macOS checkout plus Blacksmith Testbox through Crabbox on Linux. Exact steps or command run after this patch: node scripts/run-vitest.mjs src/auto-reply/tokens.test.ts src/auto-reply/reply/reply-utils.test.ts src/infra/outbound/payloads.test.ts
.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main
node scripts/crabbox-wrapper.mjs run --provider blacksmith-testbox --blacksmith-org openclaw --blacksmith-workflow .github/workflows/ci-check-testbox.yml --blacksmith-job check --blacksmith-ref main --idle-timeout 90m --ttl 240m --timing-json --shell -- "set -euo pipefail; echo CRABBOX_PHASE:focused-vitest; node scripts/run-vitest.mjs src/auto-reply/tokens.test.ts src/auto-reply/reply/reply-utils.test.ts src/infra/outbound/payloads.test.ts; echo CRABBOX_PHASE:changed-check; corepack pnpm check:changed"Evidence after fix:
Observed result after fix: targeted leaked reasoning payloads are skipped as silent; explicit negative tests keep substantive What was not tested: no live Telegram/Discord send with credentials; this proof exercises the shared final-reply and outbound payload delivery seams plus changed core checks. |
Summary
Fixes #66701 by treating reasoning-prefixed
NO_REPLYoutputs as silent replies instead of letting leaked reasoning text reach group chats.Changes
think/reasoning-prefixed payloads that end inNO_REPLYin the shared silent reply payload classifier.NO_REPLYtoken.Real behavior proof
NO_REPLYtoken, OpenClaw should suppress that payload before channel/outbound delivery instead of sending the reasoning text to a group chat.74c5d26863b082ff4cd4be42b69d657443a875f4on Windows, using Nodev24.14.0from the Codex bundled runtime andpnpm 11.1.0; exercised the productioncreateReplyDispatcherfinal-reply outbound delivery seam withsurface: "telegram",conversationType: "group", and a realdelivercallback wired as the outbound send boundary.$env:PATH='C:\Users\15944\AppData\Local\OpenAI\Codex\bin;' + $env:PATH; pnpm exec tsx -e "import { createReplyDispatcher } from './src/auto-reply/reply/reply-dispatcher.ts'; void (async () => { const deliveries=[]; const skipped=[]; const dispatcher=createReplyDispatcher({ silentReplyContext: { surface: 'telegram', conversationType: 'group', sessionKey: 'agent:main:telegram:group:proof' }, deliver: async (payload, info) => { deliveries.push({ kind: info.kind, text: payload.text ?? '', mediaUrl: payload.mediaUrl ?? null }); }, onSkip: (payload, info) => skipped.push({ kind: info.kind, reason: info.reason, originalText: payload.text }) }); const leaked=['think','Cav is talking about a follow-up conversation.','I will stay quiet here.NO_REPLY'].join('\n'); const leakQueued=dispatcher.sendFinalReply({ text: leaked }); const visibleQueued=dispatcher.sendFinalReply({ text: 'visible outbound sanity check' }); dispatcher.markComplete(); await dispatcher.waitForIdle(); console.log(JSON.stringify({ outboundSetup: 'createReplyDispatcher final reply delivery seam with telegram group silentReplyContext', leakQueued, visibleQueued, queuedCounts: dispatcher.getQueuedCounts(), failedCounts: dispatcher.getFailedCounts(), skipped, deliveries }, null, 2)); })();"{ "outboundSetup": "createReplyDispatcher final reply delivery seam with telegram group silentReplyContext", "leakQueued": false, "visibleQueued": true, "queuedCounts": { "tool": 0, "block": 0, "final": 1 }, "failedCounts": { "tool": 0, "block": 0, "final": 0 }, "skipped": [ { "kind": "final", "reason": "silent", "originalText": "think\nCav is talking about a follow-up conversation.\nI will stay quiet here.NO_REPLY" } ], "deliveries": [ { "kind": "final", "text": "visible outbound sanity check", "mediaUrl": null } ] }NO_REPLYfinal reply was skipped with reasonsilent, was not queued, and did not reachdeliveries; the visible sanity-check reply used the same dispatcher and did reach the outbound deliver seam. That proves the leak payload is stopped before channel delivery.Verification
pnpm test src/auto-reply/tokens.test.ts src/auto-reply/reply/reply-utils.test.ts src/infra/outbound/payloads.test.ts -- --reporter=verboseon 2026-05-12 with Nodev24.14.0: 3 target files, 129 tests passed across theunit-fastandauto-replyVitest shards.pnpm check:changedpnpm checkvia a temporary no-space Windows drive mappinggit diff --checkNotes:
pnpm buildcurrently fails on Windows because the bootstrap guard looks for.jsoutputs while this build emitted.mjsfiles.pnpm test:unit:fasthas existing Windows path/EPERM failures unrelated to this change.