RT-299: sweep read-only Go module caches out of leftover test dirs - #453
Conversation
The glitter pty gate builds rt-ui under the run's throwaway HOME, so Go wrote a read-only module cache there. The next run's preload sweep then threw EACCES and no test in that run started. - the gate builds with GOFLAGS=-modcacherw - the preload sweep makes a stale dir's subdirs writable before retrying - the afterAll rm chmods first too Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. 📝 WalkthroughWalkthroughThe UI build sets ChangesTemporary home cleanup
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~12 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The regression test creates its stale directory where the next run will sweep it. No actionable merge-blocking risk remains after normal checks. Architecture SummaryArchitecture risk: 🟡 Medium · up to The change affects 3 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
Reliability and maintainability
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
RT-299. The glitter pty gate builds rt-ui under the run's throwaway HOME, so Go left a read-only module cache there. The next
bun testrun's preload sweep threwEACCESon it and no test in that run started.What changed
e2e/pty/glitter.test.tsbuilds withGOFLAGS=-modcacherw, so the cache stays deletabletest-setup.ts's sweep makes a stale dir's subdirs writable and retries when the plainrmfailsafterAlldetachedrm -rfrunschmod -R u+wfirstlib/__tests__/test-home-isolation.test.tsplants a dead run's dir with a read-only module cache and asserts the next run sweeps it (failed withEACCESbefore the fix)Verification
bun run test:ptythenbun run testback to back with no cleanup: the pty gate passed 7/7, zero read-only dirs were left underrt-tests, and the unit suite started and ran all 9891 tests with noEACCES/ENOTEMPTY. Its four failures (worktree provision timeouts, OAuth listen) come from machine load and pass 99/99 when run alone.🤖 Generated with Claude Code
Summary by CodeRabbit