conformance: harden verify.ps1 and failure-log.cmd path safety #2340
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!2340
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/conformance-verify-and-failure-log-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: CONFORMANCE-VERIFY-AND-FAILURE-LOG-SAFETY (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7194263351)
What and why
tools/conformance/native/scripts/verify.ps1:Test-Path,Remove-Item,Get-ChildItem,Get-FileHash,Set-Content, andGet-Contentto-LiteralPath(and use[IO.Directory]::CreateDirectory) so checkouts containing PowerShell wildcard characters such as[1]work reliably.Get-FileHash.$root\a\manifest.jsonexistence before reading and expose optionalparam($ExpectedAdapter, $SecondAdapterPattern, $SecondAdapterIndex)with the existing defaults preserved.tools/conformance/native/scripts/failure-log.cmd:set "EXE=...",set "ROOT=...", andset "LOG=..."assignments (and echo"%EXE%") so paths containing&do not fail or split, and verify%EXE%exists before deleting%ROOT%or writing%LOG%.tests/test_conformance_verify_scripts.py.Tested
python -I tests/test_conformance_verify_scripts.py -v: 2 passed, 0 failed (detachedupstream/mainbaseline with only the new test file fails with 2 failures).python -I tests/test_ci_registration.py: 16 passed.python -I tests/test_text_write_line_endings.py: 3 passed.python -I scripts/check_no_game_data.py,python -I -m compileall -q tests/test_conformance_verify_scripts.py, andgit diff --cached --check: passed.GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.#2340 | head 240186034ba23de8105c5fe87c9f33929a9c1531 (merged cleanly with main 09c153948) |
python -I tests/test_conformance_verify_scripts.py| red on main:FAILED (failures=2)('-LiteralPath'missing inverify.ps1, and bracket/ampersand path fails wildcardTest-Pathwith1 != 0) | green on PR+main:2 tests OK(-k test_verify_and_failure_log_with_brackets_and_ampersand_paths:1 test OK) | Windows 11, Python 3.12.10 | AI-assisted: yesAudited
tools/conformance/native/scripts/verify.ps1andfailure-log.cmd(-LiteralPathhandling, run A vs run B filename-set equality check, quotedset "VAR=...", and pre-wipe executable check beforermdir /s /q "%ROOT%"), and verified bothPR + main(09c153948) and a combinedmain + #2340 + #2337merge (0conflicts;2 OK+2 OK+7 OKunder Windows PowerShell andcmd.exe). Also passedtests/test_ci_registration.py(18 OK),tests/test_text_write_line_endings.py(3 OK),tests/test_runner_calls_all_tests.py(3 OK), andscripts/check_no_game_data.py.Red/green: classified READY by cloud-6 (red on main 09c153948, green on head merged with main); head 240186034ba2 unchanged since 2026-11-26, 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)