docs(core): re-key the §6b-config posture-gate comment to the ruling it cites - #18645
Conversation
…it cites The comment justifying the posture gate on the legacy-grant deprecation notice stated the PRE-reversal rule as current fact — "the `single` promotion is pinned NEVER to consult that variable" — and cited bootstrap-platform-admin-walled-owner.test.ts as live support for it. The maintainer ruling of 2026-09-08 (decision batch #100, recorded on #16682) reversed exactly that point: under `single` posture the first-boot promotion consults OS_PLATFORM_OWNER_EMAIL first. The cited string survives in that test only inside its re-authored block's account of what the case USED to assert, so a reader following the citation landed on text contradicting the comment that sent them there. Re-keyed to the post-ruling behaviour, with the citation re-pointed at what the pin records now, and the neighbouring "whichever way Choice 4B is eventually ruled" clause corrected: 4B is ruled and filed, not landed. The gate's actual justification is restated from what the reversal did NOT change — the declared-owner leg mints the same unscoped admin_full_access row, and a rig already holding one answers already_have_admin before that leg runs — so the migration notice stays scoped to walled rigs. Comment-only: no behaviour, no assertion, no logic touched. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CqmCgU5RGDoJYhHUMVp2af
📓 Docs Drift CheckThis PR changes 1 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 2 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 24 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 976911cede069f717a55ebaf5eaa7f24dac72e4a && git checkout 976911cede069f717a55ebaf5eaa7f24dac72e4a
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 922c7558882403b77e245c8e0ab5634e0ee47e6b cb602a03b3d2b1a092f544d8c65de6cebb212c52 && git checkout -B drift-repro 922c7558882403b77e245c8e0ab5634e0ee47e6b && git merge --no-ff cb602a03b3d2b1a092f544d8c65de6cebb212c52
node scripts/docs-audit/affected-docs.mjs --json 922c7558882403b77e245c8e0ab5634e0ee47e6b
|
Fixes #18380
Clause-②: no
Comment-only repair at
packages/core/src/security/resolve-authz-context.ts§6b-config. No behaviour, no assertion, no logic touched — the diff is 32 insertions / 11 deletions, all of them inside one//block.The defect
The comment justifying the posture gate on the legacy-grant deprecation notice stated the PRE-reversal rule as current fact, and cited a pin as live support for it:
The maintainer ruling of 2026-09-08 (decision batch #100, recorded on #16682, comment
5587754690) reversed exactly that point, verbatim:What the pin records now — read, not assumed
never consults the owner-email variable, repo-wide underpackages/packages/plugins/plugin-security/src/bootstrap-platform-admin-walled-owner.test.ts:436owner-email variable, same corpusThat single hit lives at
:434-456, inside a block that opens⚠️ RE-AUTHORED by #16682, says the case "used to assert the opposite", quotes the maintainer ruling, and is followed by a case titleda declared owner DOES redirect the single-org promotion (#16682), and 'single' still promotes. So the citation resolved and did not support the claim — it recorded its reversal. The repaired comment now cites the pin for what the pin says.What the reversal did NOT change — the gate's real justification
Verified by reading
packages/plugins/plugin-security/src/bootstrap-platform-admin.ts(read-only; another lane):admin_full_accessrow —promote()is one call site serving both legs (:867),organization_id: null.if (!walled && unscopedHolder) return { reason: 'already_have_admin' }(:687) runs first.singleone, and the over-denial invariant (adminPromoted === truewith a grant row minted) stays pinned."⇒ The notice's first half ("it is removed in a later release") is still false for a
singlerig, so the posture gate stays right. Its second half ("Re-anchor ... by declaring its administrators in configuration") is no longer inert undersingle— which is what the old comment got backwards — but it still does not move such a rig off the grant row. The repaired comment says that, instead of the reversed premise.The neighbouring clause was stale too, and is fixed
The old text read "That holds whichever way Choice 4B (#11979) is eventually ruled". Checked rather than assumed: 4B is already ruled, and what is pending is the landing — #11663 comment
5404675670(maintainer acceptance 2026-08-25), verbatim: "4B is ruled as the sequenced follow-up, not dropped (card filed ...)"; #11979 is open andpm:blockedbehind #11978. The clause now says ruled and filed, not landed.Verification — final head
cb602a03b3Gate derivation and reconciliation were run once, on this head:
pnpm check:cross-package-test-inputs:: exit 1 — the known gate defect [finding]check:cross-package-test-inputsexits 0 or 1 on the same commit depending on whether adist/exists — and lint.yml runs it with no build ahead of it, so CI only ever sees the blind leg #18621, not this PR's red. It fires on the mere existence ofpackages/spec/dist/, which the dependency-closure build creates. Control measured here: withpackages/spec/dist/moved aside the same command exits 0 ("OK: 29 package(s) read outside themselves, all declared"), and restored byte-for-byte afterwards (216 files before, 216 after).pnpm check:dual-build-cjs-loadsandpnpm check:lean-entry-closure:: exit 3, PREREQUISITE NOT MET — both refuse to measure without a whole-repodist/. Recorded as NOT MEASURED, declared to CI; a comment-only diff cannot move either.Targeted, under the shared verify lock:
Repo-wide
pnpm lint(eslint . --no-inline-config) also run in full: exit 0, so no narrowing had to be declared.Changeset decision: none,
skip-changeset— measured, not assumed@objectstack/coreshipsfiles: ["dist", "README.md", "CHANGELOG.md"]. After building the package, those paths were grepped with a positive control:hasPlatformAdminStanding("the ID-SHAPED platform-admin question")dist/index.d.ts, 1 indist/index.d.ctsThe control lands, so the instrument is live; the needles do not. A function-body comment reaches no published artifact: the declaration emitter carries only declaration-level docblocks, esbuild drops body comments from
dist/*.js/*.cjs, anddropSourcesContentkeeps the source text out ofdist/*.map. Nothing published moves ⇒ no changeset, and theskip-changesetlabel is applied.Acceptance notes
bootstrap-platform-admin-walled-owner.test.ts's enclosingdescribetitle still readssingle posture — "first user is owner" is ruled reasonable and UNCHANGED (Choice 4A), while the case inside it now asserts that a declared owner redirects the promotion. The block's own re-authored docblock explains the split correctly, so this is a title-level nit, not a defect, and it is in thedomain:serviceslane (read-only for this card). Who will touch it: platform-admin re-anchor follow-up (Choice 4B): config-anchor thesingleposture — first-user promotion becomes development-only fallback #11979's implementer — Choice 4B rewrites exactly this block when it lands.singlepromotion exists in the edited file:OS_PLATFORM_OWNER_EMAILappears once more, in thehasPlatformAdminStandingdocblock, and that text is accurate.Generated by Claude Code