Repository navigation
test: fix phosphor differential parity timeout by narrowing fixture imports - #713
Merged
Merged
Conversation
The Camera differential imported the @octanejs/phosphor-icons root barrel, pulling 1,513 generated icon modules through Vite's transform pipeline inside the test body — 3.5s isolated, intermittently past the 20s budget during full runs on a loaded machine. Import the public per-icon subpath instead (rewritten to @phosphor-icons/react/Camera on the React side, with a setup guard against regressing to the barrel); the case drops to ~37ms and the untouched 20s timeout becomes pure hang-guard headroom. Audit evidence hashes refreshed. Co-Authored-By: Claude Fable 5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
trueadm
marked this pull request as ready for review
August 11, 2026 23:06
23 of 27 tasks
This branch was previously deployed
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.
Summary
Camera renders byte-identical accessible duotone SVGinpackages/phosphor-icons/tests/differential/parity.test.tsduring fullpnpm testruns on a loaded machine.Why
@octanejs/phosphor-iconsroot barrel, which re-exports 1,513 generated icon modules. The rig dynamic-imports the fixture inside the test body, so every one of those modules went through Vite's transform-and-execute pipeline on the test's clock (~2.3s of transform alone, plus the React oracle loading@phosphor-icons/react's ~3,000-file dist). Under full-suite CPU saturation that 3.5s stretched past 20s.exports.test.ts; the mount fixture doesn't need to pay for every unrelated icon.Changes
tests/_fixtures/parity.tsrx: import the public per-icon subpath@octanejs/phosphor-icons/icons/camera(~5 modules) instead of the root barrel.tests/differential/_setup.ts: rewrite that subpath to@phosphor-icons/react/Camerafor the compiled React fixture, and throw if a fixture regresses to an import shape the rewrite doesn't cover.audit/react-parity.json: refresh the sha256 evidence pins for the two edited files.Validation
pnpm format:checkpnpm typecheckpnpm test— 1,677 files / 18,501 tests, all pass; run at full machine saturation (the failure regime), differential stayed far under budgetphosphor-icons-differential(case 3,495ms → 37ms),phosphor-icons+phosphor-icons-ssr(19 tests),pnpm react-parity:check("audit is current"),pnpm typecheck:files+pnpm format:files:checkon the changed files,pnpm synccleanRisk / follow-ups
feat/consolidated-react-parity-prs:parity.tsrxand_setup.tshere are byte-identical to that branch's versions (audit hashes confirm), so whichever lands second merges clean.preloadDifferentialFixturerig change and vitest.config.js restructure — is intentionally not taken here:_rig.tsandvitest.config.jssha256s are pinned as evidence by ~28 audit manifests, and touching them in this PR would invalidate all of them. With the fixture narrowed, the in-test work is small enough that the preload isn't needed for correctness.Provenance
agent-authored)Note
Low Risk
Test-only change to fixture imports and differential setup rewriting; no production or security-sensitive code is modified.
Overview
Fixes intermittent timeouts in the phosphor differential Camera SVG parity test by stopping the fixture from importing the full package barrel.
parity.tsrxnow imports the public per-icon subpath@octanejs/phosphor-icons/icons/camera, and_setup.tsrewrites that to@phosphor-icons/react/Camerafor the React oracle. A guard throws if a fixture regresses to an uncovered import shape. Audit sha256 pins are refreshed for the two edited files.Reviewed by Cursor Bugbot for commit 9e8c999. Bugbot is set up for automated code reviews on this repo. Configure here.