docs(objectql): make the PLATFORM_NAMESPACE docblock describe the post-#13491 reality - #14097
Merged
Merged
Conversation
…#13491 reality The docblock still asserted the pre-2026-08-31 invariant: that this regexp is the third write path carrying the seed loader's rule and that all three must stay in step. #13491 withdrew the wholesale namespace reading for the runtime path only, so the assertion is false — and a header stating a false invariant is worse than one stating none, because the next author reasons from a coupling that no longer holds. Rewritten to describe reality rather than deleted: the coupling existed and was broken DELIBERATELY, and deleting the passage would leave three near-identical regexps that read as drift. The runtime side's per-object classification is now named by code location (the PLATFORM_OBJECT_TENANCY ledger in platform-object-tenancy.ts, read through classifyPlatformObjectTenancy / isPlatformObjectOutOfTenantAuditScope), not by issue number. Comment-only. No behaviour change, no cut logic touched.
Contributor
📓 Docs Drift Check
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): |
zhuangjianguo
marked this pull request as ready for review
September 1, 2026 05:53
zhuangjianguo
enabled auto-merge
September 1, 2026 05:54
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 free
to 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 #13637
objectql'sPLATFORM_NAMESPACEdocblock still asserted a coupling that #13491 (PR #13635) had made false. Comment-only: the docblock is rewritten to describe reality. No behaviour change, no cut logic touched, zero executable bytes changed.What was false, and where
The card named "the module header".
packages/objectql/src/tenancy/system-write-organization.tshas two docblocks in play, and #13491's own landing (e49d988, 2026-08-31) updated one of them but not the other:origin/mainbefore this PRe49d988added the passage naming the divergence as deliberate and out of that PR's scopePLATFORM_NAMESPACEconst docblock (lines 125-136)ff08691), and FALSESo the card's premise still held, but its target was narrower than its wording. The stale docblock carried two assertions the 2026-08-31 re-ruling had withdrawn:
objectqlis not a write-path cut at all any more.PLATFORM_NAMESPACEnow has exactly one reader,isPlatformNamespaceObject, whichisPlatformObjectOutOfTenantAuditScopeuses only as a cheap name-shape pre-filter.Both are the same defect class in the same block, from the same withdrawn ruling, so both are repaired here.
Rewritten, not deleted
Deleting the passage would leave three near-identical regexps in the tree with nothing recording that the coupling existed and was broken deliberately — which reads as drift and invites a "repair". The new docblock keeps that history, states the three current cuts, and names the runtime side's hand-adjudicated classification by code location — the
PLATFORM_OBJECT_TENANCYledger inpackages/objectql/src/tenancy/platform-object-tenancy.ts, read throughclassifyPlatformObjectTenancy/isPlatformObjectOutOfTenantAuditScope— rather than by issue number.Sweep: is there a fourth write path?
No. Three sites cut the namespace to decide organization stamping; two of them still do. Every other carrier of the same three-namespace spelling was checked and is not a write cut:
packages/spec/src/system/constants/platform-object-names.ts—PLATFORM_OBJECT_PREFIXES, a fourth hard-coded copy of the same three prefixes, consumed bystack.zod.ts(a cross-reference allowance behind a harddefineStackthrow) and bypackages/cli/src/utils/unmanaged-tables.ts(reporting). Neither stamps an organization, so neither is in this coupling.packages/plugins/plugin-security/src/bootstrap-system-capabilities.ts— a quotation of the seed loader's rule inside an analysis docblock. It is the file's only occurrence and it sits inside a comment.Out of scope, filed separately
Whether the seed loader and #8686's backfill should follow the per-object classification is a decision about rows already on disk. It is untouched here and filed as its own decision card: #14096.
Verification
No behavioural ablation is reported, and none was run — there is no behaviour to ablate, because the diff changes zero executable bytes. Fabricating a mutate/restore leg over a comment would measure nothing. What stands in its place is a mechanical proof rather than an assertion: every added and removed line in
git diff -U0is a docblock line (*,/**or*/), the filter returns empty, and a repo-wide grep finds no test or gate that reads this docblock's text.Gate family derived from the real change set with
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack— 21 path-derived families plus 1 convention-triggered. Exit codes captured before any pipe.scripts/check-test-completeness.mjs(its own text: "There is no local log to hand it, so the local reading for this gate is NOT MEASURED") andpnpm check:dual-build-cjs-loads("PREREQUISITE NOT MET — this gate reads built output... Runpnpm buildfirst. ⛔ This is NOT a pass: nothing was measured"). Both need a whole-workspace artifact a comment cannot affect; CI runs both.pnpm lint— the full repo population (eslint . --no-inline-config), not narrowed: exit 0.pnpm --filter @objectstack/objectql typecheck— exit 0, after building the dependency closure (pnpm --workspace-concurrency=2 --filter '@objectstack/objectql^...' build, exit 0). The edited file is confirmed present in that tsc program (tsc --noEmit --listFilesnames it), so the green covers this change instead of skipping it.pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2 src/system-write-organization.test.ts src/tenancy-by-object-classification.test.ts— 2 files, 39 tests passed.Every run above was made at
34ea618, which is this branch's HEAD and its final commit.skip-changeset: this diff publishes nothing from any package — comment-only, no behaviour, no API, no types.Generated by Claude Code