Repository navigation
Windows UI lane: retry the permission suite's auth wipe while the stopped server releases auth.db - #14658
Conversation
…pped server releases auth.db
|
@codex review |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e3a0dca6e8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| rm -rf "$studio_home/auth" | ||
| return 1 |
There was a problem hiding this comment.
Honor success from the final wipe attempt
When Windows releases auth.db after the thresholded attempt but before the unredirected diagnostic rm, that final rm succeeds and removes the directory, yet the unconditional return 1 still fails the lane. This preserves a boundary-case false failure in the exact lock-release scenario the retry is intended to handle; return success when this final deletion succeeds and fail only if it also reports an error.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in cc6555c. The final attempt is now an if rm -rf ...: success returns 0, and only a failure prints the error and returns 1. Added test_a_release_on_the_final_attempt_is_a_success, where the directory is released exactly on the last call; it fails on the previous head and passes now.
|
@codex review |
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
The Windows Unsloth UI CI "Chat UI Tests" job sometimes fails on lane
extraeven though every suite in it passed:Seen on run 39669502772 and again on a staging replica of #14647 (a test-only change unrelated to the lane).
Cause
run-studio-ui-lane.sh(laneextra) stops its own server withkillplus a 2 second sleep, then callsrun-studio-permission-browser.shon the sameUNSLOTH_STUDIO_HOME. That script wipes$studio_home/authbefore booting a fresh server. On Windows the killed server can still holdauth.dbopen past the sleep, so therm -rffails andset -euo pipefailends the lane with exit 1.Change
wipe_auth, which retriesrm -rf "$studio_home/auth"quietly once a second for up to 30 tries (STUDIO_AUTH_WIPE_TRIES), then makes one last attempt that showsrm's own error. If that attempt succeeds the wipe succeeds; if not, it prints an::error::naming the held directory and fails. A server that never exits still fails the lane, now with a message that says so.stop(), so it covers any caller that hands this script a home whose server just went away.Verification
tests/studio/test_permission_browser_auth_wipe.py(new, collected by the Backend CIstudioshard) runs the script's ownwipe_authbody in bash against anrmshim that reports "Device or resource busy" for its first calls:still held openerror andrm's messagerm -rf "$studio_home/auth"remains outside the helper, and the wipe runs beforeunsloth studiobootsSabotage: main's script fails all of them; a
wipe_authwith the retry loop removed fails 2 of 3 of the original tests; the previous head of this PR (which returned 1 after a successful final attempt) fails the final-attempt test.test_ui_scripts_report_signals.pyandtest_windows_ui_lanes_are_isolated.pystill pass.Not proven here: the timing on a real Windows runner. This PR's own Windows UI CI run exercises the path; the failure is intermittent, so one green run is consistent with the fix rather than proof of it.