Uh oh!
There was an error while loading. Please reload this page.
docs(comments): correct four docblock sites describing the retired platform-admin elevation gate - #13907
Merged
os-steve merged 1 commit intoAug 31, 2026
Conversation
…etired platform-admin elevation gate The #11663 platform-admin re-anchor (legs L2 and L4) retired the walled platform-admin elevation gate: standing is now derived per request, from an env-configured verified email OR the legacy unscoped grant row. Four comment sites still described the retired mechanism. - packages/types/src/email-verified.ts: the docblock named the elevation gate as one of exactly two consumers. It ships in the package's .d.ts, so the wrong consumer set reaches consumers. Replaced with the live consumer set, which now includes the authorization derivation itself. - packages/plugins/plugin-auth/src/last-admin-guard.ts, the docblock above PERMISSION_SET_STANDING_KEYS: three consequences of the same dead premise — "un-makes every platform admin at once", "never from the capabilities it carries", and "UNSCOPED sys_user_permission_set grants only". Comment-only. `active` deliberately stays in PERMISSION_SET_STANDING_KEYS and the corrected prose now says why: it is a safety-side over-approximation, and removing it would be a behaviour change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ZC5rNQj3WEet5HAmmAkMs
Contributor
📓 Docs Drift Check
What this run could not see
Coarse fallback — 11 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
os-steve
marked this pull request as ready for review
August 31, 2026 17:10
os-steve
enabled auto-merge
August 31, 2026 17:10
Uh oh!
There was an error while loading. Please reload this page.
os-steve
deleted the
claude/issue-13661-retired-elevation-gate-comments
branch
August 31, 2026 17:36
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.
Closes#13661
Comment-only. Zero behaviour change. The #11663 platform-admin re-anchor (legs L2 and L4, both landed) retired the walled platform-admin elevation gate — standing is now derived per request at
resolve-authz-context.ts§6b-config, from a config-anchored verified email (OS_PLATFORM_OWNER_EMAILplus a verifiedsys_userrow) or the legacy unscoped grant row, config arm first. Four comment sites still described the retired mechanism as live.All four re-verified against
origin/mainat46b53a25bbefore editing, as the card required — PR #13685 (leg L3) rewrote 41 comment lines inlast-admin-guard.ts, and all three quotes it could have carried away are still there, at the same lines the grading comment measured (:635-636,:648-650,:663-665).The four corrections
1.
packages/types/src/email-verified.ts— this docblock ships in the package's.d.ts, so its consumer set reaches consumers. It named the elevation gate as one of exactly two consumers. Now:The list that follows names the live readers, verified by
git grep isEmailVerifiedUserRow:matchesConfiguredPlatformAdmin(the derivation site, and through it plugin-auth's last-admin guard),resolvePlatformAdminStandingandisVerifiedPlatformOwnerRowin plugin-security, and the walled owner-verification boot diagnostic in plugin-auth. The drift argument is restated for that set:2.
last-admin-guard.ts:635-636— "un-makes every platform admin at once" is true for the grant anchor only:activestays inPERMISSION_SET_STANDING_KEYS, and the corrected prose now says why in terms — because the corrected reasoning is exactly what would make a future reader think it can go:3.
last-admin-guard.ts:648-650— the "never from the capabilities it carries" half read as an exhaustive statement of the derivation's inputs. The paragraph's conclusion (label/description/permission-blob writes stay invisible to "who is an administrator") is still true and is kept:4.
last-admin-guard.ts:663-665— "grants only" is false post-L2; a config-anchored administrator needs no grant row at all. The paragraph's own claim (a position reaches nothing) survives, and now points at the list that does guard the config anchor'ssys_userhalf:One further edit, mechanical: the site-3 rewrite left an over-long line, so the sentence that follows it ("Adding
activedoes not walk that back…") is re-wrapped. Same words, different line breaks.Zero-behaviour-change measurements
Both taken at head
85eee388d.Non-comment diff is empty, measured rather than asserted: each file, before and after, run through
ts.transpileModulewithremoveComments: true— the executable substance with all comments gone.diff -uis 0 lines for both files, and the sha256 of the stripped output is unchanged:A cruder second reading agrees: every added and removed line in
git diff -U0begins with a JSDoc continuation marker; filtering those out leaves nothing.throwcensus, both directions —grep -cE '\bthrow\b':packages/types/src/email-verified.tspackages/plugins/plugin-auth/src/last-admin-guard.ts(The grading comment measured 6 on L3's head
df17ff0a7;origin/mainat46b53a25bcarries 7. The census is identical before and after this change, which is what it is for.)Control-byte self-scan over both files: clean (
grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]'matches nothing).Gates
Re-derived from the actual diff, not from the dispatch list:
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstackat85eee388d— 2 paths, 21 families plus 1 convention-triggered. No.mdxentered the diff (check-system-context-censuspassed without needing--fix), so no second derivation was owed. All 22 run locally, exit captured before any pipe:20 green, including the two the card flagged as the line-anchor-rot risk —
check-system-context-census,check-affected-docs,check-drift-comment,check:doc-authoring,check:published-files,check:type-source-resolution,check:test-source-alias,check:dispatcher-error-vocabulary,check:cross-package-test-inputs,check-comment-mask-adoption,check-keyed-text-bounds,check-tenant-audit-census,check-ci-filter-parity,check-plugin-teardown-shape,check-shard-attestation,check-undeclared-dep-imports,check:logger-receiver-detach,check:page-declaration-shape,check:slot-lookup.2 NOT MEASURED (exit 3 = PREREQUISITE NOT MET — neither a pass nor a red):
check-test-completeness— "this gate grades a savedturbo run testlog, and no log was named"; the gate's own text says the local reading for it is NOT MEASURED.check:dual-build-cjs-loads— "PREREQUISITE NOT MET — this gate reads built output, and some package has no dist/", listing 102 unbuilt packages. It needs a whole-workspacepnpm build. It reads CJS load behaviour ofdistentrypoints, which a comment cannot move, and the byte-identical stripped-output measurement above is the evidence for that; CI measures it for real.Beyond the derived family:
pnpm lint(eslint . --no-inline-config, whole repo, the unconditional CI step) — green, 63s. Not narrowed.pnpm --filter @objectstack/types typecheckandpnpm --filter @objectstack/plugin-auth typecheck(tsc --noEmit, and plugin-auth's secondtsconfig.examples.jsonpass) — both green, script names echoed in the logs so neither is a zero-match no-op.pnpm --filter @objectstack/types test— 16 files, 473 passed.pnpm --filter @objectstack/plugin-auth exec vitest run --maxWorkers=2overlast-admin-guard.test.ts,last-admin-guard.config-anchor.test.ts,last-admin-guard.re-pricing.test.ts,last-admin-standing-keys.test.ts— 4 files, 163 passed.Dependency closures were built first, through turbo (
turbo run build --concurrency=2 --filter=@objectstack/types --filter=@objectstack/plugin-auth, 26 tasks successful), so nothing above read a staledist. Every heavy run went throughscripts/pm/os-verify-lock.sh.Changeset:
skip-changeset, deliberatelyThe label is applied, and this is the judgment rather than an assumption.
skip-changesetis the repo's exemption for a PR that publishes nothing, and a comments-only diff is on the closed list for it. The nuance the card flagged is real —packages/typesdocblocks do ship, in.d.ts, andplugin-auth's exported-const docblocks ship the same way — but nothing a consumer can depend on moves: no type, no exported name, no runtime, no contract. The transpile-with-removeCommentsmeasurement above is exactly the statement that the published substance is byte-identical. A changeset here would force a patch release of two packages whose CHANGELOG row could only say "an internal docblock now describes the current mechanism", which is release-note noise rather than a user-visible change.Out of scope, filed
Filed out of scope: #13903 — the same dead premise survives at roughly six more comment sites the card did not scope, including
packages/types/src/env.ts:169, which ships in the types declarations for the same reasonemail-verified.tsdoes. Deliberately not fixed here: the card names four sites in two files, and two of the sites in that finding are already correctly past-tense while a third is wrong only about the name, so it needs per-site triage rather than a search-and-replace rider on this PR.Generated by Claude Code