Compose permission UX matrix, batch roles and member config (permux U1-U6) #629

Merged
weichen merged 23 commits from feature/iam-role-permission-linked-capabilities-perm-ux into feature/iam-role-permission-linked-capabilities 2026-10-19 08:05:13 +00:00
Owner

目标与范围(任务卡即本 PR 描述)

按源码外方案(2026-10-19 评审稿,U1-U6)交付「角色与人员权限配置」闭环,作为 L1 #628 的子任务:

  • Backend(Agent-System-Backend feature/iam-perm-ux-backend @ 4130ad7,基于 L1 联动分支 afb65c5):目录分类元数据与三态归一化;多角色权限预览(replace/patch 双模式,与批量提交同源归并);原子批量事务(多角色 patch、多用户角色分配、复制角色并分配:单事务、单 epoch、幂等回执、锁序不变);读投影(用户目录当前角色、角色成员目录服务端过滤分页)。
  • Frontend(Agent-System-Frontend feature/iam-perm-ux-frontend @ 46a63f02,基于 main):默认业务分类矩阵 + 单角色聚焦、三态/二态控件、多角色统一草稿与一次原子保存、409 多角色 rebase、窄屏聚焦;用户表当前角色列、跨页显式多选、逐人旧→新预览批量分配、复制角色并分配、角色成员子视图;消费 L1 联动字段的说明卡与职责条件文案。

证据

  • 组合门禁 make test-affected PASS(receipt /tmp/permux-final-affected.json,SELF)。
  • 真实组合活体验收 8/8 PASS(登录 + C01-C04/C07-C10;receipt /tmp/permux-final-live.json,SELF;隔离 Backend:18901 + vite preview:4199)。
  • 实施经 agent-per-unit(cursor 等)全新会话执行,transport/admit 精确核对;收据见任务卡「Agent 实施收据」。
  • NOT_RUN 如实记录:C13(依赖 L1 U7/U2)、C16 日常实例采用(未授权部署)。

Impact

  • Dev 子分支推进两个组件 gitlink;不改 main;L1 集成窗口解决与 L1 U2 的文件接缝。
  • 预览 mode=patch 与批量语义同源;服务端 role 投影不含 permissions 的前端适配。

Refs

  • 方案 /tmp/iam-permission-ux-plan-20261019-1dehpj7l/plan.md;任务卡随本 PR 合入
  • L1 PR #628;组件分支在 Backend/Frontend 仓同名 feature/iam-perm-ux-*
## 目标与范围(任务卡即本 PR 描述) 按源码外方案(2026-10-19 评审稿,U1-U6)交付「角色与人员权限配置」闭环,作为 L1 #628 的子任务: - Backend(Agent-System-Backend feature/iam-perm-ux-backend @ 4130ad7,基于 L1 联动分支 afb65c5):目录分类元数据与三态归一化;多角色权限预览(replace/patch 双模式,与批量提交同源归并);原子批量事务(多角色 patch、多用户角色分配、复制角色并分配:单事务、单 epoch、幂等回执、锁序不变);读投影(用户目录当前角色、角色成员目录服务端过滤分页)。 - Frontend(Agent-System-Frontend feature/iam-perm-ux-frontend @ 46a63f02,基于 main):默认业务分类矩阵 + 单角色聚焦、三态/二态控件、多角色统一草稿与一次原子保存、409 多角色 rebase、窄屏聚焦;用户表当前角色列、跨页显式多选、逐人旧→新预览批量分配、复制角色并分配、角色成员子视图;消费 L1 联动字段的说明卡与职责条件文案。 ## 证据 - 组合门禁 make test-affected PASS(receipt /tmp/permux-final-affected.json,SELF)。 - 真实组合活体验收 8/8 PASS(登录 + C01-C04/C07-C10;receipt /tmp/permux-final-live.json,SELF;隔离 Backend:18901 + vite preview:4199)。 - 实施经 agent-per-unit(cursor 等)全新会话执行,transport/admit 精确核对;收据见任务卡「Agent 实施收据」。 - NOT_RUN 如实记录:C13(依赖 L1 U7/U2)、C16 日常实例采用(未授权部署)。 ## Impact - Dev 子分支推进两个组件 gitlink;不改 main;L1 集成窗口解决与 L1 U2 的文件接缝。 - 预览 mode=patch 与批量语义同源;服务端 role 投影不含 permissions 的前端适配。 ## Refs - 方案 /tmp/iam-permission-ux-plan-20261019-1dehpj7l/plan.md;任务卡随本 PR 合入 - L1 PR #628;组件分支在 Backend/Frontend 仓同名 feature/iam-perm-ux-*
weichen added 15 commits 2026-10-19 07:11:40 +00:00
Why: establish the authorized task workspace and its initial baseline.

Evidence: preserved precheck receipt in .task/feature-iam-role-permission-linked-capabilities-perm-ux.md; R0=7716b28cfff5200e7cfe9ec75aff5bcd71b234ed.

Impact: task metadata only; the feature workspace starts at 90317d02a7.

Refs: .task/feature-iam-role-permission-linked-capabilities-perm-ux.md
Why: include the current parent initiative baseline before verification.

Evidence: resolved feature/iam-role-permission-linked-capabilities=a99dbfcd9ac48d09038c76e09dc59e074c11ab7d.

Impact: integrate parent initiative changes without rewriting task history.

Refs: task-sync
Why: bind the task validation checkpoint to the integration baseline.

Evidence: SELF recursive component checks; sync_base=a99dbfcd9ac48d09038c76e09dc59e074c11ab7d; before_record=04af865e227858bbe9f0bd38ebaed2b874da4f27.

Impact: task metadata only.

Refs: .task/feature-iam-role-permission-linked-capabilities-perm-ux.md
Why: the child task implements the approved permission UX plan U1-U6 on
top of the L1 association contract (afb65c5); governance requires the
scope, component branch strategy and coordination notes on the card
before the first project write.

Evidence: precheck READY receipt /tmp/iam-perm-ux-precheck.json; L1
state verified via task-sync (sync_base a99dbfc, L1 U1 completed).

Impact: task card only (.task/** host-exempt path).

Refs: plan /tmp/iam-permission-ux-plan-20261019-1dehpj7l/plan.md; L1 PR #628
Why: permux-U1 (catalog categories + read-only multi-role preview) was
implemented by an external cursor session and applied as transport
bc09721 on the backend working branch; the first successful run was not
transportable because the host invoked run with a relative --repo, which
is recorded verbatim.

Evidence: host verification receipt /tmp/permux-u1-verify.json (build,
filtered go tests, vet, deps untouched); run receipts /tmp/permux-u1-run.json
and /tmp/permux-u1-run2.json.

Impact: task card only.

Refs: L1 PR #628; plan U1.
Why: permux-U2 (atomic batch patch, batch role assignment, copy-and-assign,
role member directory, user directory role projection) was implemented by a
fresh external cursor session and applied as transport 6851ee6; host review
confirmed patch-preserves-unmentioned-rows, single epoch step per batch and
read-only previews.

Evidence: host verification receipt /tmp/permux-u2-verify.json (build,
filtered tests incl. Batch/CopyAssign/Members, vet, deps untouched);
run receipt /tmp/permux-u2-run.json.

Impact: task card only.

Refs: L1 PR #628; plan U2.
Why: permux-U3 (category matrix default view, three-state controls,
multi-role draft with unified preview and atomic batch save, narrow-screen
focus) was implemented by a fresh external cursor session and applied as
transport 4be7362 on the frontend working branch.

Evidence: host verification receipt /tmp/permux-u3-verify-b.json (vitest
role-permissions suites + design guard, tsc -b); run receipt
/tmp/permux-u3-run.json. Note: first capture attempt aborted on a missing
modules/ui node_modules (environment, fixed by npm ci in the ui submodule).

Impact: task card only.

Refs: L1 PR #628; plan U3.
Why: permux-U4 (user table role column, explicit cross-page multi-select,
previewed batch assignment, copy-role-and-assign dialog, role member
sub-view wired from the matrix) was implemented by a fresh external cursor
session and applied as transport d965732.

Evidence: host verification receipt /tmp/permux-u4-verify.json (vitest
account-users/role-members/role-permissions suites + design guard, tsc -b);
run receipt /tmp/permux-u4-run.json.

Impact: task card only.

Refs: L1 PR #628; plan U4.
Why: permux-U5 delivered the truthful subset of project effective-permission
explanations: consume the L1-U1 linkedCapabilities field from /api/me,
document-duty condition notes, creator/role source label mappings, and an
explanation card in the RDM self-check view. Creator-source display and
member shared-read semantics remain NOT_RUN pending L1 U2/U7 and are
recorded as such, not mocked.

Evidence: host verification receipt /tmp/permux-u5-verify.json (vitest
permission-explanations/role-members/design-guard, tsc -b); run receipt
/tmp/permux-u5-run.json.

Impact: task card only.

Refs: L1 PR #628; plan U5.
Why: composition transport 7b25169 pins the permux component branches; the
first affected-run capture was defective (a tail pipe swallowed the nonzero
exit of the knip ratchet) and is explicitly disqualified; the umask-induced
identity test failure is recorded as environmental.

Evidence: knip repair receipt /tmp/permux-knip-run.json (50 <= 51 after fix).

Impact: task card only.

Refs: L1 PR #628; plan U6.
Why: final composition bdd058f (backend 4130ad7 + frontend 46a63f02) passed
the affected gate and the full live-browser suite 8/8 on the real combo;
receipts for all composition and repair transports are recorded, with
honest NOT_RUN notes for scenarios owned by L1 U2/U7 and undeployed C16.

Evidence: /tmp/permux-final-affected.json, /tmp/permux-final-live.json.

Impact: task card only.

Refs: L1 PR #628; plan U6.
Record platform outage blocking PR creation and merge
ci / test-pg (pull_request) Skipped
ci / svc-realcombo (pull_request) Skipped
ci / test (pull_request) Failing after 8m51s
e7bcc61ba6
Why: the Gitea endpoint stopped serving TLS (WRONG_VERSION_NUMBER) and its
plain-HTTP listener returns a 501 proxy error page for the API, so the PR,
pr-check, CI wait and merge steps are blocked; git/SSH pushes succeeded and
all branches are on the remotes.

Evidence: endpoint probes recorded in this note; remote branches verified
via git ls-remote over SSH.

Impact: task card only; delivery pauses per governance until the platform
recovers.

Refs: L1 PR #628.
weichen added 1 commit 2026-10-19 07:12:05 +00:00
Record PR 629 and pr-check pass
ci / test-pg (pull_request) Skipped
ci / svc-realcombo (pull_request) Skipped
ci / test (pull_request) Successful in 8m7s
374ce2d382
Why: the child PR against the L1 branch is open and passes task-pr-check
(base/head/kind verified); PR link recorded on the card.

Evidence: /tmp/permux-prcheck.json.

Impact: task card only.

Refs: PR #629.
weichen added 1 commit 2026-10-19 07:32:34 +00:00
Record CI success evidence for the child PR head
ci / test-pg (pull_request) Skipped
ci / svc-realcombo (pull_request) Skipped
ci / test (pull_request) Successful in 8m24s
234ce3016a
Why: the rerun of the lightweight child CI passed on 374ce2d (the first run
failed on a load-timing project-events replay test that passes locally and
was not touched by this diff); evidence recorded before independent review.

Evidence: /tmp/permux-ci-success.json (CI_SUCCESS).

Impact: task card only.

Refs: PR #629.
weichen added 2 commits 2026-10-19 07:54:22 +00:00
Record independent review pass and non-blocking suggestions
ci / svc-realcombo (pull_request) Skipped
ci / test-pg (pull_request) Skipped
ci / test (pull_request) Successful in 8m41s
e4aa633750
Why: a fresh-session reviewer (pi) audited the full permux range and
returned PASS with zero blocking findings and five non-blocking
suggestions, recorded verbatim with the review report in .task/reviews.

Evidence: review receipt /tmp/permux-review2-run.json; report file applied
as transport 347586d.

Impact: task records only (.task/** host-exempt).

Refs: PR #629.
weichen added 4 commits 2026-10-19 07:56:11 +00:00
Why: include the current parent initiative baseline before verification.

Evidence: resolved feature/iam-role-permission-linked-capabilities=e1e0887e12501158e04477659d4567262dc44a73.

Impact: integrate parent initiative changes without rewriting task history.

Refs: task-sync
Why: bind the task validation checkpoint to the integration baseline.

Evidence: SELF recursive component checks; sync_base=e1e0887e12501158e04477659d4567262dc44a73; before_record=2f88c756faaa267daf99d311415e7253fb5b4f23.

Impact: task metadata only.

Refs: .task/feature-iam-role-permission-linked-capabilities-perm-ux.md
Why: task-sync merged the latest L1 head (e1e0887) which only added child
task registrations (u2a/u2b/u7/u7a) — no code or component changes; the
composition pins and prior gate evidence remain valid for the tested
object.

Evidence: /tmp/permux-final-sync.json (changed=1, cards only).

Impact: task records only.

Refs: PR #629.
Fold-close the task card before merge
ci / test-pg (pull_request) Skipped
ci / svc-realcombo (pull_request) Skipped
ci / test (pull_request) Successful in 8m10s
a9878b0ed3
Why: close the task card inside its own PR so landing it needs no post-merge backfill or separate close PR.
Evidence: .task/feature-iam-role-permission-linked-capabilities-perm-ux.md -> .task/archive/feature-iam-role-permission-linked-capabilities-perm-ux.md; status 已完成(合入前闭合); PR #629 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/629.
Impact: task metadata only; the card is archived within PR #629 and lands with its merge commit.
Refs: task.sh close --self
weichen merged commit 8be7739263 into feature/iam-role-permission-linked-capabilities 2026-10-19 08:05:13 +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-Dev#629