scripts/carve_all.ps1: validate dirs, filter -File and publish coverage.json atomically #1847
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!1847
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/carve-all-safety"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull request successfully merged and closed
Claimed in the coordination issue as: CARVE-ALL-FILE-FILTER-EMPTY-AND-ATOMIC-COVERAGE (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7163140447)
What and why
-Gameas a directory (Test-Path -LiteralPath $Game -PathType Container) and ensure-Outis not an existing file before creating$outFullvia[System.IO.Directory]::CreateDirectory(...)(literal path safe with[ ]characters).-FiletoGet-ChildItem -LiteralPath $Game -Recurse -File -Filter *.rpfso directories named*.rpfare skipped rather than passed totools/rpf9_carve.py."[]"JSON when no.rpfarchives are found, writecoverage.jsonatomically via.coverage.<pid>.<guid>.tmpUTF-8 no-BOM staging +Move-Item -LiteralPath ... -Force+finallycleanup, and skipFormat-Tablewhen$rows.Count -eq 0.scripts/carve_all.ps1and add PowerShell 5.1 regression tests intests/test_carve_all_paths.py.Tested
python -I tests/test_carve_all_paths.py -v(live Windows PowerShell 5.1) ->Ran 11 tests in 11.463s,OK.python -I tests/test_carve_all_brackets.py -v->Ran 1 test in 0.461s,OK.upstream/main(98c2f777) baseline worktree with updatedtests/test_carve_all_paths.py->Ran 11 tests in 11.603s,FAILED (failures=2, errors=1).scripts/carve_all.ps1->PS1_CRLF=81 PS1_LF_ONLY=0.python -I tests/test_ci_registration.py->Ran 16 tests in 5.282s,OK.python -I tests/test_text_write_line_endings.py->Ran 3 tests in 12.773s,OK.python -I scripts/check_no_game_data.py scripts/carve_all.ps1 tests/test_carve_all_paths.py,python -I -m compileall -q tests/test_carve_all_paths.py, andgit diff --check-> exit0.GPUs tested: n/a (Windows PowerShell 5.1 + stdlib Python tests on Windows 11 x64)
AI-assisted: yes
Checklist
needs rebase).#1847 | head 35205833160450ad0eaab80b18a1c712f22040c3 (merged cleanly with main d48a957bb) |
python -I tests/test_carve_all_paths.py| red on main:FAILED (failures=2, errors=1)(attempted to carve afake.rpfdirectory, failed to create bracketedout [empty]\coverage.json, and threwSubstringerror when-Gamewas a file) | green on PR+main:11 tests OK| Windows 11 (powershell.exe5.1), Python 3.12.10 | AI-assisted: yesAudited
scripts/carve_all.ps1andtests/test_carve_all_paths.pyon Windows 11 PowerShell (powershell.exe), verifying-PathType Container/-PathType Leafvalidation on-Gameand-Out,-Filefiltering onGet-ChildItem,-LiteralPathsafety on[empty]bracketed output paths, and UTF-8-no-BOM temporary file staging +Move-Item -LiteralPathatomic publication ofcoverage.json(including"[]"on empty archive sets). Also verifiedtests/test_ci_registration.py(18 OK),tests/test_text_write_line_endings.py(3 OK), andscripts/check_no_game_data.py.Red/green: classified READY by cloud-4 (red on main 09c153948, green on head merged with main); head 352058331604 unchanged since 2026-11-25, before that run.
Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main d48a957bb in GitHub Actions: no new failure.
AI-assisted (Claude Code, Claude Opus 5.5)