fix(progress): refuse aliased reports via realpath targets #13171
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13171"
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?
Imported from boykopovar/AnyPS5. Originally posted by rooklz on 2026-10-30T05:11:03Z.
What
Merged #12301 added
require_distinct_reportsusingexists()+samefile(), but two alias shapes still slip through:exists()is false for both, so the pair is skipped;write_sitethen creates one file and the JSON report is lost (#12055 via symlink).progress.json/progress.htmlwhile all five site files exist, so mutants that drop theindex + 1slice or skip the exists check still pass.After the samefile loop, compare
os.path.normcase(os.path.realpath(...))for every report path (same idea asprogress_history.same_location). Two new tests cover the missing-target symlink pair and an adjacent badge hardlink with no other outputs present.Tested
macOS (Apple M5), relinker-only Release,
BUILD_TESTING=ON,-DPython3_EXECUTABLE=/opt/homebrew/bin/python3.13, base5ecef095b6(branch @401f8138f0):progress.py, head tests:test_reports_linked_to_one_missing_target_are_refusedFAIL (rc 0).python3.13 -m unittest discover -s tools/tests -p test_progress.py→ 58 OK;/usr/bin/python3(3.9.6) → new tests OK.check_conventions.py --base upstream/mainPASS;pr_overlap.py --branch fix/progress-realpath-aliases→ no overlap (1453 PRs).build-relinker: 510/510 (progress_report included; iter426 rebase verify).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T05:17:06Z.
Review: APPROVED
Reviewed — looks good
The new path comparison rejects dangling symlinks to a shared target, and the adjacent hardlink case is now covered with other outputs absent.
What I ran
Reviewed exact head
609e1685221a140311461b31f27fb021265f9085against currentmain8c8b9986204d5b1cbb23847b363df00ae832ec9c; the merge preview is clean (7b4f0daf7cb62193f527c446ed87efd255b1c8b3). Environment: Linux x86-64, Python 3.11.2; no compiler or build invoked.The last command is the negative control: the PR's test file ran with current
main's implementation.Results
main7b4f0daf7cb62193f527c446ed87efd255b1c8b3tools.tests.test_progresson PR headmainimplementationSystemExitLocal command output
Negative control
main'stools/progress.py.SystemExitwas not raised.Findings
Blocking
None found.
Non-blocking
The author reports macOS Python 3.13 and 3.9 runs and a 510/510 relinker-only CTest result. I did not reproduce those runs. Windows and macOS hosted relinker jobs were still pending when I checked.
Sources
Not verified
No Windows or macOS Python run, local build, or full project test suite was run. The hosted Windows/macOS relinker jobs were pending; product and specialized jobs were skipped.