Uh oh!
There was an error while loading. Please reload this page.
feat(spec): make BaseValidationRuleShape and FilterCondition nameable from the root entry - #12327
Merged
Merged
Conversation
… from the root entry The minimal one-file consumer program (un-annotated export default defineStack(...) with no /data subpath import) still failed declaration emit with exactly two TS2883 diagnostics naming these two types through hash-named internal dist chunks. Same invariant and fix shape as the prior root-entry nameability fix: re-export both types from their declaring /data modules. Regenerates api-surface/root.json and export-origins/root.json (+2 each); extends the pin harness's program-scoping note to record the ruling. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NDGG54XF5gbTLdQzCtnaVV
…ot-entry-nameability-delta
Contributor
📓 Docs Drift Check
What this run could not see
Coarse fallback — 126 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
os-litant
marked this pull request as ready for review
August 25, 2026 18:40
Uh oh!
There was an error while loading. Please reload this page.
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#11709
What
The root entry of
@objectstack/spechad two more structurally-mentioned but unnameable types beyond the three #11350 repaired: a minimal one-file consumer program —export default defineStack({ objects: [] })with no@objectstack/spec/dataimport anywhere in its program — still failed declaration emit with exactly two TS2883 diagnostics (BaseValidationRuleShapevia theobject.zod-*dist chunk,FilterConditionviafilter.zod-*).Per the maintainer decision on #11709 (2026-08-25, option A′ — same invariant as #11350: a type that appears structurally in an entry's public declarations must be nameable from that same entry), the root entry now re-exports both types from their declaring
/datamodules:packages/spec/src/index.ts—export type { BaseValidationRuleShape } from './data/validation.zod'andexport type { FilterCondition } from './data/filter.zod'(+ a comment recording the ruling; note the declaring module ofBaseValidationRuleShapeisdata/validation.zod.ts, notdata/object.zod.ts—object.zod-*is the name of the dist chunk that carries its declaration)packages/spec/api-surface/root.json— +2 rows viagen:api-surface(not hand-edited)packages/spec/export-origins/root.json— +2 rows viagen:export-origins(not hand-edited)packages/spec/scripts/root-entry-type-nameability.pin.test.ts— docblock program-scoping note extended to record the@objectstack/specroot entry: two MORE structurally-mentioned types are unnameable through the CHUNKED build (BaseValidationRuleShape,FilterCondition) — a minimaldefineStackconsumer still hits TS2883 #11709 ruling and measurement; no mechanics changed.changeset/root-entry-nameability-data-delta.md— additive,@objectstack/specminor (same tier as the@objectstack/spec's root entry does not re-export three types its own public API's inferred types mention — every consumer inferring throughdefineStackhits TS2883 #11350 precedent)Scope fence, as ruled: only these two names. The follow-up gate holding the invariant closed for every entry is #11986 — #11986 is not addressed here and remains open. The post-fix minimal-program probe came back with zero diagnostics, so no sixth/seventh unnameable name was observed.
Measurements (pin harness,
packages/spec/scripts/root-entry-type-nameability.pin.test.ts)8cdd696): ablating thecontext.tsfixture (mutation and restore both anchor-verified on disk) turned the pin red — vitest exit 1 with exactly the two TS2883 above, matching the card's repro criterion.dist/index.d.tsbefore the run): the same minimal one-file program is clean (vitest exit 0, zero TS diagnostics), and the unmutated harness passes 2/2 (consumer green + canary still red on the declaration-emit axis).Verification (union re-run after the final commit, at
764d7bf4— the run itself echoedUNION_HEAD=764d7bf4)pnpm --filter @objectstack/spec build→ exit 0;check:generated→ "✓ All 14 generated artifacts are up to date."pnpm --filter @objectstack/spec test→ "Test Files 428 passed (428) / Tests 11401 passed (11401)";typecheck→ exit 0 (includescheck:scripts-typecheck+check:test-typecheck, which cover the pin harness file)node scripts/pm/dispatch-gates.mjs, no paths passed); the dispatch-named families plus the derived additions (changeset-gate-self-tests,objectui-changeset,page-declaration-shape,governed-queue-guard, and the test-file convention family:query-options-erasure,type-check-coverage,type-check-debt,engine-double-contract,where-matcher) all ran locally and green, with three declared exceptions that are environment shapes, not findings (details + evidence in the os-dev report on@objectstack/specroot entry: two MORE structurally-mentioned types are unnameable through the CHUNKED build (BaseValidationRuleShape,FilterCondition) — a minimaldefineStackconsumer still hits TS2883 #11709):dev-prereqs(fresh worktree, 65 sibling dists unbuilt — spec's own dist is built and content-hash fresh; CI builds first),governed-queue-guard(readsGITHUB_EVENT_PATHonly; unrunnable outside CI by construction),type-check-debt --re-measure(refuses loudly on an unbuilt workspace closure = NOT MEASURED; narrowing evidence: the only test-file change in this diff is docblock-comment-only — 0 non-*-prefixed changed lines — and spec's owntypecheckcovering that file is green).check:nul-bytes(merged tree) → "check-nul-bytes: OK (scanned 6824 text file(s) -- 6824 tracked, 0 untracked-not-ignored; skipped 7 binary; no raw ASCII control bytes)."Root-entry consumer packages (client/runtime etc.) are covered by the CI Type Check family per the dispatch's verification plan.
Generated by Claude Code