Uh oh!
There was an error while loading. Please reload this page.
docs(adr-0056): reconcile Consequences with the P2/P4 pure model - #5970
Merged
Conversation
Two bullets in ADR-0056's Consequences still described the original Option B (capabilities editable in Setup as an exception), contradicting P2, P4, and Decision 3/4 of the same file: - "Capabilities are authored once, in Setup, through the `sys_capability` picker" — P2 says capabilities are designed in the structured editor, "not authored in Setup", and the code agrees: the picker (CapabilityMultiSelectField) is rendered by Studio's PermissionMatrixEditor, while Setup stamps the read-only `permission-facet-link` widget on all six facets including `system_permissions`. - "hence P2 keeps that grant in Setup and first-class", preceded by "an admin who ... lacks `studio.access` can no longer *design* them" — Decision 1/3 and A2 (revised) settle the opposite: the same editor has two entry points, and Setup's env-scope metadata route runs under `setup.access`, which is what dissolves the bootstrap knot. Prose only; no code, no schema, no other file. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CSoz9uGhaaSgiq3hshtN7L
This was referenced Aug 24, 2026
os-trump
commented
Aug 25, 2026
Collaborator
Merging on the maintainer's direct instruction. Provenance: the maintainer, PM chat session 2026-08-25, batch-2 governed-PR review including this PR (both hunks presented; the second — the same Option-B residue one bullet over — recommended and accepted as part of the batch): 「同意」. Audit record for the governed-merges checklist. Checks verified at head Generated by Claude Code |
os-trump
marked this pull request as ready for review
August 25, 2026 11:10
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#3794
⛔ This PR is
docs/adr/**— a governed path. It must be merged by a human and must NOT reach the merge queue. It stays a draft: not marked ready, not enqueued, no auto-merge. Human merge is the review record.What changed
docs/adr/0056-permission-editing-studio.md, prose only, two bullets in Consequences. Nothing else in the repo.Both bullets still described the ADR's original Option B (
system_permissionseditable in Setup as an exception) — the model this ADR's own Status line records as superseded by the pure model. Direction was settled by triage on 2026-08-09: "the later, specific rulings win over the earlier summary sentence". P2/P4 stay as they are.1. The bullet the card names (the target of #3794)
→ Capabilities are designed once, in Studio, through the
sys_capabilitypicker (P2); Setup only assigns permission sets to users (P1b) and shows every facet read-only (P1).Verified still present before editing, with control probes so a zero-hit would have read as real rather than mis-pathed:
One authoring path per concern(control — known present)P2 — Studio: System Capabilities editor(control — known present)authored once, in Setup(target)2. A second contradiction found by the audit — same defect class, same section
This is Option-B residue twice over, and it is contradicted by four settled statements inside this same file:
system_permissions. … The bootstrap concern (grantingstudio.accessshouldn't require Studio) is resolved by the editor's env-scope entry point living inside Setup (/apps/com.objectstack.setup/metadata/permission/:name,setup.access), not by keeping a JSON/authoring field on the record."studio.access) and from Setup's env-scope metadata route (setup.access) … the same component, two entry points."The replacement text says only what those four already decide, plus what the code shows. A reviewer who prefers the audit bounded strictly to the one sentence #3794 names can drop this hunk on its own — it is a separate, self-contained hunk.
Evidence — every Consequences bullet audited against P1–P4 and against the code
CapabilityMultiSelectFieldis rendered by Studio'spackages/app-shell/src/views/metadata-admin/PermissionMatrixEditor.tsx:980, bound todraft.systemPermissions. Setup stampspermission-facet-linkon all six facets includingsystem_permissions—packages/data-objectstack/src/index.ts:3397-3402.RecordPermissionAssignmentsRendererrendersAssignedUsersSectionon the Setup record page (P1b). "makers design" — Studio Access pillar →PermissionMatrixEditPage. A statement about audience, not about which surface hosts the editor; no tension with Decision 1's two entry points.DetailSection.tsx:261), inline edit (InlineFieldInput.tsx:248), record form (ObjectForm.tsx:664-669,widget || type).PermissionFacetLink.tsxcontains noonChange,input, ortextarea. The raw-JSON escape hatch contemplated in open question 5 was never shipped.applyFieldWidgetOverridesis invoked fromgetObjectSchema(packages/data-objectstack/src/index.ts:3361) — the ADR names exactly that choke point. It sets onlywidget, nevertype; the framework object definition is unchanged.RowLevelSecurityPolicySchema/tabPermissionsenum /AdminScopeSchemafrom@objectstack/spec— the editors couple to those shapes"packages/app-shell/src/views/metadata-admin/clientValidation.ts:526explaining thatRowLevelSecurityPolicySchemais deliberately not substituted.PermissionAdvancedFacets.tsxdeclares local mirror interfaces and says the shapes were "checked against the spec schemas rather than sampled from live data (objectstack#7130)". So the bullet's trailing clause — "the editors couple to those shapes" — is exactly right, and it is the sentence's own gloss on "read". Under that reading the bullet is not wrong, so the fix would be a wording preference, not a direction correction. Not touched. If a reviewer wants it sharpened: "mirrorRowLevelSecurityPolicySchema, thetabPermissionsenum andAdminScopeSchema— checked against the spec schemas rather than importing them."PermissionFacetLink.tsx:71-78builds the deep-link from the currentappName(useParams), so from a Setup record page it targets/apps/com.objectstack.setup/metadata/permission/:nameand never cross-navigates into Studio — i.e. what shipped is the "Setup-hosted route that reuses the component" branch of open question 1, which is what makes Decision 3'ssetup.accessentry point real.Audit outcome: 6 Consequences claims (5 bullets, the 4th having three sub-bullets). 2 fixed, 2 accurate, 2 deliberately left with the measurement reported.
Verification
Gate union re-run at the final commit
c18be84e8, working tree clean, each verdict quoted from the gate's own output (not from$?):node scripts/check-changeset-presence.mjs✅ No source of a released package changed in this range, so no changeset is owed.(1 file(s) changed, 0 of them under the src/ of a package the release covers)node scripts/check-control-bytes.mjs✅ check-control-bytes: OK (scanned 4950 tracked text file(s); skipped 85 binary).node scripts/check-doc-links.mjsLinks are valid across 13 scan roots.node scripts/check-doc-component-types.mjs✅ Every documented component type is registered.No changeset — the presence gate itself says none is owed for this range.
Declared narrowings (CI runs the full farm regardless):
check:doc-snippets— outside its scan surface, by the script's own constant:check-doc-snippet-types.mjs:208setsDOCS_ROOT = 'content/docs'; this diff is underdocs/adr/. (It also cannot run in this worktree —ERR_MODULE_NOT_FOUND: typescript, nonode_modulesinstalled for a docs-only change.)lint:rootiseslint . … --ignore-pattern 'docs/**', andlintisturbo run lint(per-package) whiledocs/adrbelongs to no workspace package (nodocs/package.json). File count: 1, from the changeset gate's own output. Invariance: the diff is prose inside one Markdown file — no eslint config, tsconfig, orpackage.jsonchanged, so no untouched file's verdict can move.Manual on-disk confirmation of the edit, anchored in both directions rather than trusting an editor exit code:
Generated by Claude Code
Generated by Claude Code