Uh oh!
There was an error while loading. Please reload this page.
test(scripts): re-derive the ValidationRule absence claim, not just the sentence - #6195
Merged
Merged
Conversation
… the sentence `check-doc-component-types.test.ts` pinned that `plugin-form.mdx` CONTAINS the sentence "There is no `ValidationRule` type in this repository". Presence is not truth: land a bare declaration of that name and the page turns false while the pin stays green, which reads as coverage of a claim nothing checks. Adds the other half. `bareValidationRuleSites()` reports every site that puts the BARE name into this repository's types — a declaration of the exact name, or a re-export that publishes it — over every TypeScript file `git ls-files` tracks (3,603 on this tree; build output is untracked and so out by construction). Comments and string/template/regex literal content are blanked with `scripts/js-comment-mask.mjs` first, which is what lets the scan read its own fixtures without reding on them. The near-spellings are the whole difficulty: a substring match on `ValidationRule` hits 106 lines of real, different types (`AdvancedValidationRule`, `ValidationRuleType`, `ObjectValidationRule`, `DesignerValidationRule`, `FieldValidationRules`, and four more), so a naive assertion reds on a true claim and gets deleted. All of them are fixtured as negative controls next to the positives. The existing presence pin is untouched — it stops the fiction being authored back into a snippet, which is a different job. `plugin-form.mdx` loses the "under any spelling" rider, which overclaimed: the near-spellings do exist, and the new assertion checks the bare name only. The page now names them and says none of them types the key. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019b5UBNMtTzKbVtZZGvFuxe
yinlianghui-tw
marked this pull request as ready for review
August 25, 2026 00:09
yinlianghui-tw
enabled auto-merge
August 25, 2026 00:10
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 25, 2026
os-warren pushed a commit
that referenced
this pull request
Aug 25, 2026
…e block-family one Applies the 2026-08-25 "bounded or derivable" ruling to the two closure claims left open on objectui#6186 after claim 1 landed as PR #6195. Claim 2 (`thresholds`) was written twice — in the plugin-dashboard page and in the sdui-parser census header — and two copies of one closure claim drift apart independently. The census header is now the canonical statement and the page points at it. Single-sourcing makes the surviving copy load-bearing, so it is also DERIVED: a new gate re-scans every JS/TS file git tracks for an access to a key of that name, with positive and negative controls, and a population that refuses to collapse on an empty walk. Claim 3 (block-schema) was a whole-tree negative that measurement showed to be false as written: `PageSchema.slots` and `PageNodeSchema.template` both have live runtime readers under a different vocabulary. Bounded to the block family's own keys, which is what the page's actual point survives. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012CZgmFFzqA9cX8tBMhvpFe
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.
Part of #6186 — claim 1 only. The card stays open: claims 2 and 3 are the escalated
needs-user-decisionpolicy question and are untouched here.What was one-sided
scripts/__tests__/check-doc-component-types.test.tspinned thatcontent/docs/plugins/plugin-form.mdxcontains the sentence:Presence is not truth. Land a bare declaration of that name tomorrow and the page turns false while the pin stays green — worse than no pin, because a green test reads as coverage of the claim it quotes.
The existing pin is untouched. Its own comment says why it exists — to stop the fiction being authored back into a snippet a reader copies — and that is a different, legitimate job. This adds the other half so that presence and truth are two assertions, neither pretending to do the other's work.
The trap, and why the assertion is written the long way
A substring match on
ValidationRulematches 106 lines on today's tree, every one of them a real and different type:AdvancedValidationRulepackages/types/src/data-protocol.ts:708ValidationRuleTypepackages/types/src/data-protocol.ts:748ObjectValidationRulepackages/types/src/data-protocol.ts:1129DesignerValidationRulepackages/types/src/designer.ts:762FieldValidationRulespackages/types/src/form.ts:744Plus four the card had not listed:
ValidationRuleSchema,ValidationRuleDraft,BaseValidationRuleShape,buildValidationRules.A naive assertion reds on a true claim, and the next person to hit that deletes it — putting the claim back where it started. So
bareValidationRuleSites()matches a declaration of the exact name (interface/class/enum/type) or a re-export that publishes it, and every spelling above is fixtured as a negative control beside the positives, rather than remembered in a comment.Comments and string/template/regex literal content are blanked with the repo's own
scripts/js-comment-mask.mjsbefore matching. That is load-bearing twice over: it keeps prose from fabricating a finding, and it is what lets the scan read its own fixture table without reding on it.Scanned population, stated
git ls-filesfiltered to the.tsfamily (.ts,.tsx,.mts,.cts,.d.tsincluded) — 3,603 files on this tree. Derived, not listed:node_modules,distand every other build output are untracked and so are out by construction, and a TypeScript type cannot be declared outside that family.scripts/check-control-bytes.mjsreads this repository the same way. The scan refuses to collapse quietly: a population under 1,000 files fails rather than passing vacuously.Fidelity of the mask was measured rather than assumed: over those 3,603 files, blanking literal content loses 16 of 2,324 top-level exported declarations, in exactly two files —
packages/sdui-parser/src/codegen.ts, which emits a declaration from a template, andcheck-spec-symbol-derivation.test.ts, whose fixtures are template literals. Both are the direction to lose them in.The prose overclaimed, so it was narrowed
The sentence carried a rider — "under any spelling" — which the assertion cannot check and which is measurably false: five near-spellings do exist. Leaving it would reproduce this card's own defect, a gate asserting less than the prose while looking like it covers it. The page now names the near-spellings and says none of them types the key; the pinned clause itself is unchanged, so the presence pin needed no edit.
(The card cited the sentence at
plugin-form.mdx:99; PR #6185 moved it to line 102. Branched fromb04646b63and re-read.)Verification
Reverse verification, each direction predicted before running, mutation proven on disk by anchored counts (not an editor exit code), restored with
git checkout HEAD -- pathand proven with an emptygit diff HEAD. No build leg: the subject is read off disk withfs.readFileSync, never resolved through a packageexportsintodist/.export interface ValidationRuletopackages/types/src/form.ts(anchored count 0 to 1). Predicted red, naming it. Observed:1 failed | 35 passed, messagepackages/types/src/form.ts:1403: declares interface ValidationRule.SuperValidationRule,ValidationRuleName,ValidationRuleRunner, and an aliasing re-export). Predicted green. Observed:36 passed, exit 0.1 failed | 35 passed, the failure beingno longer authors ValidationRule, and says outright that it does not exist.Gate union re-run at
4188af3f9on a clean tree, gate list derived frompackage.jsonand.github/workflows/rather than from the dispatch:vitest run scripts/__tests__/Test Files 71 passed (71) / Tests 1935 passed (1935)pnpm check:doc-typesEvery documented component type is registered.pnpm check:doc-fencesevery TypeScript block in 223 document(s) is fenced ts/tsx/typescript…pnpm check:control-bytesOK (scanned 5110 tracked text file(s); skipped 85 binary).pnpm docs:check-linksLinks are valid across 15 scan roots.node scripts/check-changeset-presence.mjsNo source of a released package changed in this range, so no changeset is owed.pnpm type-check:scriptstsc -p tsconfig.scripts.jsonpnpm lint:root28 problems (0 errors, 28 warnings)— all pre-existing, none in the changed filesEvery exit code captured by redirect before any pipe.
No changeset, per the presence gate's own verdict quoted above — objectui has no
skip-changesetlabel mechanism, so that verdict is the declaration form.Declared narrowing:
pnpm check:doc-snippetsexits 1 in this worktree withThe snippet program was NOT run: the packages it resolves against are not built— an unbuilt-dist/precondition listing 20 packages, independent of this diff, which changes no fenced snippet (prose only). CI builds and runs it.Generated by Claude Code