Skip to content

docs(objectql): make the PLATFORM_NAMESPACE docblock describe the post-#13491 reality - #14097

Merged
zhuangjianguo merged 1 commit into
mainfrom
claude/issue-13637-namespace-header-truth
Sep 1, 2026
Merged

docs(objectql): make the PLATFORM_NAMESPACE docblock describe the post-#13491 reality#14097
zhuangjianguo merged 1 commit into
mainfrom
claude/issue-13637-namespace-header-truth

Conversation

@claude

@claude claude Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Fixes #13637

objectql's PLATFORM_NAMESPACE docblock 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.ts has two docblocks in play, and #13491's own landing (e49d988, 2026-08-31) updated one of them but not the other:

docblock state on origin/main before this PR
the top-of-file module header (lines 68-86) already TRUE — e49d988 added the passage naming the divergence as deliberate and out of that PR's scope
the PLATFORM_NAMESPACE const docblock (lines 125-136) untouched since 2026-08-15 (ff08691), and FALSE

So 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:

  1. "Platform namespaces whose rows are deliberately global / cross-organization and must never be adopted into one" — the wholesale reading. The re-ruling made it a per-object verdict.
  2. "This is the third write path to carry it, and the three have to stay in step" — objectql is not a write-path cut at all any more. PLATFORM_NAMESPACE now has exactly one reader, isPlatformNamespaceObject, which isPlatformObjectOutOfTenantAuditScope uses 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_TENANCY ledger in packages/objectql/src/tenancy/platform-object-tenancy.ts, read through classifyPlatformObjectTenancy / 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.tsPLATFORM_OBJECT_PREFIXES, a fourth hard-coded copy of the same three prefixes, consumed by stack.zod.ts (a cross-reference allowance behind a hard defineStack throw) and by packages/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 -U0 is 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.

  • Union of all 22: 20 exit 0. Two returned exit 3 = NOT MEASURED, which is not a pass: 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") and pnpm check:dual-build-cjs-loads ("PREREQUISITE NOT MET — this gate reads built output... Run pnpm build first. ⛔ 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 typecheckexit 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 --listFiles names 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.ts2 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

…#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.
@claude claude Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 1, 2026
@github-actions github-actions Bot added the size/s label Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️ 1 changed file(s) yielded no anchor (packages/objectql/src/tenancy/system-write-organization.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)).

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/objectql/src/tenancy/system-write-organization.ts) — pages documenting those are invisible to this run
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.

Coarse fallback — 15 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json def3b7c43425a5a7b3ea14afaacb50b4e9439491packageMentionDocs.

@zhuangjianguo
zhuangjianguo marked this pull request as ready for review September 1, 2026 05:53
@zhuangjianguo
zhuangjianguo added this pull request to the merge queue Sep 1, 2026
Merged via the queue into main with commit 878b162 Sep 1, 2026
37 checks passed
@zhuangjianguo
zhuangjianguo deleted the claude/issue-13637-namespace-header-truth branch September 1, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[finding] the platform-namespace regexp now DIVERGES across the three write paths objectql's own module header says must stay in step

2 participants