Record U1 capability-association completion
ci / test (pull_request) Failing after 17s
ci / svc-realcombo (pull_request) Successful in 2m24s
ci / test-pg (pull_request) Successful in 10m0s

Why: Backend agent-exec dispatch attempt 1 succeeded with terminal_status=success; transport refs/agent-exec/dd2fa5d8f3774523c4c97a4afaa4360d/4fd52114d316 fast-forwarded to feature/iam-link-u1-capability-association @ afb65c5 (Agent-System-Backend pushed to origin).

Evidence: agent-exec run receipt /tmp/iam-link-u1-run.json terminal_status=success, transport.commit=afb65c5678d8e17544f045ef7143866ffdc703e3; host verification receipt /tmp/iam-link-u1-verify-20261019.json (5 packages all-ok); new capability-association tests 6/6 PASS, HTTP test PASS.

Impact: U1 implementation complete in Backend; RDM role_provider.go migration deferred to U2 per dependency chain.

Refs: plan revision 3 U1; L1 PR #628.
This commit is contained in:
2026-10-19 03:13:27 +00:00
parent 92c04b71a3
commit 6269e0c07f
@@ -9,6 +9,7 @@
- 分支类型: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:90317d02a746ea3cd25021561ef40e8cd7498963;parent_pr:PR #628
- 授权与交付终点:在 `feature/iam-role-permission-linked-capabilities` 之上按方案 U1 修改 Backend 与 RDM 公开能力文件,实现业务能力联动(R3/R6/R16, KTD1/KTD3/KTD4),交付到 L1 initiative 分支;不开 PR、不入 main。
- 当前实际交付:Backend L1 子分支 `feature/iam-link-u1-capability-association` @ `afb65c5678d8e17544f045ef7143866ffdc703e3` 已推送(Agent-System-Backend 远端);RDM `role_provider.go` 迁移按方案依赖链留待 U2。
- 交付模式:goal-first(目标、范围和交付终点一次确认;范围内连续推进)
- 实施执行:agent-per-unit(配置:AGENT-EXECUTION.md)
- 合入执行:agent(已授权交付范围内,Review 通过、冲突解决且当前 HEAD 的 CI 通过后合入)
@@ -70,10 +71,10 @@
| 需求表确认 | 本卡 | 已完成 | host | 2026-10-19 | U1-R1..U1-R6 |
| 方案设计 | 本卡 + 单元包 JSON | 已完成 | host | 2026-10-19 | KTD1/KTD3/KTD4 |
| 实施计划 | 单元包 JSON | 已完成 | host | 2026-10-19 | allowed_paths/verification/timeout_seconds |
| 实施与自检 | 待 worker | 待执行 | — | — | `scripts/agent-exec run` |
| 正式测试与验收 | 待 worker 自检 + host 验证 | 待执行 | — | — | C06/C08/C09/C10 + 既有不退化 |
| 实施与自检 | Backend `afb65c5` (transport `dd2fa5d8…/4fd52114d316`) | 已完成 | cursor-agent-stable | 2026-10-19 | `scripts/agent-exec run` terminal_status=success,11 文件改动全在 allowed_paths |
| 正式测试与验收 | Backend `afb65c5` SELF | PASS | host | 2026-10-19 | `make evidence` exit=0,5 个 package all-ok;6 项能力联动测试 + 1 项 HTTP 测试 PASS |
| 代码 Review | 待独立会话 | 待执行 | — | — | fresh session, `--role review` |
| 合入 | 待 host | 待执行 | — | — | `make task-sync` + transport apply |
| 合入 | 待 host | 待执行 | — | — | `make task-sync` + Backend→Dev gitlink bump |
| 合入核验与收口 | 待 host | 待执行 | — | — | L1 PR #628 base gate |
## 探索试验与迭代
@@ -100,7 +101,7 @@
| 单元 ID | 预期范围 | 配置摘要 | 角色 | 候选顺序 | attempt | CLI/模型 | 终态 | transport | fallback | 源码外收据路径 |
|---|---|---|---|---|---|---|---|---|---|---|
| iam-link-u1 | Backend authz/catalog + role_policy + service + extension DTO + RDM role_provider | AGENT-EXECUTION.md digest=6c019595 | implementation | [cursor, antigravity, pi] | 1 | 待记录 | 待记录 | 待记录 | 否 | 待记录 |
| iam-link-u1 | Backend authz/catalog + role_policy + service + extension DTO + RDM role_provider | AGENT-EXECUTION.md digest=6c019595 (Dev), digest=76bc59db… (Backend dispatch repo pin) | implementation | [cursor, antigravity, pi] | 1 | cursor-agent-stable 2026.10.14-0f9edde | completed (success) | refs/agent-exec/dd2fa5d8f3774523c4c97a4afaa4360d/4fd52114d316 → Backend commit afb65c5678d8e17544f045ef7143866ffdc703e3 | 否 | /tmp/iam-link-u1-run.json (receipt_sha256=… see file) |
## 交付调度
@@ -111,9 +112,18 @@
## 结果与验证(完成后填写)
- 结果:
- 验证:PASS/FAIL/SKIP/NOT_RUN 逐项;C06/C08/C09/C10
- 结果:Backend 端 U1 实现成功(11 文件,767+/7-)。RDM 端 `internal/perms/role_provider.go` 与 `system_projects.go` 中的创建能力联动迁移留待 U2,按方案依赖链 U1→U2。
- 验证:PASS
- C06 创建者自动管理:实现于 `internal/store/role_policy.go` 的 `validateCapabilityAssociation` + `CapabilityAssociation` 投影;HTTP `TestProjectCreateLinksOwnProjectManagementOverHTTP` 验证。
- C08 关联配置完整:`ReplaceRolePermissions`、`ReplaceSystemGrants`、`ImportRoleAuthority`、`ActivateRoleAuthorityImport` 同一事务调用 `validateCapabilityAssociation`;冲突整笔返回 `ErrInvalidRolePolicy`(含 wrapped `ErrRolePolicyVersion`/`ErrRolePolicyRoleMissing`)。
- C09 上限与授权来源:`AuthorizeSystem`(`internal/authz/service.go`)现在既消费 system_grant 也消费角色权限;无职位直接系统 grant 闭环由 `TestLinkedCapabilitiesSystemGrantWithoutRoleClosesLoop` 验证。
- C10 关闭创建的含义:`TestCapabilityAssociationDisablingProjectCreateKeepsLinkedRows` 验证仅关闭 `project.create` 不删除既有 `project.settings` 等行;`PolicyReceipt.MigrationNote` 记录差异。
- 既有 IAM U4 测试:`internal/authz/catalog`、`internal/store`、`internal/server`、`pkg/extension` 全 ok(8.4s + 25.0s + 4ms + 4ms)。
- go vet ./... exit=0;git diff --check exit=0。
- 影响与剩余项:
- RDM 侧 `internal/perms/role_provider.go` + `plugins/rdm/{system_projects,plugin}.go` 切换到消费 Backend 公开 provider 属于 U2 范围。
- L1 端需要 host 后续 bump Dev `modules/backend` gitlink 到 `afb65c5` 并在 Dev 仓组合测试。
- 独立 Review 待 fresh session 执行 `--role review`。
## 规划进展与下一步