Skip to content

docs(adr-0056): AdminScopeSchema target shape lists only the live keys - #12903

Merged
os-zhuang merged 3 commits into
mainfrom
claude/issue-12660-adr0056-admin-scope
Oct 17, 2026
Merged

os-zhuang merged 3 commits into
mainfrom
claude/issue-12660-adr0056-admin-scope

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #12660
Clause-②: no

ADR-0056's AdminScopeSchema bullet listed manageBindings and authorEnvironmentSets as part of the "exact target shape" for the admin_scope editor. objectstack-ai/objectstack#23488 retired both keys. This amends that bullet: it now lists the four live keys and states in one clause that the two keys were retired by that change and are refused by the spec. A second place in the same file, the P3 implementation-log entry, also named the -bindings / author-env-sets toggles; it now names only the controls the editor still carries (business-unit + subtree, manage-assignments toggle, assignablePermissionSets[]) and notes the other two were removed with objectui#12659 when the spec retired those keys (verified: #12659 removed both controls from PermissionAdvancedFacets).

Measurement

Installed @objectstack/spec 18.0.0-next.3, AdminScopeSchema.shape keys: businessUnit, includeSubtree, manageAssignments, manageBindings, authorEnvironmentSets, assignablePermissionSets. The last-but-one pair are tombstones: safeParse({ businessUnit: 'x', manageBindings: true }) and the authorEnvironmentSets equivalent both fail with an invalid_type (expected never) issue saying the key "was removed in @objectstack/spec 18"; the bare { businessUnit: 'x' } parses. The live set is exactly businessUnit, includeSubtree, manageAssignments, assignablePermissionSets, with no other drift versus the bullet.

Gates

  • node scripts/check-changeset-presence.mjs: exit 0 ("no changeset is owed"; docs-only diff, no changeset added).
  • pnpm check:doc-example-readers: exit 0.
  • pnpm check:new-line-citations: exit 0 (0 new citations); both re-run on head 2e2c31b, check-changeset-presence exit 0.
  • Control-character self-scan of the touched file: clean. scripts/check-nul-bytes.mjs does not exist in this repo (MODULE_NOT_FOUND, not a gate verdict).
  • No package tests owed (docs-only).

维护者速读(草稿)

改了什么

ADR-0056 里描述「委托管理范围(admin_scope)编辑器目标形状」的那一条,去掉了已被规格退役的两个字段(manageBindings、authorEnvironmentSets),只保留现行的四个字段,并加一句话说明这两个字段已由 objectstack#23488 退役。同一文件里的第二处(P3 实施记录里「manage-assignments / -bindings / author-env-sets 开关」的括号)也已改为只写编辑器现在实际提供的控件,并注明另两个开关随 objectui#12659 移除。

为什么改

规格已经拒收这两个字段,但 ADR 仍把它们当作「精确的目标形状」。照着 ADR 做编辑器的人(或 AI)会去实现一个规格必然拒绝的字段。

风险与代价(含回滚)

只改 ADR-0056 一个文件里的两处文字,不影响运行时与发布包,无需 changeset。回滚即还原这两处。

席位意见

你要做的

批准此 PR(approve)。


Generated by Claude Code

…itor still carries

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XVp19E1MYUTFM3dnkwz8gB
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 2e2c31bfbfde23368173a2edef879d14a12698b9
Local-runs: none

Re-review of the moved head (supersedes the record on 13d8ebd1c5). Inputs read: card #12660 (body + 3 comments: triage 6216298563, the claim 6235723431 as amended in place at 15:35Z, os-dev-report 6235787268), PR #12903's updated body, file list and net diff against main at 8e75978360701eee523802a038c21870063d5892, the head's check-runs as they stand, and (read-only) the spec source at the version objectui main installs plus PermissionAdvancedFacets.tsx on main and the objectui#12659 patch for the P3 claim. The net diff is one file, docs/adr/0056-permission-editing-studio.md, +7/-5 in two hunks: the AdminScopeSchema bullet (head :140-144) and the P3 implementation-log entry (head :209-216). Two commits, both on branch claude/issue-12660-adr0056-admin-scope. Governed text (docs/adr/**, Tier H): the PR is a draft and still owes a GOVERNED_APPROVERS approval; this record does not stand in for it.

① Derived judgments

  • Installed spec version. pnpm-lock.yaml on main at the base sha resolves @objectstack/spec@18.0.0-next.3; the PR body measures the same. Right. (The card's next.2 was true when filed; both versions retire the keys.)
  • Hunk 1, the AdminScopeSchema bullet, lists exactly the live keys. AdminScopeSchema at tag @objectstack/spec@18.0.0-next.3 (packages/spec/src/security/permission.zod.ts) is a strictObject with businessUnit (required, non-blank), includeSubtree (boolean, default true), manageAssignments (boolean, default false), manageBindings: retiredKey(...), authorEnvironmentSets: retiredKey(...), assignablePermissionSets (string[], default []). Live set = businessUnit, includeSubtree, manageAssignments, assignablePermissionSets[]: the bullet's new list, in shape order, nothing missing, nothing extra. Right.
  • Hunk 1's retirement clause is accurate. Both tombstone messages read "permission.adminScope.<key> was removed in @objectstack/spec 18 (ADR-0049 enforce-or-remove, ADR-0090 D12)" and retiredKey refuses any value, so "the spec refuses both" holds. [finding] AdminScope.manageBindings and authorEnvironmentSets are honoured by no write path after C3; the ADR-0090 D9/D12 junction gates are unmeasured; permissions docs describe removed gates objectstack#23488 is the closed [finding] card whose ruling retired the keys (not a PR); it is the citation the card itself asked for. Right.
  • Hunk 2, the P3 implementation log, now states what the editor actually carries. PermissionAdvancedFacets.tsx on main at the base sha renders the admin-scope facet with businessUnit, includeSubtree, one manageAssignments switch and the assignablePermissionSets allowlist; manageBindings / authorEnvironmentSets survive there only in a code comment naming them as retired tombstones. The objectui#12659 patch (merged 2026-10-16) is the change that dropped the two switch rows from the facet's switch list and added the pin test asserting only includeSubtree and manageAssignments captions remain. So "business-unit + subtree, manage-assignments toggle, assignablePermissionSets[] allowlist; the -bindings / author-env-sets toggles were removed with objectui#12659 when the spec retired those keys" is right in every part, and the entry keeps its ✅ P3 status, which is still true.
  • Nothing else moves. No remaining mention of the retired keys as live anywhere in the file (grep at head: only the two amended sentences name them, both as retired). Surrounding attributions (ADR-0090 D12, permission.zod.ts, PermissionAdvancedFacets) untouched and correct. No code, exports, schemas or changesets; no accept-set of any objectui package moves. File is CR-free and control-byte-free; Line Citation Gate success on this head (no new line citations).
  • PR body vs diff. The English lead still opens "This amends only that bullet" and only then adds the second place; the next sentence corrects it, but the word "only" is now false and should go. The P3 verification claim in the body ("feat(app-shell): Studio retires the two delegated-admin switches the spec retired (objectui#12406) #12659 removed both controls from PermissionAdvancedFacets") is confirmed above. Measurement is unchanged and still right; "the last-but-one pair" is a loose pointer at keys 4-5 of 6 but the keys are named explicitly.
  • 维护者速读(草稿). Five parts present in order (改了什么 / 为什么改 / 风险与代价(含回滚) / 席位意见 / 你要做的); 席位意见 empty, as required. 改了什么 was updated and matches both hunks. 风险与代价 was NOT updated: "仅改一条文档 ... 回滚即还原这一条 bullet" now understates the diff (two sentences in one file, not one bullet). The substance (docs-only, no runtime or package effect, no changeset, rollback = revert the file's two hunks) is still true, so this is a wording defect of the draft readout, not of the governed text. The seat should fix that sentence (and the English "only") in the body at adoption; neither changes the verdict on the rule text.

② Semver level

Docs-only diff: no packages/** file, no export, no schema, no behaviour. No changeset owed, none added. Changeset Declaration and Changeset Claim Re-read concluded success on this head; Changeset Fixed Group Check has not reported on this head yet (see ③). The PR body's Clause-②: no matches the amended claim's Clause-②: no and matches what the diff publishes (nothing). Right.

③ Boundary flags

  • Claim 6235723431, amended in place (updated 15:35Z): the file surface now names both the bullet (:140-143) and the P3 entry (:212-215), same file, one governed approval, no other line or changeset. The two-hunk diff sits inside that widened surface exactly; no breach.
  • os-dev-report 6235787268: open_questions: [], out_of_scope_findings: [], premise_still_valid: true; no dev flag to answer. The report predates the second commit and still says "Amended only the AdminScopeSchema bullet"; it was not re-issued. Noted for the seat; a stale report summary is not a diff defect and the PR body carries the current description.
  • Dev note that scripts/check-nul-bytes.mjs is absent (MODULE_NOT_FOUND): correct reading, not a gate verdict.
  • Check-runs on 2e2c31bfbfde23368173a2edef879d14a12698b9 at read time (8 reported): success on Lint, Line Citation Gate, Governed Surface Queue Guard, Changeset Declaration, Changeset Claim Re-read, label; skipped on dependabot; in_progress: Repo Gates. The main CI workflow that ran on the previous head (Type Check, Build & E2E, Build Docs, Test (dist pins), the 16 test shards, Changeset Fixed Group Check) has not reported on this head yet. No failure or neutral conclusion is recorded. The verdict is conditional on Repo Gates and the not-yet-reported workflow concluding success; a docs-only diff gives them nothing new to fail on, but their conclusions are the gate verdicts and were not waited for.
  • mergeable_state: behind: two docs commits on a slightly older main, touching hunks no other open change names (claim's serial check); a rebase is a merge-time formality.
  • Nothing left to escalate: the residual drift escalated on the previous head (:213) is the second hunk here.

Implemented-by: claude/issue-12660-adr0056-admin-scope
Reviewed-by: session_01XVp19E1MYUTFM3dnkwz8gB

VERDICT: PASS


Generated by Claude Code

@objectstack-fleet

objectstack-fleet Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor Author

维护者速读 · objectui PR #12903 · domain:ui seat 2 · session_01XVp19E1MYUTFM3dnkwz8gB · 2026-10-17T15:53Z

改了什么

ADR-0056(权限编辑 Studio)两处文字,都只是让文档与现状一致:

  1. 「委托管理范围(admin_scope)编辑器的目标形状」这一条:去掉规格已退役的 manageBindings、authorEnvironmentSets,只列现行四个字段,并注明由 objectstack#23488 退役。
  2. P3 实施记录:不再说编辑器带 -bindings / author-env-sets 两个开关,注明这两个开关已随 objectui#12659 移除。

为什么改

规格已拒收这两个字段,Studio 也已删掉对应开关,但 ADR 仍把它们写成「精确的目标形状」和已交付功能。照 ADR 写编辑器或元数据的人(或 AI)会去写一个必被拒收的字段。

风险与代价(含回滚)

只改一个 ADR 文件(+7/−5,两处),无代码、无发布包、无 changeset,CI 门禁不受影响。回滚即还原这两处文字。

席位意见

建议批准。两处改动已核对:字段清单与当前安装的 @objectstack/spec 18.0.0-next.3 的 AdminScopeSchema 一致;开关已随 objectui#12659 移除并有测试钉住。契约复核(CONTRACT_REVIEW_TIER)在当前 head 2e2c31b 上 PASS(PR 评论 6235918694),CI 全绿。批准后由本席位转正式并入合并队列,不需要你手动合并。

你要做的

在 PR #12903 上点 Approve。


Generated by Claude Code

@os-zhuang
os-zhuang marked this pull request as ready for review October 17, 2026 21:23
@os-zhuang
os-zhuang enabled auto-merge October 17, 2026 21:23
@os-zhuang
os-zhuang added this pull request to the merge queue Oct 17, 2026
Merged via the queue into main with commit 5ec2175 Oct 17, 2026
32 of 33 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-12660-adr0056-admin-scope branch October 17, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(adr-0056): the AdminScopeSchema target shape still lists the two delegated-admin keys the spec retired (manageBindings, authorEnvironmentSets)

3 participants