Repository navigation
fix(discord): return native status replies directly - #66434
Conversation
eb3148e to
5855dfd
Compare
Greptile SummaryThis PR fixes native Discord Confidence Score: 5/5
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5855dfd915
ℹ️ 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".
| provider: selectedProvider, | ||
| model: selectedModel, |
There was a problem hiding this comment.
Use resolved model selection in direct status replies
resolveDirectStatusReplyForSession computes modelState but then calls buildStatusReply with the pre-normalized selectedProvider/selectedModel instead of modelState.provider/modelState.model. When a session has an invalid persisted override (for example, after allowlist changes), createModelSelectionState can reset the override to defaults, but this path still renders /status with the stale model values, so the status card can report a model that is no longer actually selected.
Useful? React with 👍 / 👎.
Summary
/statusso it returns the real status card instead of falling through to the synthetic✅ Done.ackopenclaw/plugin-sdk/command-status-runtimeseam instead of wideningcommand-authwith status-runtime logic/statuspath while keeping non-status native command dispatch behavior unchangedmainChange Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause / Regression History (if applicable)
/statusslash path delegated to the generic reply dispatcher, and that path can legitimately emit zero visible replies for deterministic status commands, which then triggers the synthetic✅ Done.fallback instead of a status payload./statusbypasses the generic dispatcher and still returns a deliverable reply.git blame, prior PR, issue, or refactor if known): fix(discord): return native /status reply directly #57343 identified the right symptom and general direction, but it widenedsrc/plugin-sdk/command-auth.tswith runtime-heavy status logic and no longer rebased cleanly on currentmain./statuspath and started relying on a generic delivery flow that is not guaranteed to materialize a visible reply for this command class.Regression Test Plan (if applicable)
extensions/discord/src/monitor/native-command.status-direct.test.ts/statusresolves the routed session and sends the status payload directly without touching the generic dispatcher.User-visible / Behavior Changes
/statusonce again returns the status card instead of replying with✅ Done..Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoRepro + Verification
Environment
Steps
/statusfrom Discord.Expected
/statusreturns the normal status card.Actual
✅ Done.and no status payload.Evidence
Human Verification (required)
pnpm build./statusroutes still resolve the bound session through the direct path; unbound routed/statusstill targets the routed channel session.Review Conversations
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations
command-status-runtime) and lazy, and only carries the status-specific runtime resolution logic.AI-assisted: yes. Testing level: targeted local verification plus
pnpm build.Local verification run:
OPENCLAW_LOCAL_CHECK=0 pnpm exec vitest run --config test/vitest/vitest.extension-channels.config.ts extensions/discord/src/monitor/native-command.status-direct.test.ts extensions/discord/src/monitor/native-command.plugin-dispatch.test.tsOPENCLAW_LOCAL_CHECK=0 pnpm exec vitest run --config test/vitest/vitest.contracts.config.ts src/plugins/contracts/plugin-sdk-index.test.ts src/plugins/contracts/plugin-sdk-package-contract-guardrails.test.tsnode scripts/check-plugin-sdk-subpath-exports.mjspnpm plugin-sdk:api:genpnpm build