Repository navigation
perf(snapshots): reduce registry traffic with local fixtures and caching - #3067
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
1d0ae17 to
6d71faa
Compare
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
018dac8 to
2423811
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 018dac8960
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
57014d4 to
9db2a13
Compare
41b3c67 to
9caeede
Compare
Snapshot tests repeatedly download package metadata and tarballs. The runner now serves recorded packages and shares a response cache for each run. Concurrent requests share one download. Stalled downloads release their cache locks so clients can retry.
Tests for
dlx,vpx, global binary lookup, and native pnpm shims use local CLI packages. These packages replacecowsayandlolcatjs. Recordedis-numberandyocto-queuepackages retain their published contents. Two monorepo cases use a fixed library template. Registry fixtures change only through explicit maintenance commands. Their packers use only Node.js builtins, with fixed timestamps and file modes.Cases share separate servers for published packages and packed checkout packages. Windows keeps both servers alive across
nextestprocesses. Cases with fixture overrides, custom registry configuration, or request-count assertions keep private servers. Package-manager caches and installed packages remain isolated per case. The tests still execute real package managers and toolchains.The CI comparison uses one complete run per revision. Each value is the slowest
Run PTY snapshot testsstep across three shards, with eight workers per shard. Each PR run starts with an empty registry response cache. The comparison excludes build, setup, and queue time. Linux uses GitHububuntu-latestrunners. macOS and Windows use Namespace runners.The revisions use the same product code, dependency lockfiles, and test cases:
main:afbe4a285, CI run.7d6f7264a, CI run.913877a92, CI run.mainAcross all shards, upstream requests changed from 15,325 to 15,331 between the previous revision and the revision with server reuse. Server reuse targets repeated startup work. Cumulative per-case registry setup on Windows fell from 150.0 seconds to 7.7 seconds. These phases overlap during execution.
All comparison runs passed. These are single-run measurements, so runner and network variation can affect the timings. The macOS difference is too small to establish an improvement.