Repository navigation
fix(runtime): keep transpiler cache scopes within configured paths - #7422
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
✅ Deterministic PR hygiene checks passed. |
Ingwannu
left a comment
There was a problem hiding this comment.
Correctness approval at 29f7202a0f30cb5559daacf6a0947b53d1c5ae99 against dev 12025981e5a304cdb6b1b54f525ba8554f623977: version-shaped configured bases remain parents; mixed-version chains nest inward, same-version reuse is idempotent, and disabled/unset/unknown-version plus Windows/drive/UNC/POSIX cases retain their contracts.
Independent bounded Bun 1.4.3 regression: 8 pass / 1 platform skip / 0 fail across one file. Each workload ran alone under CPU/RAM/swap/process/time caps and fresh private HOME/CODEX_HOME/OPENCODEX_HOME/TMPDIR. Existing frozen dependency maps and lock matched; no live account/provider/client config was used. Current-head hosted ci/gates and the latest effective hygiene/enforce-target checks pass; older cancelled repetitions are superseded by later successful executions of those checks. Typecheck is evidenced by hosted gates, not a claimed new local compiler run. The changed contract and relevant negative controls were reviewed. This approval does not merge, release, certify unselected platforms, or authorize live operations.
Summary
Keep Bun transpiler-cache version scoping within the explicitly configured cache path. A directory named
bun-<version>is ordinary user configuration, so switching runtimes must append beneath it rather than infer its parent and select a sibling.A path already ending in the target runtime's leaf is preserved, retaining same-version idempotence. Windows environment-name handling, drive-relative paths, disabled/unset caches, and unknown versions retain their contracts. The launcher and durable-child consumers share the same helper; no launcher authority or environment-provenance mechanism is added.
Tradeoff
An inherited process chain that alternates runtime versions now nests inward (
base/bun-A/bun-B/bun-A). It no longer reuses the first version's sibling cache. Repeated same-version starts do not add levels, and a fresh launch with the original base still adds one level. This deliberately favors containment over unbounded cross-version rescoping; very deep mixed-version chains can accumulate path length and extra cache directories.Verification
bun scripts/test.ts --changed=12025981e5a304cdb6b1b54f525ba8554f623977 tests/cli/bun-transpiler-cache-scope.test.tsselected 1/1 test file: 9 passed, 0 failed, 52 assertions.git diff --checkpassed. Independent design and final source reviews found no remaining actionable issue.Checklist
Summary by CodeRabbit
Bug Fixes
Documentation