Repository navigation
Run the unit suites in CI, which nothing in this repository ran - #26
Merged
Merged
Conversation
`package.json` has declared `"test": "vitest run"` for as long as the suites have existed, and no workflow ever called it. The publishing path waited on `npm run test:a11y` and nothing else, so five test files and 44 cases sat in the repository where anyone would look for them and never executed. Four of the five assert that the script engine REJECTS what it should reject -- the opcode disable list, malformed pushes, inspection of invalid scripts -- so a change that broke a reject path could reach the live site with every gate green. They pass as they stand: 5 files, 44 cases, 1.45s. Nothing about them needed fixing; they needed calling. The step goes before `npm run build` so a unit failure ends the run in seconds rather than after a Chromium download. `vitest run` exits 1 when it matches no files -- verified here by pointing it at a directory that does not exist -- so this step cannot pass by silently running nothing, which is the failure mode that made crypto-lab-padding-oracle#15 necessary. It also makes two sentences in this file true that were not. The auto-merge comments say a bump merges only if "this lab's own tests, build and axe/e2e run went green" and that the gate is "unit tests, build, axe WCAG and the e2e claims". The e2e half was accurate -- `playwright.config.ts` has `testDir: './e2e'`, so `claims.spec.ts` runs alongside `a11y.spec.ts`. The unit half was not, until this step. Both `deploy` and `dependabot-auto-merge` already name `build` in `needs:`, so the unit tests now gate the deploy and the Dependabot merge with no further wiring. Found by `tools/test-invocation.js`, reported as crypto-lab#39 and crypto-lab-bitcoin-script#24. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adding the unit step revealed more than an uncalled suite: on the pinned node 20 the suites cannot run at all. Three of the five test files failed to start their worker with "webidl.util.markAsUncloneable is not a function" -- jsdom requires undici, whose CacheStorage calls it, and node 20.20.2 does not have it. Two files and 23 cases passed; the other three never executed, and vitest exited 1 with "3 errors". `npm ci` said so in advance on the same run: @asamuzakjp/css-color@7.0.1 and @asamuzakjp/dom-selector@9.2.1 both declare `node: ^22.22.2 || ^24.15.0 || >=26.0.0`, and the warnings scrolled past unread because nothing downstream of them ran. 24 rather than 22 because setup-node resolves 24 to a release at or above the 24.15.0 these packages require, and 36 labs in the fleet are already there, including crypto-lab-padding-oracle after the same class of fix. This is the cost of a suite with no caller stated precisely: it was not merely unrun, it had rotted to unrunnable, and the one signal that would have said so was a warning on a step whose output nobody had reason to read. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Oct 1, 2026
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 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.
Closes #24. Reported fleet-wide as crypto-lab#39.
package.jsonhas declared"test": "vitest run"for as long as the suites have existed, and no workflow ever called it. The publishing path waited onnpm run test:a11yand nothing else, so 5 test files and 44 cases sat in the repository where anyone would look for them and never executed.Four of the five assert that the script engine rejects what it should reject — the opcode disable list, malformed pushes, inspection of invalid scripts. Before this step, a change that broke a reject path reached the live site with every gate green. That is worse than having no tests, because the tests are visible and read as coverage.
Adding the step found a second defect
On the pinned node 20 these suites cannot run at all. The first CI run on this branch failed: three of the five test files died starting their worker with
webidl.util.markAsUncloneable is not a function. jsdom requires undici, whoseCacheStoragecalls it, and node 20.20.2 does not have it. Two files and 23 cases passed; the other three never executed.npm cihad said so on that same run, two steps earlier:Those warnings scrolled past unread because nothing downstream of them ran. So the suites were not merely uncalled — they had rotted to unrunnable, and the uncalled-ness is what hid it.
The gate now pins node 24:
setup-noderesolves 24 to a release at or above the 24.15.0 those packages require, and 36 labs in the fleet are already there, including crypto-lab-padding-oracle after the same class of fix.The step
Before the build, so a unit failure ends the run in seconds rather than after a Chromium download.
It cannot pass by running nothing.
vitest runexits 1 when it matches no files — verified by pointing it at a directory that does not exist. That is the failure mode behind padding-oracle#15, wherenode --teston node 20 found no TypeScript test files and exited 0 with the gate green.Measured on this branch
It also makes two sentences in this file true
The auto-merge comments say a bump merges only if "this lab's own tests, build and axe/e2e run went green", and that the gate is "unit tests, build, axe WCAG and the e2e claims". The e2e half was already accurate:
playwright.config.tssetstestDir: './e2e', soclaims.spec.tsruns alongsidea11y.spec.ts. The unit half was not, until this step.Both
deployanddependabot-auto-mergealready namebuildinneeds:, so the unit tests gate the deploy and the Dependabot merge with no further wiring.🤖 Generated with Claude Code