Uh oh!
There was an error while loading. Please reload this page.
docs(spec): stop the def-key-collision prose committing to a live self-alias count - #12854
Merged
Merged
Conversation
…f-alias count The module doc, the pin test's comment and the user-facing remedy text all cited `export const ThemeMode = ThemeModeSchema` plus "fourteen more across api, system and ui". No such export exists anywhere in packages/spec/src, the population is not fourteen, and no `ui` def key is in it. Describe the shape instead of restating a total, cite a self-alias that really exists (api/ApiEndpoint, with the Object.assign spelling the package actually uses), and point the reader at the per-run report line build-schemas.ts has printed since #12588. Comments and one build-output string only.
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
This was referenced Aug 28, 2026
os-sales
marked this pull request as ready for review
August 28, 2026 04:22
os-sales
enabled auto-merge
August 28, 2026 04:22
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 28, 2026
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.
Fixes#12608
Three prose sites in the def-key-collision guard claimed a self-alias population that does not exist, and cited an export that does not exist. Comments and one build-output string only — no behaviour anywhere, no new gate.
Day-of re-measure (premise check)
The card measured at
7c0d0c395; #12588 has since landed (146f448a), so the population was re-measured on today'sorigin/main(6f0fec3d) from a real generator run rather than re-derived by hand —pnpm --filter @objectstack/spec run check:authorable-surface, which isbuild-schemas.ts --checkand prints the population #12588 added:The 11 def keys it lists:
api/ApiEndpoint,api/RestApiConfig,api/RestServerConfig,api/ApiDocumentationConfig,api/ApiTestCollection,api/OpenApiSpec,api/RestApiPluginConfig,api/RestApiRouteRegistration,system/MiddlewareConfig,system/QueueConfig,system/Task.Categories:
api(8) andsystem(3). Nouientry, as the card said. The card's other two (system/BatchTask,system/WorkerConfig) are still self-aliases insrc/system/worker.zod.tsbut both halves are skipped as unrepresentable ("Function types cannot be represented in JSON Schema"), so they never reach an emit — the card's 13-at-the-walk / 11-surviving split still holds, unchanged. Fourteen was wrong then and is wrong now, and the number that is right depends on which of two questions you are asking — which is the whole argument for prose that does not carry one.git grep -n "export const ThemeMode\b" -- packages/spec/srcstill returns nothing: the cited symbol does not exist.One correction beyond the card
The card assumed the real convention is spelled
export const X = XSchema. It is not — all 11 useObject.assign(XSchema, { … }):(
src/api/endpoint.zod.ts:225— the generic signature is elided above on purpose, since angle-bracket fragments do not survive this body reliably.)Object.assignreturns its target, soApiEndpointandApiEndpointSchemaare one object and the guard's identity predicate exempts it. SwappingThemeModeforApiEndpointwhile keeping the= XSchemaspelling would have replaced one unfindable citation with another, so the new prose cites the spelling that is actually in the file, and names the plain re-export as the same shape by the same test.The three sites
scripts/lib/def-key-collisions.tsmodule docexport const ThemeMode = ThemeModeSchema, and fourteen more acrossapi,systemandui"src/api/endpoint.zod.ts's realApiEndpointline, and states the population is deliberately not restated — pointing at the per-run report line and atfindSelfAliasedDefKeysthat builds itscripts/def-key-collisions.test.tsline 326export const X = XSchemaself-aliases this package really does carry"Object.assign(XSchema, …)exports underapi/andsystem/"; states the number is deliberately not pinned and names the generator as the live sourceformatDefKeyCollisionsremedy text (user-facing build output)export const ThemeMode = ThemeModeSchema— that shape is allowed here …)"export const Foo = FooSchemaas the placeholder the surrounding text already uses, plus the realObject.assignformsrc/api/endpoint.zod.tsuses forApiEndpoint; closes by pointing at the build's own summaryThe acceptance criterion is that the wording stays correct when the population moves again: no site now names a count, a category set, or a symbol that a future edit can falsify.
No test asserts the remedy string. Checked before editing —
git grepforduplicate DECLARATION/re-export the survivoracrosspackages/specandscriptsreturns onlyscripts/lib/schema-index.ts, which is a different file's own message. The pin test asserts the collision header and theshared/HttpMethodline, both untouched. So no assertion updates were owed.Deliberately not done
ThemeModefixtures are left alone (lines 16, 62-67, 95-96, 156-157, 166, 170). Those construct a syntheticEmittedDefon the spot from an obvious placeholder literal, so they claim nothing about what the package exports — unlike the module doc, which claimed "the package's self-alias convention". Renaming them would be diff noise across a file this PR only comments on. Flagging the judgment rather than burying it.Verification
Gate union derived against the actual changed set with
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack(it reads the merge-base change set itself), then every derived family run. All readings below are from the final commit,9e896a04, on a clean tree.25 green, each exit code captured before any pipe:
check:authorable-surface,check:cross-package-test-inputs(both the pnpm and the ci.yml spelling),check:empty-state,check:liveness,check:merge-driver,check:objectql-double-limit,check:page-declaration-shape,check:pm-governed-merges,check:published-files,check:slot-lookup,check:strictness-ledger,check:test-source-alias,check:type-source-resolution,check:variant-docs,check-ci-filter-parity,check-comment-mask-adoption,check-plugin-teardown-shape,check-affected-docs,check-drift-comment,check:nul-bytes, plus the convention-triggered set for editing a test file:check:query-options-erasure,check:engine-double-contract,check:where-matcher,check:type-check-coverage.The guard and the reworded output still agree —
pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 scripts/def-key-collisions.test.ts: 17 passed (17). That file's last test mutates a fixture copy of the package to introduce a real collision, spawnsbuild-schemas.ts, and asserts the guard's verdict on its output, so the remedy string is exercised through the generator rather than read.pnpm --filter @objectstack/spec run typecheck— exit 0. It is three programs, and both edited files are genuinely covered:tsconfig.scripts.jsoncompiles the lib,tsconfig.test.jsonthe test file (check:test-typecheck: OK — @objectstack/spec's test layer compiles).NOT MEASURED (1):
node scripts/check-dev-prereqs.mjsexits 1 with its own printed line — "The workspace is not built — 1 unmet precondition, not a list of problems. 67 of 67 workspace packages declare an entry point under dist/ that is not on disk". That is the unbuilt-worktree precondition, not a verdict on this diff: the gate measures whether builtdist/entry points exist, which two comment-only files underpackages/spec/scripts/cannot move. CI builds from a fresh checkout and measures it there. Declared rather than silently dropped.Repo-wide
pnpm lintwas not run — CI owns that sweep; heavy runs here went throughscripts/pm/os-verify-lock.shon a contended shared box.Release impact: nothing, so
skip-changesetrather than a changeset fileMeasured, not assumed.
packages/spec'sfilesallowlist isdist,json-schema,liveness,prompts,llms.txt,README.md,src/**/*.zod.ts,CHANGELOG.md,api-surface,spec-changes.json—scripts/is not in it, so neither edited file enters the npm tarball. Neither string reaches a generated artifact either: the module doc and the test comment are comments, and the remedy text is printed to the console only on a collision, which fails the build rather than writing anything. A grep for the changed strings acrosscontent/docs,json-schema/,api-surface/andobjectstack.jsonfinds no artifact carrying them (the singlecontent/docs/releases/v17.mdxhit is an unrelated sentence about inert metadata keys).So this diff releases nothing, and the honest route is the
skip-changesetlabel, applied by the dispatching seat — not a changeset file, and not an empty one (those are rejected). Flagging it here so the seat can apply it.Generated by Claude Code