Repository navigation
refactor(permissions): separate tool policy from approval decisions - #2140
new-Beginner wants to merge 3 commits into
Conversation
Make Host tool membership an explicit internal policy so the Goal authorization design can be reviewed independently of storage and UI. Preserve the legacy Plan and Goal deny path until its Host producers are supplied by the dependent feature. Keep risk, approval, path and tool-specific execution guards unchanged; cover the existing policy matrix and native Goal refusal. Refs vastsa#1995
Keep the policy extraction behavior unchanged while retaining the newer\nsteering and background-job documentation. Point the existing compaction\ncontract test at the extracted allowlist instead of its former module. Refs vastsa#1995
Validate the existing policy boundary against the current remote base.
Minimal CI/conflict repairHead: Cause and exact changeThe sole failing test in original CI job Conflict files (2)
The foundation implementation is unchanged: both Plan and legacy Goal still use Contract membership. No Goal lifecycle, schema or UI is activated here. The additional authored source change beyond conflict integration is the one-line test read path. Verification actually run
No refactor, new capability, permission relaxation, timeout/tolerance increase, assertion removal, dependency downgrade, force-push, or merge to main. Existing published heads remain ancestors. PR #1999 and the primary checkout were not modified. B still depends on A; the repaired A head is an ancestor of B. Both candidates contain base Current repaired-head CI (snapshot at posting)
Pending checks are not claimed as passing. This comment does not request automatic merge. |
|
@Tioit-Wang 回应你在 #1999 原始审阅意见 中提出的「权限变化夹在大改动中,实际上无法独立审阅」问题:这份 A 先把权限设计和行为保持的基础单独交出来。
当前 head |
Summary / 概要
按 #1999 的维护者拆分意见,先独立审阅工具权限边界和设计,再审阅持久化 Goal 功能。本 PR 是 A:行为保持的权限基础,不提前启用自主 Goal;原 #1999 保持打开、head 不变。
ToolPermissionPolicy::{Agent, Contract}区分工具可用性、审批和执行权。类型不进入模型参数、IPC/RPC 或持久化数据。建议审阅顺序
permissions/tool_policy.rs:原有 allowlist 与插件例外的唯一实现。permissions.rs:membership deny 保持在风险、审批、授权缓存和 scratch 之前。rpc/mod.rs:选择来自 Host,而非调用方声称的模式。docs/adr/goal-execution-permission-policy.md:独立基础与后续激活的安全条件。第二份功能分支
feat/goal-runtime-clean-9ba23a依赖本提交;请先审阅这里的权限设计。这里只建立边界,不主张自主 Goal 已获得设计批准。Verification / 实际验证
基线 main:
078bc3061953a6f50eef0b4151e80207313c5e97。候选:
9320826b68462a500c3897c4ab4c6ff458b7d454。verify:ui:*。新 PR 的远程 checks 以 GitHub 当前 head 为准,不沿用 feat(goal): add durable autonomous goals with attached controls #1999 的绿色状态。Requirement link / 需求关联
Refs #1995
后续依赖功能 PR:https://github.com/vastsa/PI-Desktop/pull/2141。B 的主 diff 包含本基础提交;请先审核 A,B 提供仅功能提交的对照链接。