Repository navigation
fix(plugin-security): the platform-admin promotion WITHHELD warning says what 18.0 supports for a v17 database - #24718
Conversation
…ays what 18.0 supports for a v17 database The warning ended by pointing at the organization-ownership migration's id-to-name rewrite, which 18.0 refuses on every database. It now ends with the sentence the boot refusal carries. The withholding, the returned result and the log level are unchanged; a pin beside the unnamed-holder cases holds the text. Claude-Session: https://claude.ai/code/session_011TdZ8GjixNZFLz1xJD9zzK Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 15 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 def634d102bf9b788b36392fd8370fd06d01a86c && git checkout def634d102bf9b788b36392fd8370fd06d01a86c
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 54159fd742e5a79fc10ac41854dba3395e1a1ffe 7357dcca56269ee4e0d9ca3c860c8cc7acde2ab4 && git checkout -B drift-repro 54159fd742e5a79fc10ac41854dba3395e1a1ffe && git merge --no-ff 7357dcca56269ee4e0d9ca3c860c8cc7acde2ab4
node scripts/docs-audit/affected-docs.mjs --json 54159fd742e5a79fc10ac41854dba3395e1a1ffe |
席位核对 · ACCEPT ·
|
Fixes #24709
Clause-②: no
What this changes
The boot warning "[security] platform-admin promotion WITHHELD: an unscoped grant exists whose permission-set name (sys_user_permission_set.permission_set) was never written" ended by sending the operator to the organization-ownership migration: "The organization-ownership migration's id-to-name rewrite (ADR-0131 D10) names it; the next pass after that reads it by name." 18.0 refuses that migration on every database, so an operator booting a v17-shaped database with an unnamed grant was pointed at a refusal.
The warning now ends with the sentence the boot refusal and the two sibling release-text rows already carry (PR #24635 and PR #24679 landed it): "18.0 supports fresh installs only and does not upgrade a v17 database: keep a v17 database on a 17.x release until the 18.x release that carries the upgrade path."
Text only. The withholding does not move:
findPlatformAdminGrantHolder, theunnamedHolderguard, the returnedadminPromoted: false/admin_grant_unnamedresult, thelogger.warn/logger.infofallback and every other clause of the warning (what is withheld, why, "this pass will not mint a second one") are unchanged.Files:
packages/plugins/plugin-security/src/bootstrap-platform-admin.ts(the string only, 2 lines),packages/plugins/plugin-security/src/grant-readers-unnamed-grant.test.ts(one new case),.changeset/24709-platform-admin-withheld-18-text.md(@objectstack/plugin-securitypatch).Pin
One case in
grant-readers-unnamed-grant.test.ts, beside the existing unnamed-holder cases, which already build the state (an unscopedadmin_full_accessgrant written with a NULL name, an older account the age rule would otherwise promote). It runsbootstrapPlatformAdminwith a capturing logger and asserts:adminPromoted: false,reason: 'admin_grant_unnamed') and logged the WITHHELD warning exactly once (anti-vacuity);organization-ownership,os migrate,--out,--apply,--plan-file,ceremony,id-to-name.Evidence (head
7357dcca56)pnpm --workspace-concurrency=2 --filter '@objectstack/plugin-security^...' build, under the verify lock, VERDICT command-exit 0.pnpm --filter @objectstack/plugin-security exec vitest run --maxWorkers=2 src/grant-readers-unnamed-grant.test.tsis 8 passed (7 existing plus the new case), VERDICT command-exit 0, run again after the ablation was restored: 8 passed.pnpm --filter @objectstack/plugin-security typecheckexit 0, includingcheck:test-typecheck(the test layer compiles, 0 errors).scripts/ablation-replace.mjs(anchor hit once, blobeac7d8f87baatof9123b5ffce1on disk). The test imports./bootstrap-platform-admin.jsfromsrc, so no rebuild leg applies. Result: 1 failed, 7 passed, the new case red with the old clause as the received text, the expected direction (red). Restore proven on disk: blob equals the HEAD blob andgit diff HEADis empty.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 68 commands; each was run with its exit captured before any pipe, then--ranreconciled: 68 derived, 67 run (all exit 0), 1 NOT-MEASURED, 0 UNRUN.pnpm check:i18nfirst exited 3 (prerequisite not met), was re-run after building its stated closure, and exited 0.pnpm check:dual-build-cjs-loads, reason: it reads the built output of every package and exits 3 (prerequisite not met) without a whole-workspace build, which CI'sBuild Coreowns; this diff changes no export,package.jsonor build config.test:repo, the type-check lanes, and the lint workflow's repo-wide gates.Acceptance notes
bootstrap-platform-admin.ts(the "By name, and the grant that names nothing" section), the comment above theunnamedHolderguard, the header ofgrant-readers-unnamed-grant.test.tsand a comment incleanup-package-permissions.tsall still describe the v18 ceremony's rewrite in the future tense. They are developer-facing comments, not operator text; noted, not filed.promotion WITHHELD for ...warning in the same file (the Default Organization one) is a different condition and names no migration; unchanged.os migrate organization-ownership --out / --apply --plan-file, which 18.0 refuses on every database (family close-out: spec upgrade-guide entries, runtime boot refusals, plugin-security report, docs) #24637 remains open: this is itsdomain:servicesrow 2, and other rows of that family are outside this PR.origin/mainmoved by five commits while this was open (none touches plugin-security or this changeset), so main was not merged in.Generated by Claude Code