Skip to content

ci: install the packed tarball to the fast volume on windows - #137

Merged
Rinse12 merged 1 commit into
masterfrom
fix/windows-global-install-prefix-136
Aug 22, 2026
Merged

ci: install the packed tarball to the fast volume on windows#137
Rinse12 merged 1 commit into
masterfrom
fix/windows-global-install-prefix-136

Conversation

@Rinse12

@Rinse12 Rinse12 commented Aug 22, 2026

Copy link
Copy Markdown
Member

Closes #136

Problem

The windows job intermittently hit timeout-minutes: 20 inside Verify global install from pack, before running a single test. When that happened on a master push, CI-build.yml — gated on if: github.event.workflow_run.conclusion == 'success' — was skipped, so no release was published. It silently blocked the pkc-js 0.0.85 release yesterday.

The step has been chronically slow, not newly slow. Across the last 40 CI runs:

step duration, windows 8–13m, going back to at least 2026-06-25
same tree via npm ci, same job, same runner ~55s (and a larger tree: 2054 packages vs 1386)
whole test suite 2.5m
job cap 20m

Prior timeouts: 2026-07-30 (0382b13), 2026-08-13 (53b42e5), 2026-08-21 (0f6ef94).

Cause

The destination volume. Windows defaults the npm global prefix to C:\npm\prefix on the OS disk; npm ci writes to the workspace on D:, the runner's fast volume.

Measured on windows-latest, identical warm cache, max-parallel: 1, varying only the destination:

Destination Time
C:\npm\prefix (current default) 9.1m
D:\npm-global 1.4m
D:, plain non-global install 1.0m

Everything else was ruled out first, each with a measurement rather than a guess:

  • Resolution — dry-run resolve is 12s on windows.
  • Postinstall scripts--ignore-scripts is no faster (8.3m).
  • npm version — 12.0.2 is no faster (10.8m); the workflow pins 11.13.0.
  • Network--offline succeeds, exit 0, in ~10m. With no registry access at all the step is just as slow, so none of the cost is registry traffic.

The fix

setup-node exports npm_config_prefix, which takes precedence over npm config set prefix — an earlier attempt to move the prefix silently did nothing and had to be redone against the env var. So the env var itself is overridden, and D:\npm-global is added to PATH so bitsocial --version still resolves.

Two notes on the existing workflow

--prefer-offline never fixed this. ff6aa9b added it right after the 2026-07-30 timeout and its comment credits it with fixing a 17m step. Median step time was ~10.0m before and ~10.7m after — it was credited with a 17.1m outlier in an already-noisy distribution. The flag is kept (reusing the cache is still correct) but its comment no longer claims to be the fix.

.github/** added to pull_request paths. Without it, a PR touching only a workflow does not run CI — meaning this very change could not have been tested by its own PR.

Verification

The windows job on this PR is the test: the step should drop from ~9m to ~1.5m, and bitsocial --version must still resolve from the relocated prefix.

Raising timeout-minutes was deliberately not the fix — a step taking 9 minutes to install a tree npm ci installs in 55 seconds is the actual defect. With this change the windows job should land around 6-7m, restoring real headroom.

Summary by CodeRabbit

  • CI Improvements
    • CI now runs for changes to workflow configuration.
    • Improved Windows package installation verification by configuring the global npm location.
    • Added clearer verification output and explanations for offline cache usage and installation performance.

The windows job intermittently hit timeout-minutes: 20 inside "Verify
global install from pack", before running a single test. When that
happened on a master push, CI-build.yml - gated on
workflow_run.conclusion == 'success' - was skipped, so no release was
published. It silently blocked the pkc-js 0.0.85 release.

The step has been chronically slow, not newly slow: 8-13m across the
last 40 runs going back to June, against a 20m cap, with the whole test
suite taking 2.5m. It had already timed out on 2026-07-30 and
2026-08-13.

Cause is the destination volume. Windows defaults the npm global prefix
to C:\npm\prefix on the OS disk, while npm ci writes a larger tree to
the workspace on D:. Measured on windows-latest with an identical warm
cache, varying only the destination:

  C:\npm\prefix   9.1m
  D:\npm-global   1.4m
  D:, non-global  1.0m

Everything else was ruled out first: dependency resolution is 12s,
--ignore-scripts is no faster, npm 12.0.2 is no faster, and --offline
succeeds in ~10m - so none of the cost was registry traffic.

Note ff6aa9b's --prefer-offline did not fix this. Median step time was
~10.0m before it and ~10.7m after; it was credited with a 17.1m outlier
in an already noisy distribution. The flag is kept, since reusing the
cache is still correct, but its comment no longer claims to be the fix.

Also add .github/** to the pull_request paths. Without it a PR that only
touches a workflow does not run CI, so this change could not be tested
by its own PR.
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 88827c0d-be45-4c65-806b-ab09be76ebe3

📥 Commits

Reviewing files that changed from the base of the PR and between 53fb176 and a2231d0.

📒 Files selected for processing (1)
  • .github/workflows/CI.yml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The CI workflow now includes .github/** in pull-request path filters. Windows CI sets npm’s global prefix and executable path to D:\npm-global, logs the active prefix, and clarifies the global-install verification comments.

Changes

CI workflow

Layer / File(s) Summary
Pull-request path coverage
.github/workflows/CI.yml
The pull-request path filters now include .github/**.
Windows npm global-install setup
.github/workflows/CI.yml
Windows CI redirects npm global installations and executables to D:\npm-global. The workflow logs the configured prefix and distinguishes npm cache reuse from destination-volume performance effects.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to a2231

This change relocates the Windows global install to the fast volume while preserving command resolution. No actionable merge-blocking risk remains; a minor shell portability cleanup can be handled as follow-up.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes moving the packed tarball installation to the fast Windows volume.
Linked Issues check ✅ Passed The changes address issue #136 by moving the Windows global install to D: and preserving command resolution.
Out of Scope Changes check ✅ Passed The workflow path filter and comment updates support the stated CI reliability objectives and are not out of scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/windows-global-install-prefix-136

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Rinse12
Rinse12 merged commit 7e534a7 into master Aug 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: Windows "Verify global install from pack" takes 8-13m and intermittently blows the 20m job timeout, blocking releases

1 participant