REPLACE-RETRY-LOCK-VIOLATION-AND-SECONDS-VALIDATION #2346
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!2346
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/replace-retry-lock-and-bounds"
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: REPLACE-RETRY-LOCK-VIOLATION-AND-SECONDS-VALIDATION (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7194632590)
What and why
ERROR_LOCK_VIOLATION(33) alongside5and32in_TRANSIENT_WINERRORSintools/replace_retry.pyso transient byte-range lock conflicts retry cleanly instead of failing immediately.secondsup front inreplace()so booleans, non-numeric values, negative numbers,NaN, and infinities raiseValueErrorbefore callingos.replaceor entering the retry loop (avoiding silent no-sleep returns or infiniteNaNdeadline loops).tests/test_replace_retry_bounds.py.Tested
python -I tests/test_replace_retry_bounds.py -v: 3 passed, 0 failed (detachedupstream/mainbaseline with only the new test file fails: 6 failures, 2 errors across subtests).python -I tests/test_replace_retry.py -v: 10 passed, 0 failed.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 tools/replace_retry.py tests/test_replace_retry_bounds.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.Tested commit 8d0c27886 on Windows 11 (build 26300.9974) with Python 3.12.
No tests were skipped. Both commands exited with code 0. I ran the tests locally. AI-assisted setup and reporting.
Approving 8d0c27886.
ERROR_LOCK_VIOLATION(33) joins 5 and 32 as a transientos.replacefailure, which is what a byte-range lock on the source or destination returns, and the retry budget is checked to be a finite non-negative number before it is used.Merged onto
maind1dff7949in one batch with 15 other tool PRs of this series (no conflicts), on Linux with Python 3.13.tests/test_replace_retry_bounds.py: 3 passed (new). AI-assisted (Claude Code, Claude Opus 5.5).#2346 | head
f478f4c6b88000fb6bb6b6021f4a0d3d7eb579c0|python3 -I tests/test_replace_retry_bounds.py -v,py -3.12 -I tests/test_replace_retry_bounds.py -v| red: Linux 3 run, 6 failures, 4 errors / Windows 3 run, 6 failures, 4 errors | green: Linux 3 passed / Windows 3 passed | Red → greenInvalid retry intervals and a simulated Windows lock violation were covered. Counts include subtests.
Pinned main
33db04a7010e81c40a7a6a15624525aa0c4a3a58, merged into this PR head. Ubuntu 26.04.1 (WSL2), Python 3.14.4 and Windows 11 Pro, Python 3.12.10. Full suite: not run. AI-assisted: OpenAI Codex. Batch claim.Merged, thank you @kirigayakazima!
What it does: REPLACE-RETRY-LOCK-VIOLATION-AND-SECONDS-VALIDATION
How it was checked: sodove tested this PR at head
f478f4c6bon main33db04a70: the PR's own test fails on main and passes with this PR merged in (his result is linked from the batch summary in #1608). We then re-ran the same test locally on Windows 11 and got the same verdict: on main, red (6 failures, 4 errors); with the PR, green (3 OK).CI: the red jobs on this PR fail the same way on main, or on the older main it was built on (the
cs_dpp_cmp.asmtranslator fixture, since fixed on main, and the Windows runner's Visual Studio setup), so none comes from this change.Merged one by one with 20 other PRs of the same reviewed batch, pinned to the tested head.
AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.