Repository navigation
test(cli): the swizzle proof renders ChatVirtualizer with rows, and a target with a required prop and no sample fails by name - #12586
Conversation
… target with a required prop and no sample fails by name
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 8eef4d9 |
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Changes requested: the new sample and the guard both work, and three small fixes remain.
- The Tests section says this pull request's swizzle legs prove the Chromium render, but the
swizzle-proofjob sets noSWIZZLE_PROOF_BROWSERand installs no Chromium (soslice.mjsruns withbrowser: false); please say that those legs prove the server render and only the next release check proves the browser render. samples.test.mjs:30-41copiesdocOf's doc lookup with its own Core filter and so skipscore__Heading(its doc ispackages/core/src/Text/Heading.doc.mjs), which the proof does check; please build the test's Core targets fromlistComponentsand load each doc throughdocOf, so the test and the proof check the same targets.- The Overlap line says no open pull request changes
packages/cli/test/swizzle-proof/, but #9832 adds samples tosamples.mjs; please name it.
With Chromium, the proof passes lab__ChatVirtualizer on this head and reproduces the release failure without the new sample, and all 35 needsNoSample entries match their docs' required props.
Claims and files checked
Review mode: same-head; reason: none
- Claim: release checks run the full swizzle proof. Verified (
release-swizzle-proofinci.yml). - Claim: its first full run failed only on ChatVirtualizer's browser render, reading
length. Verified (the release proof's slice 3 log; the other seven slices passed). - Claim: the cause is a missing sample, with no playground defaults in the doc. Verified (base
samples.mjs;ChatVirtualizer.doc.mjshas noplayground). - Claim: the server render survives, and Chromium reads
data.length. Verified (with the sample removed, the proof fails at the browser step alone). - Claim: the new sample has three rows,
getRowKeyandrenderItemin a 320 px frame. Verified (samples.mjs:283-297, matchingChatVirtualizer.tsx:134-143). - Claim: a missing sample fails by name with the quoted message. Verified (
proof.mjs:887-896,samples.test.mjs:56-74). - Claim: the Node test checks every documented target. False: it skips
core__Heading(second bullet above). - Claim: a new component with required props fails on its own pull request. Verified (the test reads files through
node:fs, so scoped Node runs include it). - Claim: the proof refuses such a target before rendering it. Verified (
proof.mjs:522-535; a proof run without sample or mark fails atsample). - Claim: 35 current targets are marked, each with the props it renders without. Verified (each note equals the doc's required props that have no default).
- Claim: the guard starts green. Verified (it flags none of the proof's 170 targets).
- Claim: the change is test-only, with no component, workflow or record change. Verified (three files under
packages/cli/test/swizzle-proof/). - Claim: red-first, then 14 of 14 tests pass. Verified.
- Claim: this pull request's swizzle legs prove the browser render. False (first bullet above); the next release check does prove it: verified.
- Claim: the slices do not finish locally on the author's machine. Not checkable (the author's environment).
- Claim: Prettier and ESLint are clean. Prettier verified; ESLint ignores these files.
- Claim: no open pull request overlaps. False: #9832 (third bullet above).
- File
packages/cli/test/swizzle-proof/proof.mjs: clear. - File
packages/cli/test/swizzle-proof/samples.mjs: clear. - File
packages/cli/test/swizzle-proof/samples.test.mjs: second bullet above.
|
/approve-spec 36a0e9e |
There was a problem hiding this comment.
Changes requested: the three earlier points are fixed, and one gap in the new guard remains.
- Miss:
requiredWithoutDefault(proof.mjs:872-877) reads only a doc's top-levelprops, so a target documented in a multi-component doc (props on eachcomponentsentry) is never checked, andcore__MultiSelector(onChange) andlab__TabBar(value,onChange) already pass with required props and no sample; please read thecomponentsentry named for the target, give those two a sample or a mark, and say in the description which doc shapes the guard covers (a component documented inside another component's doc, such asTabBarItem, is still not found bydocOf).
The new sample, the red-first test and the swizzle-legs wording are right, and the test now checks the same targets as the proof for every component with its own doc file.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Claim: release checks now run the full swizzle proof. Verified (
release-swizzle-proofinci.yml). - Claim: its first run failed only on ChatVirtualizer's browser render, reading
length. Verified (the release proof's log, read in the earlier review). - Claim: the cause is the harness, with no sample and no playground defaults for the required props. Verified (base
samples.mjs;ChatVirtualizer.doc.mjshas noplayground). - Claim: the server render survives, and Chromium reads
data.length. Verified (a Chromium proof run on identical proof and samples files). - Claim: the new sample has three rows,
getRowKeyandrenderItemin a 320 px frame. Verified (samples.mjs:283-297). - Claim: a target whose doc names a required prop with no sample or default fails by name. Partly false: true for single-component docs, not for multi-component docs (bullet above).
- Claim: the Node test needs no build and checks the proof's own targets, each doc read through
docOf. Verified for every target with its own doc file (Core fromlistComponents, asswizzle --listtakes it). - Claim: a new component with required props fails on its own pull request. False for a component documented in a multi-component doc (bullet above).
- Claim: the proof refuses such a target before rendering it. Verified (
proof.mjs:522-535). - Claim: the 35 current targets with a required prop and no sample are marked with the props they render without. False: the 35 notes match their docs, but
core__MultiSelectorandlab__TabBarare missing (bullet above). - Claim: the guard starts green and fails only for a new gap. Starts green: verified; a new gap in a multi-component doc does not fail (bullet above).
- Claim: test-only, with no component, workflow or record change. Verified.
- Claim: red-first, then 14 of 14 tests pass. Verified.
- Claim: the swizzle legs prove eject, type-check, bundle and server render without Chromium, and the next release check proves the browser render. Verified (
ci.ymlsetsSWIZZLE_PROOF_BROWSERonly inrelease-swizzle-proof). - Claim: the proof's slices do not finish locally on the author's machine. Not checkable (the author's environment).
- Claim: Prettier and ESLint are clean. Prettier verified; ESLint ignores these files.
- Claim: #9832 adds samples with other keys, none marked, and the two merge cleanly in either order. Verified (no shared keys; a three-way merge of
samples.mjshas no conflict). - File
packages/cli/test/swizzle-proof/proof.mjs: bullet above. - File
packages/cli/test/swizzle-proof/samples.mjs: clear, apart from the two targets the bullet above adds. - File
packages/cli/test/swizzle-proof/samples.test.mjs: clear.
…named for the target
|
/approve-spec c0212f6 |
There was a problem hiding this comment.
Changes requested: the guard now reads multi-component docs as asked last round, and two lines of the description are no longer true at this head.
- The Overlap line says this pull request and #9832 merge cleanly in either order, but on their merged tree
samples.test.mjsfails onlab__MediaPlayer, whose doc entry requireslabeland which #9832 gives no sample, so the line should say that the second to land needs that sample (and #9832 can add it now). - The Tests line says 14 of 14 pass, but the new multi-component test makes it 15 of 15.
Non-blocking: requiredWithoutDefault takes defaults from an entry's own playground (proof.mjs:877) while the render uses only the doc's top-level defaults, so one shared helper would keep the guard and the render in step; no target differs today.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Claim: The release check's full proof failed on one target, the chat virtualizer, reading
lengthof undefined in the browser: verified in part (the release check requires the release proof, and a Chromium run with the same sample and render steps reproduced the error without the sample; the release run itself was not read). - Claim: The cause is a missing sample with no playground defaults, leaving three required props unset: verified (
ChatVirtualizer.doc.mjsmarksdata,getRowKeyandrenderItemrequired and has no playground;ChatVirtualizer.tsx:983readsdata.length). - Claim: The new sample renders three rows with a row key and a renderer in a 320 px frame: verified (
samples.mjs:283-297). - Claim: A target with a required prop that no sample, default or mark gives fails by name, with the quoted message: verified (
proof.mjs:899, red-first run). - Claim: The Node test needs no build and checks the proof's own targets through the proof's doc reader: verified (167 targets, run without a build).
- Claim: A new component with required props fails on its own pull request: verified for a component's own doc and for a multi-component doc entry (merging #9832 fails on its player root).
- Claim: The proof refuses such a target before rendering it: verified (
proof.mjs:527-535). - Claim: A component documented only inside another component's doc is not checked: verified (
TabBarItemlives inTabBar.doc.mjs; the doc reader finds no file for it). - Claim: 37 targets are marked, each with the props it renders without: verified (37 of 37 notes match the guard).
- Claim: The guard starts green: verified (0 of 167 targets flagged).
- Claim: Test-only, with no component, workflow or record change: verified.
- Claim: Red-first, the test names the three missing props without the sample: verified.
- Claim: With the sample, 14 of 14 tests pass: false (15 of 15 at this head).
- Claim: This pull request's swizzle legs prove eject, type-check, bundle and server render without a browser: verified (the legs run without the browser flag, and a change to the proof's folder runs every target); they have not run at this head, which is a draft.
- Claim: The proof's slices exceed their local time limit on the author's machine: not checkable here.
- Claim: Prettier and ESLint are clean: verified (Prettier clean; ESLint ignores these files).
- Claim: #9832 uses different keys and none is marked, so the two merge cleanly in either order: false (the text merges cleanly, but the merged tree fails the new test on the player root's required
label). - Claim: Ownership and land path: process context, not checked against code.
- File
packages/cli/test/swizzle-proof/proof.mjs: non-blocking note (defaults source, line 877) - File
packages/cli/test/swizzle-proof/samples.mjs: clear - File
packages/cli/test/swizzle-proof/samples.test.mjs: clear
| */ | ||
| export function requiredWithoutDefault(doc, name) { | ||
| const entry = doc?.components?.find(c => c?.name === name) ?? doc; | ||
| const defaults = (entry?.playground ?? doc?.playground)?.defaults ?? {}; |
There was a problem hiding this comment.
Non-blocking: this takes defaults from the entry's own playground, but the render entry gets playgroundDefaults (line 861), which reads only doc.playground. A multi-component entry that sets its own default for a required prop would pass here and still render without it. No target differs today: core__MobileNav and core__Stack have entry playgrounds but no required props. Reading the defaults through one helper that both use keeps the guard and the render in step.
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet because the pull request is a draft, and it runs once the pull request is marked ready for review.
The overlap and test-count lines flagged last round now match the code: on the merge with #9832 the new test fails only on the media player root's label, as the description says, and 15 of 15 tests pass.
Non-blocking: requiredWithoutDefault takes defaults from an entry's own playground (proof.mjs:877) while the render uses only the doc's top-level defaults (proof.mjs:861-864), so one shared helper would keep the guard and the render in step; no target differs today.
Claims and files checked
Review mode: same-head; reason: none
- changed rules (0): none
- Claim: The release check now runs the full proof, and its first run failed on the chat virtualizer in the browser, reading
lengthof undefined: verified in part (the release gate requires the release proof, and the virtualizer readsdata.lengthatChatVirtualizer.tsx:983; the release run itself was not read). - Claim: The cause is a missing sample with no playground defaults, leaving three required props unset: verified (
ChatVirtualizer.doc.mjsmarksdata,getRowKeyandrenderItemrequired and has no playground). - Claim: The new sample renders three rows with a row key and a renderer in a 320 px frame: verified (
samples.mjs:283-297). - Claim: A target with a required prop that no sample or default gives fails by name, with the quoted message: verified (
proof.mjs:899, red-first run). - Claim: The Node test needs no build and checks the proof's own targets through the proof's doc reader: verified (
samples.test.mjs:18-19; 167 targets, run without a build). - Claim: A new component with required props fails on its own pull request: verified (merging #9832 fails on its player root).
- Claim: The proof refuses such a target before rendering it: verified (
proof.mjs:527-535). - Claim: A component's own doc and a multi-component doc entry are covered, and a component documented only inside another component's doc is not: verified (
TabBarItemhas no doc file of its own). - Claim: 37 targets are marked with the props they render without, so the guard starts green: verified (37 of 37 marks match the guard; 0 of 167 targets flagged).
- Claim: Test-only, with no component, workflow or record change: verified.
- Claim: Red-first, the test names the three missing props without the sample: verified.
- Claim: With the sample, 15 of 15 tests pass: verified.
- Claim: The pull request's swizzle legs prove eject, type-check, bundle and server render without a browser, so the next release check proves the browser render: verified from the workflow (the pull-request legs set no browser flag; the release legs install Chromium and set it); they have not run at this head.
- Claim: The proof's slices exceed their local time limit on the author's machine: not checkable here.
- Claim: Prettier and ESLint are clean: verified (Prettier clean; ESLint ignores these files).
- Claim: #9832 has no sample for its player root, whose doc requires
label, so whichever of the two lands second needs that sample or a mark: verified (the merged tree fails only on that target'slabel). - Claim: Ownership and land path: process context, not checked against code.
- File
packages/cli/test/swizzle-proof/proof.mjs: non-blocking note (defaults source, line 877) - File
packages/cli/test/swizzle-proof/samples.mjs: clear - File
packages/cli/test/swizzle-proof/samples.test.mjs: clear
|
/approve-spec 9ac7cc7 |
There was a problem hiding this comment.
Approved pending CI: this push deferred the heavy suites (build, test and docsite-test), and they run before merge.
The update only merges main; the pull request's own changes are the ones approved last round, and on this head the new samples test still passes 15 of 15 with no target flagged.
Non-blocking, as before: requiredWithoutDefault takes defaults from an entry's own playground (proof.mjs:877) while the render uses only the doc's top-level defaults (proof.mjs:861-864), so one shared helper would keep the guard and the render in step; no target differs today.
Claims and files checked
Review mode: carry-forward; reason: none
- Claim: Every release check now runs the full proof, and its first run failed on the chat virtualizer in the browser, reading
lengthof undefined: verified in part (the release legs install Chromium and render every copy,.github/workflows/ci.yml:2030-2036, and the virtualizer readsdata.lengthatChatVirtualizer.tsx:983; the release run itself was not read). - Claim: The cause is a missing sample with no playground defaults, leaving three required props unset: verified (without the sample the guard names
data,getRowKeyandrenderItem). - Claim: The new sample renders three rows with a row key and a renderer in a 320 px frame: verified (
samples.mjs:283-297). - Claim: A target with a required prop that no sample or default gives fails by name, with the quoted message: verified (
proof.mjs:899, red-first run on this head). - Claim: The Node test needs no build and checks the proof's own targets through the proof's doc reader: verified (
samples.test.mjs:18-44; 167 targets, run without a build). - Claim: A new component with required props fails on its own pull request: verified (the merge with #9832 fails on its player root).
- Claim: The proof refuses such a target before rendering it: verified (
proof.mjs:527-535). - Claim: A component's own doc and a multi-component doc entry are covered, and a component documented only inside another component's doc is not: verified (
proof.mjs:840-858,:876). - Claim: 37 targets are marked with the props they render without, so the guard starts green: verified (every mark matches the guard; 0 of 167 targets flagged).
- Claim: Test-only, with no component, workflow or record change: verified (three files under
packages/cli/test/, which the package does not publish). - Claim: Red-first, the test names the three missing props without the sample, and with it 15 of 15 pass: verified on this head.
- Claim: The pull request's swizzle legs prove eject, type-check, bundle and server render without a browser, so the next release check proves the browser render: verified from the workflow (the pull-request legs set no browser flag,
ci.yml:1968-1977; the release legs set it); they are deferred on this head. - Claim: The proof's slices exceed their local time limit on the author's machine: not checkable here.
- Claim: Prettier and ESLint are clean: verified (Prettier clean; ESLint ignores these files).
- Claim: #9832 has no sample for its player root, whose doc requires
label, so whichever of the two lands second needs that sample or a mark: verified (carried: that pull request and this patch are unchanged, and the mergedmainchanges no Lab doc). - Claim: Ownership and land path: process context, not checked against code.
- File
packages/cli/test/swizzle-proof/proof.mjs: non-blocking note (defaults source, line 877) - File
packages/cli/test/swizzle-proof/samples.mjs: clear - File
packages/cli/test/swizzle-proof/samples.test.mjs: clear
What
Every release-check now runs the full swizzle proof (
release-swizzle-proof), and its first run failed on one target:lab__ChatVirtualizer [browser] Cannot read properties of undefined (reading 'length'). The cause is in the proof's harness, not the component:samples.mjshad no sample for it, and its doc gives no playground defaults, so the copy rendered with none of its required props (data,getRowKey,renderItem). The server render survives that; in Chromium the virtualizer readsdata.length.samples.mjs: alab__ChatVirtualizersample: three rows withgetRowKeyandrenderItem, in a 320 px frame, so the browser step windows real rows.samples.test.mjs, a Node test that needs no build, checks the proof's own targets (Core's components as swizzle offers them, plus each integration package's documented components), each doc read through the proof'sdocOf. So a new component with required props fails on its own pull request.proof.mjs,missingSample).componentsentry named for the target. A component documented only inside another component's doc file (such asTabBarItem) is not found by the proof'sdocOf, so neither the proof nor this guard checks it.needsNoSample: the 37 current targets that have a required prop with no sample and render without it are listed with the props they render without, so the guard starts green and fails only for a new gap. Samples for them can follow; each entry names what is missing.Test-only. No component, workflow or record change.
Tests
lab__ChatVirtualizersample,samples.test.mjsfails naming it ("… required prop(s) data, getRowKey, renderItem …"); with it, 15 of 15 pass (samples.test.mjsandscope.test.mjs).ci:run-swizzle) prove the new sample's eject, type-check, bundle and server render. They run without Chromium, so the next release-check is the one that proves the browser render. The proof's slices do not finish locally within their 10-minute limit on the loaded M5.Overlap checked: #9832 (adds samples for its new Lab media-player components to
samples.mjs; itsMediaPlayerdoc requireslabeland it has nolab__MediaPlayersample, so whichever of the two lands second needs that sample, or aneedsNoSamplemark, forsamples.test.mjsto pass; #9832 can add it now)Owning session: noopbot (a61f66c2), under CI & Release (ca77f950). Land path: the shipper, through merge-guard, on green, CodeBunny approval and Specs' exact-head
/approve-spec.