Conversation
PR Summary by Qodoci: shard Windows TypeScript tests into 3 chunks on Node 22 Description
Diagram
High-Level Assessment
Files changed (3)
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a new Node.js script that discovers Jest packages in the pnpm monorepo, enumerates test files with size-based weights, selects a greedy-balanced chunk, and executes Jest per package. Updates ChangesChunked TypeScript test execution
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code Review by Qodo
1.
|
|
Code review by qodo was updated up to the latest commit 0d4195a |
|
Code review by qodo was updated up to the latest commit ffd4e61 |
|
Code review by qodo was updated up to the latest commit ffd4e61 |
|
Code review by qodo was updated up to the latest commit 618a4b2 |
|
Code review by qodo was updated up to the latest commit 618a4b2 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/scripts/run-ts-tests-chunk.mjs:
- Around line 338-345: The issue is that when spawn() is called with shell: true
on Windows, Node.js concatenates the command and args array into a single string
without quoting individual arguments, causing arguments containing spaces to be
split into multiple tokens. The validateWindowsShellArgs function only blocks
injection metacharacters but does not address this problem. Fix this by either
removing the shell option entirely from the spawn() calls (at lines 338-345,
364-370, and 403-409) so that the process is spawned directly with the args
array properly handled by Node.js, or by constructing a single properly-quoted
command string as the first argument to spawn() and passing undefined as the
args parameter. Choose the approach that best fits the codebase's current
architecture.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 0005c6b4-eb41-4665-8e14-7c6961c2d860
📒 Files selected for processing (3)
.github/scripts/bencher-result-from-pnpm-summary.mjs.github/scripts/run-ts-tests-chunk.mjs.github/workflows/test.yml
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/test.yml
|
Code review by qodo was updated up to the latest commit 087d0cc |
1 similar comment
|
Code review by qodo was updated up to the latest commit 087d0cc |
spawn(cmd, args, { shell: true }) on Windows joins args into one string
without quoting, so an arg containing a space would be split into
multiple tokens. Build the quoted command line ourselves and pass it as
a single string to cmd.exe, and reject embedded double quotes so the
quoting stays unambiguous.
|
Code review by qodo was updated up to the latest commit 8f1b5d9 |
1 similar comment
|
Code review by qodo was updated up to the latest commit 8f1b5d9 |
…generalize chunk runner The chunk runner hardcoded `if name === deps-installer set PNPM_REGISTRY_MOCK_PORT=7769`. Derive the port from the package's own `.test` scripts instead, so the runner carries over any package's pin without naming it. Also decouple the 'fail if a package cannot be fetched' test from the pinned port: it served committed packument fixtures whose tarball URLs hardcoded localhost:7769, matched only when the mock agent's origin used that port. Rebuild each fixture tarball URL from the live REGISTRY_MOCK_PORT at load time and drop the magic port from the fixtures. The deps-installer port pin itself stays: the lockfile normalization test installs the `@pnpm.e2e/pkg-with-tarball-dep-from-registry` fixture, whose dependency is an absolute tarball URL served verbatim by the live registry, so the registry must answer on the baked port.
|
Code review by qodo was updated up to the latest commit 3f3d400 |
The full test matrix waited on test-smoke. Split Windows into its own test-windows job gated only on compile-and-lint, so its three shards run alongside the ubuntu Node 24 smoke job. The other Node.js versions (ubuntu 22/26) still wait for the smoke job. The Success gate aggregates all of them.
|
Code review by qodo was updated up to the latest commit 3f3d400 |
|
Code review by qodo was updated up to the latest commit 3c0ab11 |
1 similar comment
|
Code review by qodo was updated up to the latest commit 3c0ab11 |
The pnpr build lived inside the reusable test job, keyed on a cache that actions/cache reads at job start. Because the test matrix (ubuntu 22/26 and the three Windows shards) fans out in parallel, every job missed the cache and rebuilt pnpr from scratch. Hoist the build into a dedicated build-pnpr job (matrix over ubuntu and windows) that runs alongside compile-and-lint, uploads the binaries as a per-OS artifact, and keeps the source-keyed binary cache. Each test job now downloads pnpr-bins-<os> instead of compiling, restoring the executable bit that artifacts drop on POSIX.
|
Code review by qodo was updated up to the latest commit 3918c2a |
1 similar comment
|
Code review by qodo was updated up to the latest commit 3918c2a |
The pnpr binaries live in `.pnpr-bin`, a dotfile directory that actions/upload-artifact skips by default (include-hidden-files: false), so the build-pnpr upload found no files and failed. Opt the hidden dir in.
|
Code review by qodo was updated up to the latest commit 503b673 |
1 similar comment
|
Code review by qodo was updated up to the latest commit 503b673 |
Summary
pnpm.windows.node22testbed.Squash Commit Body
Checklist
Written by an agent (Codex, GPT-5).
Summary by CodeRabbit
test_chunk/test_chunk_total, run the appropriate chunk commands, and merge chunk results.