Skip to content

test: fix phosphor differential parity timeout by narrowing fixture imports - #713

Merged
trueadm merged 1 commit into
mainfrom
claude/exciting-dewdney-b964a2
Aug 11, 2026
Merged

trueadm merged 1 commit into
mainfrom
claude/exciting-dewdney-b964a2

Conversation

@trueadm

@trueadm trueadm commented Aug 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Fixes the intermittent 20s timeout of Camera renders byte-identical accessible duotone SVG in packages/phosphor-icons/tests/differential/parity.test.ts during full pnpm test runs on a loaded machine.
  • The differential case drops from ~3,495ms to ~37ms in isolation; the existing 20s budget is now pure hang-guard headroom instead of a contention lottery.

Why

  • The fixture imported the @octanejs/phosphor-icons root 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.
  • Barrel completeness and per-icon export wiring are already covered by 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/Camera for 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:check
  • pnpm typecheck
  • pnpm test — 1,677 files / 18,501 tests, all pass; run at full machine saturation (the failure regime), differential stayed far under budget
  • targeted tests: phosphor-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:check on the changed files, pnpm sync clean

Risk / follow-ups

  • Overlaps deliberately with feat/consolidated-react-parity-prs: parity.tsrx and _setup.ts here are byte-identical to that branch's versions (audit hashes confirm), so whichever lands second merges clean.
  • That branch's other half — the preloadDifferentialFixture rig change and vitest.config.js restructure — is intentionally not taken here: _rig.ts and vitest.config.js sha256s 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

  • An agent produced this diff (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.tsrx now imports the public per-icon subpath @octanejs/phosphor-icons/icons/camera, and _setup.ts rewrites that to @phosphor-icons/react/Camera for 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.

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]>
@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
octane-website Skipped Skipped Aug 11, 2026 10:59pm
octane-website-mcp Skipped Skipped Aug 11, 2026 10:59pm

Request Review

@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent test PR: tests only labels Aug 11, 2026
@trueadm
trueadm marked this pull request as ready for review August 11, 2026 23:06
@trueadm
trueadm merged commit 9a8aa8f into main Aug 11, 2026
53 checks passed
@trueadm
trueadm deleted the claude/exciting-dewdney-b964a2 branch August 11, 2026 23:42

This branch was previously deployed

2 inactive deployments
Preview – octane-website — 9e8c9994 Deployed Aug 11, 2026 by vercel[bot]
Preview – octane-website-mcp — 9e8c9994 Deployed Aug 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent test PR: tests only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant