fix(approvals): make exec approval fallback guidance channel-specific#61424
Conversation
Greptile SummaryThis PR fixes Matrix exec-approval fallback UX by routing the Confidence Score: 5/5Safe to merge; all remaining findings are P2 style/process issues with no impact on runtime behavior. No P0 or P1 issues. The two P2 findings are a cosmetic text duplication in the no-approval-route fallback and a CHANGELOG placement order preference — neither affects correctness or user safety. src/infra/exec-approval-reply.ts (minor text duplication in no-approval-route branch); CHANGELOG.md (entry placement order). Prompt To Fix All With AIThis is a comment left during a code review.
Path: src/infra/exec-approval-reply.ts
Line: 409-414
Comment:
**Duplicate allowFrom guidance in `no-approval-route` fallback**
When native clients are available, `buildGenericNativeExecApprovalFallbackText()` already closes with "If those accounts already know your owner ID via allowFrom or owner config, OpenClaw can often infer approvers automatically." The caller then appends "Then retry the command. If those accounts already know your owner ID via allowFrom or owner config, you can usually leave execApprovals.approvers unset." — the condition phrase appears twice in the same paragraph. Consider folding the extra hint into the helper or rewriting the appended suffix so it does not re-state the `allowFrom` condition.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: CHANGELOG.md
Line: 24
Comment:
**CHANGELOG entry inserted mid-section instead of appended**
Per `CLAUDE.md`, new entries should be appended to the **end** of the target section. This entry appears at line 24 just after the related Matrix entry, but the `### Changes` section continues to line 45. The new entry should be placed after the last existing `### Changes` line.
**Context Used:** CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8))
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "Matrix: clarify exec approval fallback U..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5602945aaf
ℹ️ 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".
There was a problem hiding this comment.
Pull request overview
This PR fixes misleading Matrix exec-approval fallback messaging by switching from hard-coded “supported clients” copy to capability-based discovery, and by adding Matrix-specific “supported but unconfigured” guidance when the initiating channel can do native approvals.
Changes:
- Add capability-based helpers to detect/list native exec-approval-capable channels.
- Improve exec-approval unavailable reply copy (generic + Matrix-unconfigured path) and plumb initiating
channelthrough tool result details. - Update unit/seam tests and document the UX fix in the changelog.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/infra/exec-approval-surface.ts | Adds helpers to detect native exec-approval capability and list approval-capable channel labels. |
| src/infra/exec-approval-reply.ts | Updates unavailable-approval reply composition to use capability discovery and Matrix “supported but unconfigured” guidance. |
| src/infra/exec-approval-reply.test.ts | Mocks capability discovery and asserts new fallback/setup wording (including Matrix). |
| src/agents/pi-embedded-subscribe.handlers.tools.ts | Parses and forwards channel in approval-unavailable tool result details. |
| src/agents/pi-embedded-subscribe.handlers.tools.test.ts | Extends seam test fixtures/assertions for new wording + channel plumbing. |
| src/agents/bash-tools.exec-types.ts | Extends exec tool details contract with optional channel. |
| src/agents/bash-tools.exec-host-shared.ts | Includes initiating surface channel in approval-unavailable tool result + inline text. |
| CHANGELOG.md | Notes the Matrix exec-approval unavailable-reply UX clarification. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6fd619acd2
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 45eb93654e
ℹ️ 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".
6220f65 to
cb5d3c2
Compare
|
Merged via squash.
Thanks @gumadeiras! |
…openclaw#61424) Merged via squash. Prepared head SHA: cb5d3c2 Co-authored-by: gumadeiras <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
…openclaw#61424) Merged via squash. Prepared head SHA: cb5d3c2 Co-authored-by: gumadeiras <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
…openclaw#61424) Merged via squash. Prepared head SHA: cb5d3c2 Co-authored-by: gumadeiras <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
…openclaw#61424) Merged via squash. Prepared head SHA: cb5d3c2 Co-authored-by: gumadeiras <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
Summary
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
Regression Test Plan (if applicable)
src/infra/exec-approval-reply.test.ts,src/plugin-sdk/approval-delivery-helpers.test.ts,src/channels/plugins/approvals.test.ts,extensions/discord/src/approval-native.test.ts,extensions/slack/src/approval-native.test.ts,extensions/telegram/src/approval-native.test.ts,extensions/matrix/src/approval-native.test.tsUser-visible / Behavior Changes
Diagram (if applicable)
Security Impact (required)
Yes, explain risk + mitigation:Repro + Verification
Environment
Steps
Expected
Actual
Evidence
Human Verification (required)
pnpm plugin-sdk:api:genis still blocked by unrelated pre-existingelevenlabsexport drift; full repo-widepnpm checkremains blocked by unrelated pre-existing failures onmain; no live chat/manual repro in this PR worktree.Review Conversations
Compatibility / Migration
Risks and Mitigations