Repository navigation
Studio composer icon check: re-measure a case when the dev page reloads mid-case - #14647
Conversation
|
@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. |
|
Codex Review: Didn't find any major issues. Hooray! 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". |
|
@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". |
…pped server releases auth.db (#14658) The Windows Unsloth UI CI "Chat UI Tests" job sometimes fails on lane `extra` even though every suite in it passed: ``` [banner] 2155 checks, 0 failed rm: cannot remove 'D:\a\unsloth\unsloth/.studio-lane-extra/auth/auth.db': Device or resource busy rm: cannot remove 'D:\a\unsloth\unsloth/.studio-lane-extra/auth/auth.db-shm': Device or resource busy rm: cannot remove 'D:\a\unsloth\unsloth/.studio-lane-extra/auth/auth.db-wal': Device or resource busy ##[error]Windows UI lane extra failed (exit 1) ``` 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` (lane `extra`) stops its own server with `kill` plus a 2 second sleep, then calls `run-studio-permission-browser.sh` on the same `UNSLOTH_STUDIO_HOME`. That script wipes `$studio_home/auth` before booting a fresh server. On Windows the killed server can still hold `auth.db` open past the sleep, so the `rm -rf` fails and `set -euo pipefail` ends the lane with exit 1. ### Change - The wipe is now `wipe_auth`, which retries `rm -rf "$studio_home/auth"` quietly once a second for up to 30 tries (`STUDIO_AUTH_WIPE_TRIES`), then makes one last attempt that shows `rm`'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. - The fix is in the step that needs the lock released rather than in the lane's `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 CI `studio` shard) runs the script's own `wipe_auth` body in bash against an `rm` shim that reports "Device or resource busy" for its first calls: - held for 4 calls: wiped on the 5th, exit 0 - released exactly on the final attempt (5 tries): wiped, exit 0 - held throughout (5 tries): exits non-zero after 6 calls, with the `still held open` error and `rm`'s message - no bare `rm -rf "$studio_home/auth"` remains outside the helper, and the wipe runs before `unsloth studio` boots Sabotage: main's script fails all of them; a `wipe_auth` with 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.py` and `test_windows_ui_lanes_are_isolated.py` still 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.
The composer icon alignment step in Studio Frontend CI fails intermittently on the Windows leg with:
Seen on main (run 39678763807, job 119495424607) and on #14592 (job 119703801606), which does not touch the composer, the smoke page or the script. The vite dev page navigates after its buttons have rendered, and the next evaluate loses its context.
Change
evaluate. Before, the case was applied in one call and measured in a second; a reload between them resets the case, so retrying only the measurement would record the default layout under the case's name.measure_casere-runs the whole case on a fresh render when the context is lost, up to 3 attempts. Any other evaluate error fails at once, and a page that keeps navigating still fails.node_modules/.vite, so the trigger on Windows is not proven yet.Verification
tests/studio/test_composer_icons_navigation.py(new, collected by the Backend CIstudioshard) uses a fake page whose reload resets the applied case and kills the evaluate in flight. It checks that one evaluate applies and measures, that a reload on the first or second attempt still returns the requested case, that persistent navigation fails after 3 attempts, and that other errors are not retried.PASS: 1296 rendered icons centered, and the measured widths scale with each case (20.80 at font 1 / zoom 1, 32.5 at 1.25 / 1.25), so the case is applied inside the measuring call.