✨ feat: add driver-scoped approvals - #341
Draft
zrr1999 wants to merge 4 commits into
Draft
Conversation
zrr1999
marked this pull request as ready for review
August 13, 2026 06:04
Collaborator
Author
|
Reviewer note (conflicts / overlap): this ready PR is #408 already restores the same driver-scoped Draft/ |
zrr1999
marked this pull request as draft
August 17, 2026 09:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
动机
当前工具授权只区分“无需授权”和“必须授权”,无法表达“手动对话需要确认,但由用户明确开启的 Goal / Repro / Loop driver 可以执行已界定的低风险动作”。这会让持续 driver 在创建 Draft PR 时反复阻塞;如果简单跳过授权,又会连带绕过 Ready PR、破坏性操作和任意执行等高风险边界。
解决方案
manual_only审批策略:手动 Session 走人工授权;只有仍存活的 Goal、Repro 或 plain Loop invocation 可以免授权执行该类动作。Workflow-only、停止、完成、替换和过期 invocation 均 fail closed,required始终只能由人工批准。manual_only;Ready/mixed PR、sync、cleanup、checkout/adopt/commit、任意命令执行和可写委派仍为required。driver 的 Draft 权限绑定到 daemon 私有的精确 Artifact、canonical worktree、仓库/remote/config 与 invocation generation,并在外部写入前重新校验。driver_localstep authority;Repro 状态迁移到 v8,严格拒绝旧版本伪装的新 authority,同时保持 SessionView/Trace v1 的兼容投影。说明
开启或恢复 driver 本身仍需要人工授权,避免手动模型自行提升权限。daemon SQLite 通过幂等迁移增加私有 target 状态;该 capability 不写入模型可编辑的 Artifact,也不暴露到协议投影。