fix(auto-reply): fast path text control commands#85616
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 5, 2026, 10:01 PM ET / 02:01 UTC. Summary PR surface: Source +244, Tests +257. Total +501 across 5 files. Reproducibility: yes. The PR body supplies before/after real Feishu WebSocket /status logs, and current main/release source lacks the added Feishu command-turn marker and safe text fast path. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Next step before merge
Security Review detailsBest possible solution: Land this narrow safe-command subset after maintainer review and normal merge gates, while keeping broader stateful Feishu commands such as /stop, /new, and /compact on their separate issue paths. Do we have a high-confidence way to reproduce the issue? Yes. The PR body supplies before/after real Feishu WebSocket /status logs, and current main/release source lacks the added Feishu command-turn marker and safe text fast path. Is this the best way to solve the issue? Yes. This is the best narrow fix for the safe subset: Feishu supplies structured command-turn metadata and core fast-paths only tightly allowlisted local replies, avoiding broad stateful or prompt-bearing text command handling. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b6127ef0d81e. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +244, Tests +257. Total +501 across 5 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
Review history (5 earlier review cycles)
|
|
ClawSweeper PR egg: ✨ hatched 🌱 uncommon Cosmic Diff Drake. Rarity: 🌱 uncommon. Trait: keeps receipts. DetailsShare on X: post this hatch
About:
|
fcfe040 to
c81dbf2
Compare
|
@clawsweeper re-review Real behavior proof has been added to the PR body, and the Real behavior proof check is passing. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
This comment was marked as spam.
This comment was marked as spam.
7ab7297 to
9dece9f
Compare
219179c to
03443a0
Compare
|
@clawsweeper re-review please Addressed the review follow-up in
Current local validation:
GitHub Real behavior proof is passing on the new head; remaining GitHub checks are still running. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review Rebased this PR onto current The conflict resolution keeps this PR's text control-command fast path and preserves Current status on head
Local validation after the rebase:
|
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Hi! Small heads-up: ClawSweeper had a short-lived label/comment sync bug that may have affected this PR. Your latest ClawSweeper review comment appears to be for the current PR head and says this is ready for maintainer review, but the ready/proof/rating labels were later removed by stale local review state. The ClawSweeper fix has merged, but this PR needs a fresh author-triggered review so the labels and comment are reconciled again. Could you please post a new comment asking ClawSweeper to re-review? Use the bot mention followed by Thanks, and sorry for the noise. |
|
@clawsweeper re-review Requested after the ClawSweeper label/comment sync fix. The latest review comment already matches current head |
|
Thanks for pursuing the Feishu command-delivery regression and repeatedly rebasing the work. We are closing this implementation because the shared fast path introduces a second command and argument policy and changes authorization-sensitive execution timing for every channel producing text-slash turns, while the supplied proof covers only an authorized Feishu DM. The original |
Summary
/status,/thinking,/id,/usage,/send, and/activation.CommandTurn: text-slashinstead of an ordinary message./new,/reset,/compact,/model,/queue,/stop,/exec,/trace, inline command tokens, and commands with trailing prompt text.Why
Feishu/Lark plain-text slash commands are not provider-native slash commands. They can arrive as authorized text command messages, and Codex/GPT-backed sessions may otherwise route local controls through the slower normal agent path. That can make
/statusor/thinkingslow or fail to produce a visible operational reply even though they should be handled locally.This rework is based on current
upstream/main(d6ed2c392c1e) and replaces the old conflicting PR head with a narrow patch. It intentionally removes the stale job-levelNODE_OPTIONSCI heap change and keeps the diff limited to Feishu text-command context, the safe core fast path, and focused tests.Review Follow-up
markCommandReplyForDeliveryon every handled fast-path reply, including text/status, text directive replies, text command-handler replies, native command replies, native directive replies, and inline fast-path replies.CommandTurn: { kind: "text-slash", source: "text" }, while inline command tokens remain normal messages./status,/thinking, and/idreturn before workspace/bootstrap and carrydeliverDespiteSourceReplySuppressionmetadata.Safety
please check /statusas text command turns.Validation
Current-head validation on PR head
7d5fcc95ef4f:npm run format:check -- extensions/feishu/src/bot.broadcast.test.ts extensions/feishu/src/bot.test.ts extensions/feishu/src/bot.ts src/auto-reply/reply/get-reply-native-slash-fast-path.ts src/auto-reply/reply/get-reply.fast-path.test.tsnode scripts/run-vitest.mjs run --config test/vitest/vitest.auto-reply-reply.config.ts src/auto-reply/reply/get-reply.fast-path.test.ts src/auto-reply/reply/get-reply-native-slash-fast-path.test.tsnode scripts/run-vitest.mjs run --config test/vitest/vitest.extension-feishu.config.ts extensions/feishu/src/bot.broadcast.test.ts extensions/feishu/src/bot.test.tsnode ../../scripts/run-vitest.mjs run --config ../../test/vitest/vitest.auto-reply-reply.config.ts reply/source-reply-delivery-mode.test.tsfromsrc/auto-replynpm run check:test-typesgit diff --checkReal Behavior Proof
Behavior or issue addressed: Feishu/Lark whole-message text control commands such as
/statusshould return a local operational reply instead of being routed through the slow Codex/GPT agent path and completing with no visible reply.Real environment tested: Local macOS OpenClaw gateway started from this PR source at original proof head
c81dbf2f13c4, OpenClaw2026.5.22, with the Feishu plugin loaded from/Users/alex/Code/openclaw/extensions/feishu/index.ts. The runtime used a real Feishufeishu2WebSocket account and a real p2p Feishu DM. Secrets and user/chat IDs are redacted below. After later review follow-up, this PR was rebuilt on currentupstream/mainatd6ed2c392c1e; the same Feishu fast-path behavior remains covered by focused current-head tests and the GitHub Real behavior proof check.Exact steps or command run after this patch: Started a Feishu-only proof gateway from the PR source:
Then sent
/statusfrom the real Feishufeishu2DM.Evidence after fix: Redacted runtime log excerpt from
/tmp/openclaw/openclaw-2026-05-23.log:For comparison, before this patch on installed OpenClaw
2026.5.20, the same real Feishu2/statuspath reached dispatch but produced no visible reply:Observed result after fix: The real Feishu2
/statusDM now exits through the local control-command fast path and produces one queued final reply (queuedFinal=true, replies=1) instead of the previous no-reply completion (queuedFinal=false, replies=0).What was not tested: This runtime proof covers the safe local text-control subset via Feishu p2p DM. It does not claim coverage for destructive/stateful commands (
/new,/reset,/compact,/stop), prompt-bearing slash commands, native slash-command payloads, or group mention routing.Related Issues
delivered=falsereport. This PR addresses the low-risk local control-command subset by returning those replies before runtime execution./compact,/new, and/stop, so it does not close that broader authorization/command-handling issue.