Skip to content

fix(spec): close entry-nameability on the four remaining leaking entries - #12899

Merged
os-trump merged 4 commits into
mainfrom
claude/issue-12414-entry-nameability
Aug 28, 2026
Merged

fix(spec): close entry-nameability on the four remaining leaking entries#12899
os-trump merged 4 commits into
mainfrom
claude/issue-12414-entry-nameability

Conversation

@os-trump

Copy link
Copy Markdown
Collaborator

Fixes#12414

Closes the entry-nameability invariant (maintainer ruling recorded on #11350) on the four public entries #11986's generalized gate found still leaking it, after #11350/#11709 repaired only the defineStack/root instance. Seven (entry, type) pairs, carried in packages/spec/entry-nameability.baseline.json as a named, shrink-only accommodation since #11986 landed:

entryunnameable type(s)
@objectstack/specBook, FormField, NavigationItem
@objectstack/spec/kernelUnknownAuthoringKeyFinding
@objectstack/spec/aiFilterCondition, StateNodeConfig
@objectstack/spec/uiFilterCondition

Repair

One re-export line per name, on the leaking entry, from the module that already declares the type as public on its own subpath — the same shape #11350 and #11709 used:

  • src/index.ts: export type { Book } from './system/book.zod'; / export type { FormField } from './ui/view.zod'; / export type { NavigationItem } from './ui/app.zod';
  • src/kernel/index.ts: export type { UnknownAuthoringKeyFinding } from '../data/authoring-key-lint';metadata-authoring-lint.ts's export * re-export does not carry this name because that module IMPORTS it (type-only) rather than declaring it, so the finding type its lint functions return was unnameable from /kernel.
  • src/ai/index.ts: export type { FilterCondition } from '../data/filter.zod'; / export type { StateNodeConfig } from '../automation/state-machine.zod';
  • src/ui/index.ts: export type { FilterCondition } from '../data/filter.zod';

No collisions: none of the four barrels (nor any module they export * from) already declared a type under any of these seven names — verified by grep across each barrel's full local + re-exported surface before editing, and by a clean pnpm --filter @objectstack/spec build after (0 duplicate-export errors).

entry-nameability.baseline.json's entries is now {} — all seven rows deleted per the ledger's shrink-only rule (a repaired row left in place fails the gate).

api-surface/ regenerated: root.json, kernel.json, ai.json, ui.json each gained exactly the new type name(s), nothing else moved (gen:api-surface — "touched: ai.json, kernel.json, root.json, ui.json"; check:api-surface afterward — "public API surface + factory signatures unchanged" against the freshly built dist, confirming the regen is accurate, not stale).

Verification

At 8a7e85a0 (post pre-PR sync with origin/main, see below), via scripts/pm/os-verify-lock.sh:

  • pnpm --filter @objectstack/spec build — exit 0, 34/34 declared .d.ts present.
  • pnpm --filter @objectstack/spec check:entry-nameability -- --listbefore the repair: 423 call probes … 0 new unnameable structural mentions … 7 pre-existing leak(s), the leak list matching the issue's table exactly. After the repair + rebuild: 423 call probes across 17 public entries, 0 new unnameable structural mentions, with no "pre-existing leak(s)" line at all — the ledger's accommodated count is 0.
  • pnpm --filter @objectstack/spec test — 439 test files passed (439), 11644 tests passed (11644).
  • pnpm --filter @objectstack/spec typechecktsc --noEmit clean, check:scripts-typecheck clean, check:test-typecheck OK (55 file(s) / 263 error(s) held in the pre-existing shrink-only test-typecheck-debt ledger, untouched by this diff).
  • pnpm --filter @objectstack/spec run check:authorable-surface — 1616 schemas generated successfully.
  • pnpm --filter @objectstack/spec run check:docs — 231 generated files in sync.
  • pnpm --filter @objectstack/spec run check:liveness — green, ledger consistent (31 governed types, no drift).
  • pnpm --filter @objectstack/spec run check:strictness-ledger — green.
  • pnpm --filter @objectstack/spec run check:variant-docs — green (18 discriminated unions: 8 governed, 10 exempt).
  • pnpm --filter @objectstack/spec run check:empty-state — green (all classified).
  • pnpm --filter @objectstack/spec run check:skill-refs — 9 generated files in sync.
  • Repo-wide, all green: check:doc-authoring, check:spec-parsed-alias, check:merge-driver, check:published-files, check:type-source-resolution, check:cross-package-test-inputs, check:test-source-alias, check:page-declaration-shape, check:slot-lookup, check:pm-half-states, check:objectui-changeset, check:comment-mask-adoption (re-run after the merge below, since the script itself changed), check:plugin-teardown-shape, check-ci-filter-parity, and the changeset-gate family (check-empty-changeset, check-adr-0087-registration — "this PR adds no declared-breaking changeset", check-changeset-no-major — "introduces no major bump", against the real diff via --base origin/main), plus release-rehearsal-clone --self-test.
  • NOT MEASURED locally (prerequisite refusals, unrelated to this diff's content — CI builds the full farm regardless): check:doc-formula-expressions (@objectstack/formula not built in this worktree) and check-dev-prereqs (the full 67-package workspace is not built; this is a dev-server boot precondition, not a check on my four barrels).

Pre-PR sync

origin/main moved 4 commits since the branch point (bbf88be896732b03) while this was in flight — all in scripts/pm/**, .claude/skills/pm-dispatch/** and packages/lint/scripts/check-doc-formula-expressions.mjs, disjoint from this branch's file surface. Merged clean (no conflicts), re-derived the gate list against the merged tree (node scripts/pm/dispatch-gates.mjs, no stale-tree warning), and re-ran check:comment-mask-adoption since that script's content changed in the merge.

Scope note

#12416 (filed alongside #11986) already covers, and closed as not-planned, the separate "reference shape" 27-pair finding the gate's own docblock calls out as deliberately out of scope for this ledger — not reopened or touched here.

Changeset

@objectstack/spec: minor — matches the bump level #11350 (root-entry-type-reexports-11350.md) and #11709 (root-entry-nameability-data-delta.md) used for the identical repair shape (both still-unreleased .changeset/*.md files on main); not patch as the dispatch note expected — additive public re-exports are the minor convention this repo's changesets already established for exactly this repair, twice.

Generated by Claude Code


Generated by Claude Code

Repairs the seven (entry, type) pairs #11986's generalized gate found still
leaking the entry-nameability invariant (maintainer ruling recorded on
#11350) after #11350/#11709 repaired only the defineStack/root instance:
Book, FormField, NavigationItem on the root @objectstack/spec entry;
UnknownAuthoringKeyFinding on /kernel; FilterCondition and StateNodeConfig
on /ai; FilterCondition on /ui.
One re-export line per name, on the leaking entry, from the module that
already declares the type as public on its own subpath -- the same shape
#11350 and #11709 used. entry-nameability.baseline.json's `entries` is now
{} (all seven rows deleted per the ledger's shrink-only rule). api-surface/
regenerated for the four touched entries.
Card relationship is stated once, in the PR body, not here.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LpRNHxWZgSUgVnFT9mQQo4
Pre-PR sync: origin/main moved 4 commits since the branch point
(bbf88be..96732b0), all in scripts/pm/**, .claude/skills/pm-dispatch/**
and packages/lint/scripts/check-doc-formula-expressions.mjs — disjoint
from this branch's file surface (packages/spec/src/{index,kernel,ai,ui}
barrels, entry-nameability.baseline.json, api-surface/, the changeset).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LpRNHxWZgSUgVnFT9mQQo4
@github-actions

github-actionsBot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️13 changed file(s) yielded no anchor (packages/spec/api-surface/ai.json, packages/spec/api-surface/kernel.json, packages/spec/api-surface/root.json, …), 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
  • 13 changed file(s) yielded no anchor (packages/spec/api-surface/ai.json, packages/spec/api-surface/kernel.json, packages/spec/api-surface/root.json, …) — 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 — 126 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 7b97895355fcda4d9b6ef2a4abe347726a97da1apackageMentionDocs.

Pre-fix sync for the export-origins patch round: origin/main moved 30
commits since the last merge (2b4178a head), including #12718
(preview-mode retirement, touches packages/spec/src/kernel/context.zod.ts
and migrations) and unrelated pm/docs/engine work. Confirmed no overlap
with this branch's four barrel edits before merging: diffing this
branch against origin/main on src/{index,kernel,ai,ui}/index.ts shows
exactly this branch's own additions and nothing else.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LpRNHxWZgSUgVnFT9mQQo4
Patch round on #12414/PR #12899: CI flagged check:export-origins STALE
on ai.json/kernel.json/root.json/ui.json -- the seven re-exports this
branch adds regenerated api-surface but not the sibling export-origins
artifact when the branch was first merged with origin/main (the #12949
precedent this diff follows regenerates both).
Root cause, precisely: merging origin/main (which had since landed
#12718, retiring PreviewModeConfig) picked up main's source changes but
the two GENERATED artifacts derived from that merged source were never
rebuilt -- kernel.json's api-surface still listed the retired
PreviewModeConfig/PreviewModeConfigParsed/PreviewModeConfigSchema, and
export-origins hadn't gained entries for this branch's seven new
re-exports at all.
Fix: pnpm --filter @objectstack/spec build (fresh dist reflecting both
this branch's re-exports and #12718's retirement), then
gen:export-origins + gen:api-surface. Read the resulting diff per the
gate's own #4411 dual-source-trap remedy: each of the seven names'
newly-gained export-origins entry was cross-checked against its origin
on every sibling entry that already carried it (root vs /system vs /ui,
kernel vs /data, /ai and /ui vs /data and /automation) -- all match
byte-for-byte, so this is the harmless re-export shape, never dual-source.
kernel.json's api-surface diff is exactly the PreviewModeConfig removal
#12718 made; nothing from this branch's own repair moved.
Verified: check:export-origins, check:dual-source-exports and
check:generated (14/14 generated artifacts) all green on the merged +
rebuilt tree.
Part of #12414
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LpRNHxWZgSUgVnFT9mQQo4
@os-trump
os-trump marked this pull request as ready for review August 28, 2026 13:30
@os-trump
os-trump enabled auto-merge August 28, 2026 13:30
@os-trump
os-trump added this pull request to the merge queueAug 28, 2026
Merged via the queue into main with commit c95ad19Aug 28, 2026
38 checks passed
@os-trump
os-trump deleted the claude/issue-12414-entry-nameability branch August 28, 2026 14:15
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationprotocol:aiprotocol:uisize/stooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spec: seven public entries still leak an unnameable type through a factory call — the class A′ did not close

2 participants

@os-trump@claude