This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
fix(scripts): judge spec citations at member granularity, and stop the header teaching a retired filter (objectui#7513) - #7617
Merged
Conversation
…e header teaching a retired filter (objectui#7513) Tightens precision rule 4 of `check:spec-symbols` from symbol to member granularity, per the maintainer ruling of 2026-09-04 (batch #29, A′ + b). A comment citing `SpecSymbol.key` where the spec's own shape has no `key` is now a dangling reference. Three measured specimens took that shape and all three were inviting a 422: `SelectOptionSchema.description` (twice, into a `.strict()` option schema, which sinks the whole field), `FieldSchema.rows`, and `DashboardSchema.title`. Every one of them named a symbol the spec really exports, so rule 4 passed them. This is rule 4 tightened, not a second instrument: no allowlist and no ledger of its own — the measured population is 0 on this commit, so a hit is always fresh and fails on the PR that writes it. Zod's own API is excluded by two documented predicates (call form, plus a five-name introspection vocabulary), never by allowlist entries. Also corrects the two header paragraphs that still described the `export`-modifier filter in the present tense, beside a `hasExportModifier` helper that had lost its last call site. A card was filed on the strength of that prose; the helper is removed so nothing is left to grep into the same false conclusion. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KbJQ1y1J12nZxYzFWhP8Q3
This was referenced Sep 4, 2026
Merged
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 #7513
Implements the maintainer ruling of 2026-09-04 (decision batch #29, A′ + b, verbatim 「同意」),
recorded in comment 5536189897.
1. Precision rule 4, tightened from symbol to member granularity
A comment citing
SpecSymbol.keywhere the spec's own shape has nokeyis now a danglingreference. Three measured specimens took exactly that shape, and every one of them named a symbol
the spec really exports — which is why rule 4 passed them:
SelectOptionSchema.description(×2).strict()and spells five keys, none of themdescription— so it 422s the WHOLE fieldFieldSchema.rowsrowsis not a field key at allDashboardSchema.titlelabelThis is rule 4 tightened, not a second instrument — the ruling is explicit on that point. Same
question (is there anything behind what this comment points at), same answer shape, and
no allowlist and no ledger of its own: the measured population is 0 on this branch's base, so a
hit is always fresh and fails on the PR that writes it. There is nothing here to accrue.
Where it looks, and why that is not B
It walks every comment in the scanned files, not the block attached to a top-level declaration.
Two of the three specimens sat on interface MEMBERS and one sat inside a function body, so a
declaration-scoped scan sees none of them. It needs no claim phrase either — one of them read
"Per @objectstack/spec, DashboardSchema.title is …", which no phrase table matches and which is
wrong all the same.
That is not issue #7513's deferred B, because it asks a different question. Rule 2 asks whether
a DECLARATION has a compile-time tie behind its claim, which needs a declaration and a tie test.
This asks only whether a NAME the prose spells exists in the spec, which needs neither. B stays
deferred and its counts are posted on the card.
Four precision rules, each measured against the tree
CLAIM_WINDOW), reused rather thanreinvented. Without it,
ListView.resolveTimelineDateBinding(a method on this repo's owncomponent, 755 characters from an unrelated spec mention) reads as a spec citation. 136 raw
citations tree-wide collapse to 73 real ones.
@objectstack/specui/TimelineConfig.jsonis afile the comment points at;
jsonis an extension, not a member. Four sites read this way.taken on the AUTHORING side (a schema's
.shape, hopping through a ZodPipe's.in) rather thanthe parsed output. ⭐ Load-bearing, not tidiness:
FormField.visibleOnis a real authorable keythat the spec's OUTPUT type deliberately drops (its declaration is an
Omitof the inferred typeover the string
'visibleOn'), so reading the output type alone reports a correct comment asdangling. That was a live false positive in an earlier draft of this change.
2. The Zod exclusion is a predicate, and it has a specific shape for a specific reason
The ruling required a documented predicate rather than allowlist entries, and ratchet 3 would refuse
an entry that excuses nothing in any case. Two predicates:
NavigationModeSchema.default('page'). A citation written with its parenthesesis an invocation. This carries the names Zod SHARES with the authoring vocabulary, which is why
they need no list:
default,options,type,required,readonlyandoptionalare allreal spec keys AND real Zod methods.
FieldSchema.rows(a positiveinteger)" is a citation with a parenthetical after it, and one of the three specimens is written
exactly that way. There is a pin for that distinction.
(
parse,safeParse,parseAsync,safeParseAsync,shape).⛔ Deliberately NOT "any property of the Zod type". Zod puts
.description,.default,.optional,.readonly,.typeand.shapeon every schema, so a structural read waves throughSelectOptionSchema.description— the citation this entire rule was built for. I measured thatdirectly: it read green under the structural predicate. The ordering in the scanner is the second
half of the safety — the family's AUTHORED set answers first, so a symbol that really declares
shapeas a key is green on the strength of its shape, never on the vocabulary. Both halves havetheir own pin.
3. The two stale docblock paragraphs, plus one bounded in-place fix
The header's
hasExportModifierprose contradicted the// No export filter (objectui#6291)comments at both scanners. Corrected to unambiguous past tense, with the reason recorded: a card was
filed on the strength of that prose, and its author did not invent the mechanism — they read it in
this file's own header.
⭐ Declared bounded in-place fix:
hasExportModifieritself is deleted. It had zero callsites anywhere in the repo (measured:
git grepfinds only the declaration and the two prosementions being corrected). Correcting the prose while leaving a live-looking helper for the next
reader to grep would leave the trap half-set — the identifier IS the artifact the prose pointed at.
Same defect class as the card, mechanically pinned by the measurement, same gate family, no new
verification surface, and no other claim holds this file (all 6 open PRs enumerated to completion:
0 touch
scripts/).What does NOT land here
B (widening rule 2 to member-attached doc comments) and b (bare
aligns/alignedinCLAIM_PATTERNS) are deferred by the ruling. Both owed measurements were run in a throwaway and areposted as their own comment on #7513. Headline: B would produce 45 new rule-2 failures, 37 of
them in
packages/types; b's added false-positive surface is 0, and so is its yield — it is ano-op on this tree today, because PR #7510 repaired the only site that had the shape.
Verification
Union re-run at
3ce032c0(the final commit):check:spec-symbols✅ spec member citations: no comment cites a key its spec symbol does not declare.pnpm exec vitest run scripts/__tests__/(repo root)pnpm run type-check:scriptscheck:control-bytesscanned 6228 tracked text file(s)check:entry-guard56 export bindings, 56 of them inert on import(this PR adds two exports)check-changeset-presenceno changeset is owed— 0 files are published source of a released packagetsc --listFilesconfirms both edited files are in thetsconfig.scripts.jsonprogram, so"typecheck clean" genuinely covers them rather than silently excluding the test file.
⭐ The red/green pair, and the ablation that makes it mean something
A ratchet asserted only green on today's tree proves nothing about the tightening — the tree is
green either way, including with the rule deleted, which I verified rather than assumed. So the
bite leg is pinned on the VERBATIM pre-repair comments, copied out of the removed lines of PR #7510
and PR #7520:
main: the gate exits 0, 0 dangling, 0 allowlist entries.before/after counts of the exact text plus a changed blob hash — removed-text count 0, injected
marker 1. Under the ablation all three RED fixtures return the empty list, so those three
assertions genuinely fail without the rule. Restore proven by an empty
git diff HEADand aworktree blob hash identical to the HEAD blob.
Measured population, on
1bae75bbagainst@objectstack/spec@17.2.0Lint
Not narrowed — I ran
eslint .over the whole repo, 4244 files (count read from eslint's own--format jsonoutput, not estimated).check-spec-symbol-derivation.mjsis in the lintedpopulation, not skipped.
93 pre-existing errors in 79 files this diff does not touch (mostly
react-hooks/static-components, plusno-console,preserve-caught-error,no-restricted-imports). That is a property of a raweslint .invocation — it is not thisrepo's
lintscript, which isturbo run lint, a per-package fan-out with per-package scoping,and which CI runs in full regardless. ⛔ I am not claiming those 93 are new, and I am not claiming
the repo's own
lintis red.(no
projectService, noprojectparser option anywhere ineslint.config.js), so a change inthese two files cannot move the verdict on a file it does not touch.
Notes for the reviewer
scripts/; no published surface,no
skills/**, no released package source.skip-changesetis not applied — this repo declares with an empty-frontmatter changeset whenone is owed, and
check-changeset-presencesays none is owed here.check:spec-symbolsstill reports 19 unbacked rule-2 claims and 14untriaged rule-1 collisions. Those are the existing ledgers; this change neither grows nor shrinks
them.
Generated by Claude Code