From e1e0887e12501158e04477659d4567262dc44a73 Mon Sep 17 00:00:00 2001 From: weichen Date: Mon, 19 Oct 2026 07:48:28 +0000 Subject: [PATCH] Register U7A canonical-project-identity sub-unit; plan U7B+U7C Why: U7 cursor 3/3 fail-stop per AGENT-EXECUTION.md explicit fail-stop; redesign as U7A (project identity + doc.read decoupling) / U7B (member collaboration + body-level shared reads + plugin) / U7C (knowledge/doc two-trees-one-web shared reads). Evidence: U7 child card .task/feature-iam-role-permission-linked-capabilities-u7-canonical-two-trees.md (cursor 3/3 receipts); L1 PR #628 head=1c01763. Impact: U7A dispatch ready; targets project identity uniqueness + project_resource_authz decoupling; U7B/U7C child cards deferred until U7A transport lands. Refs: plan revision 3 U7; PR #628. --- ...bilities-u7a-canonical-project-identity.md | 86 +++++++++++++++++++ ...iam-role-permission-linked-capabilities.md | 5 +- 2 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 .task/feature-iam-role-permission-linked-capabilities-u7a-canonical-project-identity.md diff --git a/.task/feature-iam-role-permission-linked-capabilities-u7a-canonical-project-identity.md b/.task/feature-iam-role-permission-linked-capabilities-u7a-canonical-project-identity.md new file mode 100644 index 00000000..1ddd5d60 --- /dev/null +++ b/.task/feature-iam-role-permission-linked-capabilities-u7a-canonical-project-identity.md @@ -0,0 +1,86 @@ +# feature/iam-role-permission-linked-capabilities-u7a-canonical-project-identity 任务卡 + +任务主记录:;状态:进行中;owner:weichen + +## 基线与授权 + +- 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= 7716b28cfff5200e7cfe9ec75aff5bcd71b234ed +- 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-iam-role-permission-linked-capabilities(worktree);分支:feature/iam-role-permission-linked-capabilities +- 分支类型:child;initiative_id:feature-iam-role-permission-linked-capabilities;root_target:main;immediate_target:feature/iam-role-permission-linked-capabilities;accepting_requirements:false;parent_branch:feature/iam-role-permission-linked-capabilities;parent_head_sha:1c01763;parent_pr:PR #628 + +- 授权与交付终点:U7 拆分后第一个子单元 U7A;目标 RDM `internal/projects/*` + `internal/rdmapp/{project_resource_authz,system_projects,projects_api,*_test,member_guards_test,project_creator_permissions_test}.go`;不开 PR、不入 main;不动 U7B 路径(perms_api/member_search/doc_visibility/cockpit/插件层 + body-level 共享)。 +- 交付模式:goal-first +- 实施执行:agent-per-unit(配置:AGENT-EXECUTION.md) +- 合入执行:agent(已授权交付范围内,Review 通过、冲突解决且当前 HEAD 的 CI 通过后合入) +- 当前阶段:实施单元已登记,待 agent 派发 +- 流程依据:仓库根目录 policy/delivery.md;父 L1 charter 见 `.task/feature-iam-role-permission-linked-capabilities.md`;父单元 U7 任务卡见 `.task/feature-iam-role-permission-linked-capabilities-u7-canonical-two-trees.md` + +## 目标与非目标 + +**目标**:项目身份唯一(同名 = 同一 business project;rename/archive 不释放 ID);`project_resource_authz.go` 中 `project`/`knowledge` 类型分支不再以 `perms.ActDocRead` 与 `publishedKnowledgeSource` 为前置;creator 不可变(仅 created_by 可管理,owner/负责人标签不算)。 + +**范围**:见单元包 allowed_paths。 + +**非目标**: +- 不动 `perms_api.go`、`member_search.go`、`accountdir*`、`doc_visibility.go`、`cockpit.go`、插件层与 body-level 共享测试(U7B)。 +- 不动 Backend / Frontend / Documents / Dev。 +- 不引入新数据库表。 +- 不削弱既有拒绝。 +- 不修改 created_by 不可变性。 +- 不破坏现有职责分配、发布流程、版本号。 + +**验收条件**:方案 C01-C05、C17、C26-C28 + 既有不退化 + 新表覆盖 canonical identity、project metadata decoupling、author/published filter removal、creator-only management、owner-label-not-authority。 + +## 关联方向与规划 + +- 主记录:方案 revision 3 `/tmp/iam-role-permission-plan-20261019-sqfu_4g4/plan.md` U7 +- 前置:U2A (RDM 1d9de398) + U2B (RDM 8725ed3) +- 后继:U7B sub-unit(perms_api + member_search + doc_visibility + cockpit + plugins/rdm + body-level 共享测试) + +## 阶段记录 + +| 阶段 | 对象版本 | 状态 | 决策/执行者 | 时间 | 依据 | +|---|---|---|---|---|---| +| 需求拆解 | 本卡 | 已完成 | host | 2026-10-19 | U7 拆分决定 | +| 需求评估 | 本卡 | 已完成 | host | 2026-10-19 | U7 cursor 3/3 fail-stop 收据 | +| 需求表确认 | 本卡 | 已完成 | host | 2026-10-19 | 范围 | +| 方案设计 | 单元包 JSON | 已完成 | host | 2026-10-19 | KTD2/KTD5/KTD6/KTD8/KTD10 | +| 实施计划 | 单元包 JSON | 已完成 | host | 2026-10-19 | allowed_paths/verification/timeout_seconds | +| 实施与自检 | 待 worker | 待执行 | — | — | `scripts/agent-exec run` | +| 正式测试与验收 | 待 worker 自检 + host 验证 | 待执行 | — | — | 子单元验证 + 既有不退化 | +| 代码 Review | 待独立会话 | 待执行 | — | — | fresh session, `--role review` | +| 合入 | 待 host | 待执行 | — | — | RDM L1 transport apply + Dev gitlink bump | +| 合入核验与收口 | 待 host | 待执行 | — | — | L1 PR #628 base gate | + +## 同步记录 + +| 节点 | sync_base_sha | tested_head_sha | checked_at | +|---|---|---|---| +| 启动 | 1c01763 | 1c01763 | 2026-10-19T07:50:00Z | + +## 证据(Evidence) + +| 时间(UTC) | 命令 | 被测HEAD | exit | 来源 | sha256(16) | +|---|---|---|---|---|---| + +## Agent 实施收据 + +| 单元 ID | 预期范围 | 配置摘要 | 角色 | 候选顺序 | attempt | CLI/模型 | 终态 | transport | fallback | 源码外收据路径 | +|---|---|---|---|---|---|---|---|---|---|---| +| iam-link-u7a | RDM `internal/projects/*` + `internal/rdmapp/{project_resource_authz,system_projects,projects_api,*_test,member_guards_test,project_creator_permissions_test,host_projection_test,dhf_template_instance_test,e2e_test}.go` + `pins/{agent-system-backend,agent-system-core,agent-document-renderer}` | AGENT-EXECUTION.md digest=bd3a7de57a3a9e1a4495b94c5fa5c08d71e7be8c | implementation | [cursor, antigravity, pi] | 1 | 待记录 | 待记录 | 待记录 | 否 | 待记录 | + +## 结果与验证(完成后填写) + +- 结果: +- 验证:PASS/FAIL/SKIP/NOT_RUN 逐项 +- 影响与剩余项:U7B 子单元待派发 + +## 合入与清理 + +- Review 记录:NOT_RUN +- 冲突记录:NOT_RUN +- CI 记录:NOT_RUN +- 合入记录:NOT_RUN +- 清理记录:NOT_RUN + + diff --git a/.task/feature-iam-role-permission-linked-capabilities.md b/.task/feature-iam-role-permission-linked-capabilities.md index 4a8e65be..c1447ac6 100644 --- a/.task/feature-iam-role-permission-linked-capabilities.md +++ b/.task/feature-iam-role-permission-linked-capabilities.md @@ -63,7 +63,10 @@ | feature/iam-role-permission-linked-capabilities-u2-single-role-authority | 是 | 已完成(U2A + U2B 双子单元均 success;RDM L1 子分支 8725ed3 已推远端;待 Dev gitlink bump + 独立 Review) | —(child 不开 PR) | U2 | RDM `perms_api.go`、`system_projects.go`、`plugins/rdm/{system_projects,plugin}.go`;Backend `hostcaps.go`;KTD7;C22 | | feature/iam-role-permission-linked-capabilities-u2a-perms-and-perms-api | 是 | 已完成(RDM L1 子分支 1d9de398 推送,待 Dev gitlink bump + 独立 Review) | —(child 不开 PR) | U2A(U2 拆分) | RDM `internal/perms/*` + `internal/rdmapp/{perms_api,member_search,accountdir*,*_test}.go`;KTD7;U2A 子表 | | feature/iam-role-permission-linked-capabilities-u2b-system-projects-and-plugins | 是 | 已完成(RDM L1 子分支 8725ed3 推送,待 Dev gitlink bump + 独立 Review) | —(child 不开 PR) | U2B(U2 拆分) | RDM `internal/rdmapp/{system_projects,projects_api,project_resource_authz,settings_duties,runtime}` + `plugins/rdm/{plugin,system_projects,*}`;KTD7 | -| feature/iam-role-permission-linked-capabilities-u7-canonical-two-trees | 是 | blocked(cursor 3/3 fail-stop:2× scope-expansion + 1× failed-unknown;后续会话拆 U7A + U7B + U7C 或改派 agy) | —(child 不开 PR) | U7 | RDM `internal/projects/{projects,provisioning,projection_rename}.go`、`internal/rdmapp/{projects_api,system_projects,project_resource_authz}.go`;Backend `internal/server/{project_lifecycle,server}.go`;KTD2/KTD5/KTD6/KTD8/KTD10;C01-C05/C11-C17/C19-C21/C26-C31 | +| feature/iam-role-permission-linked-capabilities-u7-canonical-two-trees | 是 | blocked(cursor 3/3 fail-stop;拆分为 U7A + U7B + U7C 重新派发;U7A 已登记卡片待 agent 派发) | —(child 不开 PR) | U7 | RDM `internal/projects/{projects,provisioning,projection_rename}.go`、`internal/rdmapp/{projects_api,system_projects,project_resource_authz}.go`;Backend `internal/server/{project_lifecycle,server}.go`;KTD2/KTD5/KTD6/KTD8/KTD10;C01-C05/C11-C17/C19-C21/C26-C31 | +| feature/iam-role-permission-linked-capabilities-u7a-canonical-project-identity | 是 | 已登记卡片,待 agent 派发 | —(child 不开 PR) | U7A(U7 拆分) | RDM `internal/projects/*` + `internal/rdmapp/{project_resource_authz,system_projects,projects_api,*_test,member_guards_test,project_creator_permissions_test,host_projection_test,dhf_template_instance_test,e2e_test}.go`;KTD2/KTD5/KTD6/KTD8/KTD10;C01-C05/C17/C26-C28 | +| feature/iam-role-permission-linked-capabilities-u7b-two-trees-and-plugins | 是 | 待登记(U7A 完成后) | —(child 不开 PR) | U7B(U7 拆分) | RDM `internal/rdmapp/{perms_api,member_search,accountdir*,doc_visibility,cockpit,*_test}.go` + `plugins/rdm/*`;C11-C17/C26-C31 | +| feature/iam-role-permission-linked-capabilities-u7c-knowledge-and-doc-shared-reads | 是 | 待登记(U7A 完成后) | —(child 不开 PR) | U7C(U7 拆分) | RDM `internal/rdmapp/{private_doc_views_test,resource_authz_test,queued_publication_revocation_test,draft_visibility_test,iam_i1_*,e2e_test,knowledge_publication_test}.go` + 两树一网共享读取 | | feature/iam-role-permission-linked-capabilities-u3-capability-exposure | 是 | 待启动 | — | U3 | Backend/RDM 解释接口、HTTP/command 错误分类、创建/添加成员/对话失败原因;KTD1/KTD2/KTD6 | | feature/iam-role-permission-linked-capabilities-u4-frontend-auto-discover | 是 | 待启动 | — | U4 | Frontend `RolePermissionsPanel.tsx`、`AccountUsersPanel.tsx`、`adminRdmSections.tsx`、`TaskSidebar.tsx`、`App.tsx`、`store.ts`、`api.ts`、`rolePermissions.ts`、`projectmeta.ts`;KTD9;C13-C15/C19-C21/C23 | | feature/iam-role-permission-linked-capabilities-u5-integration-tests | 是 | 待启动 | — | U5 | 复用 Backend `project_lifecycle_test.go`/`role_authorization_test.go`、RDM `system_projects_test.go`/`project_creator_permissions_test.go`/`member_guards_test.go`/`role_provider_test.go`、Frontend 角色/成员/项目测试;新增浏览器双账号场景;不搭新测试框架;C01-C31 全集 |