Carry project-scope defaults for roles with project management #250

Merged
weichen merged 2 commits from fix/role-project-scope-permissions into main 2026-10-23 08:52:26 +00:00
Owner

Why

角色权威切换后角色只能带 project.create 一个布尔,项目内动作一律判为未定义,项目内会话与成员协作全被拒。owner 产品口径:角色只有一个「项目管理」开关,开启即带出项目内默认;三权与知识发布仍按职责分配。

Evidence

  • go test ./internal/store ./internal/app ./internal/server -count=1 通过
  • TestRoleCarriesProjectScopeDefaults 覆盖写入、快照投影与「开启 project.create 不得收回 linked 管理动作」的不变量
  • agent-exec transport 的 diff 与 owner 验收、并在 imc-tx-ecs 上线的版本逐字一致(二进制 941f8eef)

Impact

ReplaceRolePermissions 接受项目范围动作(系统范围仍整批拒绝);RolePermissions 把项目范围行与项目管理蕴含默认投影进快照;每次写入前跑能力关联一致性门。

Refs

feature/role-project-scope-permissions

## Why 角色权威切换后角色只能带 project.create 一个布尔,项目内动作一律判为未定义,项目内会话与成员协作全被拒。owner 产品口径:角色只有一个「项目管理」开关,开启即带出项目内默认;三权与知识发布仍按职责分配。 ## Evidence - go test ./internal/store ./internal/app ./internal/server -count=1 通过 - TestRoleCarriesProjectScopeDefaults 覆盖写入、快照投影与「开启 project.create 不得收回 linked 管理动作」的不变量 - agent-exec transport 的 diff 与 owner 验收、并在 imc-tx-ecs 上线的版本逐字一致(二进制 941f8eef) ## Impact ReplaceRolePermissions 接受项目范围动作(系统范围仍整批拒绝);RolePermissions 把项目范围行与项目管理蕴含默认投影进快照;每次写入前跑能力关联一致性门。 ## Refs feature/role-project-scope-permissions
weichen added 1 commit 2026-10-23 08:47:21 +00:00
Carry project-scope defaults for roles with project management
governance / governance (pull_request) Successful in 17s
ci / vet-and-test (pull_request) Successful in 1m52s
e7b345e127
Why: After the role-authority cutover a role could only carry the single
project.create boolean, so every project-scope action resolved as undefined and
project conversations plus member collaboration were rejected. Owner product
intent: a role carries one project-management toggle, and holding it grants the
in-project defaults (read, write, members, traces, stage, archive, audit);
three-duty and knowledge publishing stay duty-gated.

Evidence: go test ./internal/store ./internal/app ./internal/server -count=1
passes; TestRoleCarriesProjectScopeDefaults covers the write, the snapshot
projection and the unchanged invariant that a role enabling project.create may
not deny a linked management action. The agent-exec transport diff is identical
to the owner-accepted revision deployed on imc-tx-ecs (binary 941f8eef).

Impact: ReplaceRolePermissions accepts project-scope actions while protected
system actions stay refused, RolePermissions projects project-scope rows plus
the project-management implied defaults into the role policy snapshot, and an
explicit capability-association gate runs before each write.

Refs: feature/role-project-scope-permissions
weichen added 1 commit 2026-10-23 08:49:32 +00:00
Merge remote-tracking branch 'origin/main' into fix/role-project-scope-permissions
governance / governance (pull_request) Successful in 16s
ci / vet-and-test (pull_request) Successful in 2m33s
50bc120fed
weichen merged commit 1d04f07f5c into main 2026-10-23 08:52:26 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Backend#250