Move TMP/TEMP to the workspace disk on Windows CI runners#265
Conversation
On windows-latest, TMP/TEMP default to the throttled C: OS disk, and this tmp_path-heavy suite pays its I/O prices: the unit selection ran 555s mean vs ~161s on ubuntu. An A/B experiment on real runners (run 28715118956, 5 variants x 2 reps, evidence in work/win-io.md) showed redirecting TMP/TEMP to RUNNER_TEMP (the workspace disk) alone reaches ubuntu parity at 150s mean, while the plausible alternatives lose: Defender real-time protection is already off on current images (both Defender variants measured as no-ops) and a ReFS dev drive (296s) is dominated by this redirect. The redirect is written to GITHUB_ENV early in the job so unit, TUI, and browser steps all benefit. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR adds a Windows-only CI step in ci.yml that redirects TMP and TEMP environment variables to RUNNER_TEMP via GITHUB_ENV to improve Windows test runtime, and adds work/win-io.md documenting the A/B experiment and findings supporting this change. ChangesWindows CI Temp Redirect
Estimated code review effort: 1 (Trivial) | ~5 minutes Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
|
Oh wow, this was unexpected! |
Well, that was Fable continuing where Opus dropped the gauntlet ;-) |

Part of #248; follow-up to #264.
Problem
Even with coverage scoped to the primary job (#264), Windows unit-test steps still ran ~3.5x slower than ubuntu (~555s mean vs ~161s for the same selection). An A/B experiment on real windows-latest runners (run 28715118956, 5 variants x 2 reps, full evidence in
work/win-io.md) isolated the cause: TMP/TEMP default to the throttled C: OS disk, and this tmp_path-heavy suite pays its I/O prices.Change
One early, Windows-gated step writing
TMP/TEMP=RUNNER_TEMP(the workspace disk) toGITHUB_ENV, so every later step benefits (unit, TUI, browser, and dependency installs). Pluswork/win-io.mdrecording the experiment so the step isn't "simplified away" later.Side benefit: tmp dirs and the checkout now live on the same drive, removing the cross-drive layout that can break
os.path.relpathbetween tmp_path and repo paths on Windows.Expected effect
Windows unit step ~735s (pre-#264) → ~150s; Windows jobs should drop off the CI critical path. This PR's own CI run is the end-to-end verification.
🤖 Generated with Claude Code
Summary by CodeRabbit