Repository navigation
fix: Align silent reply prompt guidance - #70954
Conversation
Greptile SummaryThis PR wires
Confidence Score: 4/5Safe to merge; production behavior is correct, but the test coverage gap in the always-on group scenario should be addressed. All P0/P1 concerns from the previous review are addressed. The two remaining findings are P2: one is a test-fixture inconsistency that doesn't affect runtime, and the other is an overly wide return type annotation with no current runtime impact. Score is 4 rather than 5 because the reply.triggers.group-intro-prompts.cases.ts gap is a genuine coverage miss that could mask a future regression in the always-on group silence-line guidance. src/auto-reply/reply.triggers.group-intro-prompts.cases.ts (missing silentReplyPolicy in buildGroupIntro call, no assertion on silence-line text for always-on activation) and src/auto-reply/reply/reply-dispatcher.ts (overly wide | null return type on resolveSilentFinalPayload). Prompt To Fix All With AIThis is a comment left during a code review.
Path: src/auto-reply/reply.triggers.group-intro-prompts.cases.ts
Line: 106-111
Comment:
**Silence-line guidance silently diverges from production in the "always-on" case**
`buildGroupIntro` is now called without `silentReplyPolicy`, so `canUseSilentReply` falls back to `true` (because `undefined !== "disallow"`) and the generated `silenceLine` says "so OpenClaw can send a short fallback reply" instead of "so OpenClaw stays silent" — which is what the resolved `"allow"` group default would produce at runtime. The `cautionLine` ("Be extremely selective…") is also absent because `undefined === "allow"` is `false`. The test expectations for the "whatsapp-always-on" case don't assert on either of these two strings, so the gap goes undetected. Passing `silentReplyPolicy` and `silentReplyRewrite` (resolved from the test cfg, or at least the group defaults) and adding assertions for the silence-line text and caution-line would close the coverage gap.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: src/auto-reply/reply/reply-dispatcher.ts
Line: 118-173
Comment:
**Return type advertises `null` but the function never returns it**
`resolveSilentFinalPayload` is typed as `ReplyPayload | null | undefined`, yet every branch returns `undefined` or a `ReplyPayload` — `null` is never produced. At the call site the result is consumed with `silentFinalPayload ??`, so a `null` return would fall through to `normalizeReplyPayloadInternal` rather than being treated as a resolved silent payload — silently wrong behaviour if `null` is ever introduced by a future branch. Narrowing the return type to `ReplyPayload | undefined` would prevent this latent trap.
How can I resolve this? If you propose a fix, please make it concise.Reviews (3): Last reviewed commit: "Rewrite direct silent replies in dispatc..." | Re-trigger Greptile |
|
Follow-up on automated review notes:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48b1f54cf5
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 63e0cf2585
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eacf4fe96f
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 34f70ed136
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 93d3b9186b
ℹ️ 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".
|
@codex review and find them all |
|
@codex please find every issue that you're going to report. I would like to finish this review while I am still biologically alive. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e4940bf80
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d1e0033a4f
ℹ️ 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".
|
@codex k |
|
To use Codex here, create an environment for this repo. |
* Align silent reply prompt guidance * Pass explicit silent reply conversation types * Handle dm alias in direct prompt guidance * Respect policy session type for routed replies * Preserve routed silent reply policy type * Propagate silent reply dispatcher chat type * Align prompt silent reply target policy * Avoid direct silent fallback prompt token * Use inbound key for prompt silent policy * Rewrite direct silent replies in dispatcher
* Align silent reply prompt guidance * Pass explicit silent reply conversation types * Handle dm alias in direct prompt guidance * Respect policy session type for routed replies * Preserve routed silent reply policy type * Propagate silent reply dispatcher chat type * Align prompt silent reply target policy * Avoid direct silent fallback prompt token * Use inbound key for prompt silent policy * Rewrite direct silent replies in dispatcher
* Align silent reply prompt guidance * Pass explicit silent reply conversation types * Handle dm alias in direct prompt guidance * Respect policy session type for routed replies * Preserve routed silent reply policy type * Propagate silent reply dispatcher chat type * Align prompt silent reply target policy * Avoid direct silent fallback prompt token * Use inbound key for prompt silent policy * Rewrite direct silent replies in dispatcher
* Align silent reply prompt guidance * Pass explicit silent reply conversation types * Handle dm alias in direct prompt guidance * Respect policy session type for routed replies * Preserve routed silent reply policy type * Propagate silent reply dispatcher chat type * Align prompt silent reply target policy * Avoid direct silent fallback prompt token * Use inbound key for prompt silent policy * Rewrite direct silent replies in dispatcher
* Align silent reply prompt guidance * Pass explicit silent reply conversation types * Handle dm alias in direct prompt guidance * Respect policy session type for routed replies * Preserve routed silent reply policy type * Propagate silent reply dispatcher chat type * Align prompt silent reply target policy * Avoid direct silent fallback prompt token * Use inbound key for prompt silent policy * Rewrite direct silent replies in dispatcher
* Align silent reply prompt guidance * Pass explicit silent reply conversation types * Handle dm alias in direct prompt guidance * Respect policy session type for routed replies * Preserve routed silent reply policy type * Propagate silent reply dispatcher chat type * Align prompt silent reply target policy * Avoid direct silent fallback prompt token * Use inbound key for prompt silent policy * Rewrite direct silent replies in dispatcher
* Align silent reply prompt guidance * Pass explicit silent reply conversation types * Handle dm alias in direct prompt guidance * Respect policy session type for routed replies * Preserve routed silent reply policy type * Propagate silent reply dispatcher chat type * Align prompt silent reply target policy * Avoid direct silent fallback prompt token * Use inbound key for prompt silent policy * Rewrite direct silent replies in dispatcher
* Align silent reply prompt guidance * Pass explicit silent reply conversation types * Handle dm alias in direct prompt guidance * Respect policy session type for routed replies * Preserve routed silent reply policy type * Propagate silent reply dispatcher chat type * Align prompt silent reply target policy * Avoid direct silent fallback prompt token * Use inbound key for prompt silent policy * Rewrite direct silent replies in dispatcher
Summary
What changed conceptually
The conversation type still tells the model where it is, but the silent-reply settings now tell the prompt whether NO_REPLY is valid there:
Validation