Repository navigation
fix(tests): stop PATH-mirror helpers from deep-copying under Git Bash - #6491
Conversation
Git Bash's default `ln -s` deep-copies its target, so test helpers that hide a tool by mirroring PATH copied whole system directories (C:\WINDOWS, WindowsApps) into %TEMP% and filled the C: drive. - check-script-contract.test.sh hidden_path: keep PATH entries that lack the tool, mirror only regular files of the entries that hold it, force native symlinks, and register a labeled root before filling it. - check-detector-eval-coverage, test-judge-bg, work-item-tracker: same filtered-PATH shape instead of linking every file on PATH. - Format-hook probes, run-guards, block-hook-bypass, tool-free-path: force native symlinks so a link never becomes a copy. - Remove temp dirs that were never cleaned: mermaid-gate, course-digest cli-entry (unlink its junction first) and cli-browser-artifacts, test_compare_reports, test_assets, index-drift (EXIT trap), exec-bash.gates (exit hook); bound test_kill_switch_probe's copytree. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01BNvS11TdNcvQcurygMK7sW
|
PR body contract — issue linkage This PR body does not yet satisfy the issue-linkage contract:
Edit the body and this comment updates itself on the next run. |
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. |
|
Claude finished @kyle-sexton's task in 3m 11s —— View job Code review (
|
|
Claude finished @kyle-sexton's task in 1m 21s —— View job Security review
No security issues found. This PR is entirely test-infrastructure plumbing: it changes how 22 test scripts build a "PATH without tool X" fixture (replacing a deep-copying Reviewed for:
Scope note: per this lane's brief, GitHub Actions workflow hardening (triggers, |
|
claude-security-review has reviewed this pull request through 489218d; a later push is reviewed from there. |
|
claude-review has reviewed this pull request through 489218d; a later push is reviewed from there. |
Patch-bump the eleven per-PR-versioned plugins whose test files changed, add none fragments for the five fragment-mode plugins, and build the no-timeout PATH mirrors in test-judge-bg under the suite's own trapped $TMP without mktemp, which the test-tmp-cleanup gate reads lexically. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01BNvS11TdNcvQcurygMK7sW
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01BNvS11TdNcvQcurygMK7sW
|
Re the code-review lane's two sub-threshold notes:
Also pushed eeffeab: patch bumps and changelog entries for the 11 per-PR-versioned plugins, |
|
Claude finished @kyle-sexton's task in 1m 28s —— View job Security review (
|
|
Claude finished @kyle-sexton's task in 1m 34s —— View job Code review (
|
Incident
scripts/check-script-contract.test.shhid a tool by runningln -sf "$entry"/* "$dir"/for every PATH entry. Under Git Bash,ln -sdeep-copies by default (MSYSwinsymlinksunset), and the glob matched subdirectories, so each run copied C:\WINDOWS and the WindowsApps PowerShell dirs recursively into%TEMP%\tmp.*(about 35 GB per hidden tool, 4 tools per run). The mirror dir was registered for cleanup only after the loop, so an interrupt left it behind, and2>/dev/null || truehid disk-full. Agent worktrees ran the suite repeatedly and filled C:.Fixes
hidden_path: PATH entries without the tool pass through unchanged. Each entry that holds the tool is replaced in place by a dir of symlinks to its regular files minus the tool, made withMSYS=winsymlinks:nativestrictso a link fails instead of becoming a copy. One labeled root (hidden-path.XXXXXX) is created and registered before any mirror is filled, and the EXIT trap removes it.ln -sso a link never turns into a copy of/usr/binor a PATH dir.after(rmSync).tempDirsplusafterEach(rmSync). cli-entry also unlinks its junction into the sourceextraction/dir before cleanup.addCleanup(shutil.rmtree, ...).copytreeignore list now covers.venv,node_modules,.*_cacheand.work.Verification
Run on Windows Git Bash with
TMPDIRon D:, because C: is full:npm ci) and the exec-form-windows-probe fixture lacks lib/exec-bash.mjs.URL.pathnamedrive-letter issue.tmp.*orcli-*dirs were left in the temp dir after the runs.🤖 Generated with Claude Code
https://claude.ai/code/session_01BNvS11TdNcvQcurygMK7sW