fix(permissions): surface auto-review blocks - #2599
Conversation
Signed-off-by: Ricky <ricky@noreply.local>
|
| Filename | Overview |
|---|---|
| packages/maker-core/src/agents/shared/auto-review-decision.ts | 新增稳定的自动审核拒绝提示码、识别函数及显式 reset 的一次性通知器。 |
| packages/maker-core/src/agents/claude-code/index.ts | 在本地、远端和 Claude 原生 Auto 拒绝路径发送提示,并将重置收敛到新 turn 或明确配置切换。 |
| packages/maker-core/src/agents/codex/index.ts | 为共享审核、无人值守策略及 Guardian 拒绝路径发送提示,同轮 steer 不再重新武装。 |
| packages/maker-core/src/agents/pi/index.ts | 将 Pi 工具拒绝连接到共享提示器,并按 send 边界重置。 |
| apps/desktop/src/renderer/lib/makerChatStore.ts | 将 AUTO_REVIEW_BLOCKED 纳入运行时错误码本地化映射。 |
| apps/desktop/src/main/im/shared/turnRetryNotice.ts | 将自动审核拒绝事件投影为渠道侧固定中文说明,不泄露 reviewer 原始文本。 |
Sequence Diagram
sequenceDiagram
participant U as 用户
participant A as Agent
participant R as 自动审核
participant N as 一次性提示器
participant UI as Desktop / IM
U->>A: send(新 turn)
A->>N: reset
A->>R: 审核工具操作
R-->>A: block
A->>N: notify
N-->>UI: AUTO_REVIEW_BLOCKED
U->>A: steer(同一 turn)
A->>R: 审核后续操作
R-->>A: block
A->>N: notify
Note over N,UI: 已发送,不重复展示
Reviews (3): Last reviewed commit: "fix(permissions): complete auto-review b..." | Re-trigger Greptile
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ddf0407050
ℹ️ 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".
Signed-off-by: Ricky <ricky@noreply.local>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 190c0a698c
ℹ️ 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".
|
@pricky777 👋 这个 PR 新增了用户可见的自动审批拦截提示与五语言文案,按流程已暂停自动合并,等待维护者确认文案与出现口径,详见 #2607。 确认方式只有一种:维护者在本 PR 上 Approve(需要修改会直接 Request Changes,球回到你手里后改完再请对方重新 Approve)。这期间你可以继续推改动、修 CI。 |
Signed-off-by: Ricky <ricky@noreply.local>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b1a64ed594
ℹ️ 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".
| && Array.isArray((rawMsg as { permission_denials?: unknown }).permission_denials) | ||
| && (rawMsg as { permission_denials: unknown[] }).permission_denials.length > 0 | ||
| ) { | ||
| autoReviewBlockedNotice.notify(); |
There was a problem hiding this comment.
在无 MCP 的 OAuth Claude Auto 会话发生权限拒绝时,这里直到终态 result 才发送非终止提示,而同一个 result 随即被 translator 转成 status(isRunning=false) 和 done;Desktop 的 makerChatStore.ts:5734 会在前者清掉 recoverableError,IM 的 turnRunner.ts:2521-2527 也会在 done 时刻意从终稿移除 activity notice,因此提示通常在用户能看到前就被终态覆盖,原生 Auto 的主要路径仍然等同静默。新的证据是本次虽接入了 permission_denials,但接入点位于上述终态序列之前;请将该结论投影为可跨越 done 的持久提示,或让终稿明确保留它。
Useful? React with 👍 / 👎.
这次改了什么
摘要
当 Codex、Claude Code 或 Pi 的自动审批拒绝工具操作时,向用户显示一次提示,说明这是自动审核的安全决定,并建议切到「默认权限」后重试。原操作仍保持拒绝,不改变沙箱或审批边界。
变更类型
fix缺陷修复范围
UI 变化
docs/design-rules/DESIGN.md的 Light/Dark 双模式交付约束与语义 token 规则。本次只复用既有错误提示呈现路径和主题 token,不新增布局、颜色或交互;补齐五种界面语言的文案。怎么验证的
自动验证
手工验证
不涉及:本次未新增布局或交互,使用既有错误提示路径。
未执行的验证
pnpm test:unit已尝试;本机better-sqlite3二进制为 Node ABI 137,而 Node 22 需要 ABI 127,导致与本 PR 无关的联系人/记忆测试无法加载原生模块。风险
风险分类
影响与回滚
ddf040705。提交前检查
git commit -s,见 DCO)