fix(auto-reply): restrict NO_REPLY to automatic group replies#82270
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: no. not as a live end-to-end reproduction in this read-only review. Source and v2026.5.12 inspection show the direct-chat path can receive exact Real behavior proof Next step before merge Security Review detailsBest possible solution: Land this only after maintainers accept the config-contract removal and the PR head has appropriate changed-gate coverage, with the prompt/delivery fix kept scoped to preventing direct and message-tool-only silent-token leakage. Do we have a high-confidence way to reproduce the issue? No, not as a live end-to-end reproduction in this read-only review. Source and v2026.5.12 inspection show the direct-chat path can receive exact Is this the best way to solve the issue? Partly yes: removing direct/message-tool-only silent-token guidance and suppressing exact accidental tokens is the narrow code-path fix. The legacy config removal is broader and needs maintainer product/API acceptance before merge. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 0b7ff665f664. Re-review progress:
|
d5743af to
d430ebb
Compare
|
Landed via rebase merge onto
Thanks @absol89 for the report. |
Summary:
NO_REPLYprompt guidance to legacy automatic group/channel replies only; direct chats andmessage_tool_onlysource turns stay free of silent-token instructions.silentReplyRewriteconfig/runtime fallback behavior, including dead pending-spawn rewrite plumbing, and adds doctor cleanup for old rewrite/direct silent-reply keys.Verification:
pnpm docs:listpnpm config:schema:gen && pnpm config:docs:gennode --import tsx scripts/generate-config-doc-baseline.ts --checknode scripts/run-vitest.mjs src/infra/outbound/payloads.test.ts src/commands/doctor/shared/legacy-config-migrate.test.ts src/auto-reply/reply/groups.test.ts src/agents/prompt-composition.test.ts src/auto-reply/reply/route-reply.test.ts- 5 files, 109 tests passednode scripts/run-vitest.mjs src/shared/silent-reply-policy.test.ts src/config/silent-reply.test.ts src/auto-reply/reply/groups.test.ts src/agents/prompt-composition.test.ts src/infra/outbound/payloads.test.ts src/infra/outbound/deliver.test.ts src/auto-reply/reply/reply-flow.test.ts src/auto-reply/reply/route-reply.test.ts src/auto-reply/reply/get-reply-run.media-only.test.ts src/commands/doctor/shared/legacy-config-migrate.test.ts extensions/telegram/src/bot/delivery.test.ts extensions/telegram/src/bot-message-dispatch.test.ts- 12 files, 366 tests passednode scripts/run-vitest.mjs src/agents/prompt-composition.test.ts src/auto-reply/reply/route-reply.test.ts- 2 files, 32 tests passednode scripts/run-vitest.mjs src/config/zod-schema.test.ts src/config/zod-schema.agent-defaults.test.ts src/config/schema.help.test.ts- 1 file found, 25 tests passedpnpm tsgo:core --noEmit --pretty falsegit diff --checkNO_REPLY,Silent Replies,respond with ONLY, orreply with exactlyin direct/message-tool-only snapshotscodex-review --mode auto --full-access --output /tmp/codex-review-82254-cleanup-final.txt- clean, no accepted/actionable findings; review also ran 3 focused files, 77 tests, plus config docs baseline checkpnpm check:changeddelegated to Testboxtbx_01krphwn6jkcdvp1wmqbnsj2x1; Blacksmith stayed queued for ~9m with no worker/IP/run URL, then the local waiter was stopped (exit -1), so no remote command executedBehavior addressed:
NO_REPLYis now only prompted for automatic group/channel replies where silence is allowed. Direct chats and message-tool-only source turns are quiet by not sending, not by asking the model to emitNO_REPLY.Real environment tested: local repo unit/config/docs/type checks plus Codex review; Testbox changed gate was attempted as
tbx_01krphwn6jkcdvp1wmqbnsj2x1but stayed queued with no worker/IP/run URL and was stopped.Exact steps or command run after this patch: focused Vitest files above,
pnpm tsgo:core --noEmit --pretty false, config doc generation/check, prompt snapshot grep,git diff --check,pnpm docs:list, Codex review.Evidence after fix: direct prompt invariant asserts no
NO_REPLY; group automatic prompt still asserts exactNO_REPLY; message_tool_only prompt snapshots contain noNO_REPLY; dispatcher/outbound/Telegram route exact silent tokens to no delivery instead of rewrite text; generated config baseline no longer lists removed rewrite/direct keys.Observed result after fix: direct and message-tool-only surfaces receive no silent-token system prompt; legacy group auto mode keeps the exact silent-token instruction; old
silentReplyRewriteconfig is removed by doctor; dead rewrite-only pending-spawn hook is gone.What was not tested: prompt snapshot generator/check hung before producing output and was killed; Testbox
pnpm check:changednever got a worker and did not execute remotely; no live Telegram send was run for this refactor pass.Fixes #82254