Uh oh!
There was an error while loading. Please reload this page.
feat(spec,plugin-security): export the kernel platform-admin capability declaration from @objectstack/spec (#11663 Choice 6A, leg L1) - #12612
Conversation
…ty declaration from @objectstack/spec (#11663 Choice 6A, leg L1) Part of #11965 - @objectstack/spec exports ADMIN_FULL_ACCESS_CAPABILITIES (objects wildcard + systemPermissions) beside ADMIN_FULL_ACCESS in identity/eval-user.zod.ts; the #3544/#8681 export-axis rulings travel with the declaration. - plugin-security's admin_full_access declaration imports that list, so exactly one copy exists. Behaviour-neutral: pinned deep-equal against the exact pre-move inline literal in default-permission-sets.test.ts. - api-surface / export-origins baselines regenerated (2 added, 0 breaking); authorable-surface unmoved. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012xGvxcwPRTJfA7RfjXEYA4
…atform-admin-capability-export
📓 Docs Drift CheckThis PR changes 2 package(s): 22 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 5 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 129 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin ad3a1a01fa5c2da18b30e6c75e517d8661580a0f && git checkout ad3a1a01fa5c2da18b30e6c75e517d8661580a0f
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 146f448a502893df21e85e1038005cbccdf7e7ff 0bc6a4803a04385b1d55f4c6d9d19edad66f63c8 && git checkout -B drift-repro 146f448a502893df21e85e1038005cbccdf7e7ff && git merge --no-ff 0bc6a4803a04385b1d55f4c6d9d19edad66f63c8
node scripts/docs-audit/affected-docs.mjs --json 146f448a502893df21e85e1038005cbccdf7e7ff
|
Uh oh!
There was an error while loading. Please reload this page.
Fixes#11965
Leg L1 of the accepted platform-admin re-anchor design (#11663 stays open — it is the coordination parent, out of scope here; design doc = #11663 comment 5394453215 §4 Choice 6 / §6 row L1; maintainer acceptance = comment 5404675670, 2026-08-25, bundle 1A/2B/3A/4A/5A/6A/7A).
What
@objectstack/specnow exportsADMIN_FULL_ACCESS_CAPABILITIES— the kernel platform-admin capability declaration (theobjectswildcard grants +systemPermissionspreviously inlined in plugin-security'sadmin_full_accessdeclaration). Placed inpackages/spec/src/identity/eval-user.zod.tsdirectly besideADMIN_FULL_ACCESS(the precedent: core already imports that constant from the spec root), exported from the root entry via the sameindex.tsblock. The 用户级 export 权限轴(接入 P1 预留的 userExportAllowed 槽) #3544/[security] org-admin sets ship object_permissions['*'].allowExport = true, so the 17.0 export gate cannot be denied for an org admin — and the sets are not_overridable (17.0.0 GA) #8681 export-axis rulings (noallowExporton the wildcard) travel verbatim with the declaration to its new home.@objectstack/plugin-security'sadmin_full_accessdeclaration inobjects/default-permission-sets.tsnow imports that list (name: ADMIN_FULL_ACCESS,...ADMIN_FULL_ACCESS_CAPABILITIES) — exactly one copy exists.packages/spec/api-surface/{root,identity}.json,packages/spec/export-origins/{root,identity}.json(2 exports added, 0 breaking). Authorable-surface: unmoved —check:authorable-surfacegreen with no baseline change, confirming the design's "no new authorable key" premise on the tree.Acceptance criterion (from the card)
git grep -n ADMIN_FULL_ACCESS packages/spec/src packages/plugins/plugin-security/srcnow shows the capability list declared once (eval-user.zod.ts:83) and imported — not duplicated — by plugin-security (default-permission-sets.ts:6,132). The remainingADMIN_FULL_ACCESShits invama-write-path-convergence.test.tsare a test-local fixture variable, not a second declaration.Behaviour-neutrality (pinned)
New test in
default-permission-sets.test.tsparses the exact pre-move inline literal and asserts the current declaration deep-equals it, plus a no-local-fork assertion against the imported constant. New spec-side testplatform-admin-capabilities.test.tspins: exactly the two capability-bearing fields; strict-parse composition under the canonical name; #8681 no-export pin at the new home; every granted system permission resolves in the ADR-0066PLATFORM_CAPABILITY_NAMESregistry.Verification (at merged head
0bc6a4803= this PR's head; origin/main merged immediately before opening)pnpm --filter @objectstack/spec exec vitest run src/identity/platform-admin-capabilities.test.ts— 4/4 passedpnpm --filter @objectstack/plugin-security exec vitest run src/objects/default-permission-sets.test.ts src/bootstrap-platform-admin.test.ts src/bootstrap-seed-round-trips.test.ts src/bootstrap-declared-permissions.test.ts— 76/76 passedpnpm --filter @objectstack/spec typecheck(incl.check:test-typecheck: "OK — test layer compiles") andpnpm --filter @objectstack/plugin-security typecheck— both green. Note: plugin-security's tsc excludes**/*.test.ts, so its edited test file is measured by vitest execution, not tsc.scripts/pm/dispatch-gates.mjsfrom the real changeset, re-run on0bc6a4803):check:authorable-surface("1255 default(s) unchanged"),check:api-surface("public API surface + factory signatures unchanged ✓" after regen),check:export-origins("5181 exports across 17 entry points resolve exactly as recorded"),check:engine-double-contract,check:where-matcher,check:i18n("all bundles in sync"),check:i18n-stale-fill,check:query-options-erasure,check:type-check-coverage,check:type-check-debt("31 ledger entr(ies) re-measured … none above its recorded number"),check:nul-bytes, plus the full derived lint batch (changeset gates, cross-package-test-inputs, doc-authoring, merge-driver, published-files, slot-lookup, spec-parsed-alias, test-source-alias, type-source-resolution, spec liveness/empty-state/strictness-ledger/variant-docs, ADR-0087, plugin-teardown-shape, dev-prereqs after full closure build) — all green.scripts/pm/check-governed-queue-guard.mjsis CI-context-only (readsGITHUB_EVENT_PATH): NOT MEASURED locally; runs on this PR in CI (packages/spec/src/index.tsis a governed surface — clause-② applies per dispatch).Out of scope by design: L2+ legs (core derivation is
Blocked-by:this card). #11504 / #12610 / #12606 / #12515 surfaces are disjoint from this diff. Draft by dispatch contract (clause-②): stop at draft, no ready-flip.Generated by Claude Code