Repository navigation
Stabilize Studio regression tests - #7192
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors two test files to improve robustness. In test_training_stop_watchdog.py, the test test_new_run_gets_its_own_watchdog is updated to use a mocked blocked watchdog loop with a threading.Event and _wait_until assertions, ensuring more reliable synchronization during concurrent test execution. In test_studio_text_descender_clipping.py, the test_sidebar_account_block_uses_leading_tight test is refactored to parse and match HTML class names using set operations rather than a strict regular expression, making the test resilient to changes in class ordering. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 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 |
|
Synced this branch with main. #6647 landed the sidebar descender fix (a tolerant regex) and relocated model-selector.tsx into features/model-picker, which touched the same test and conflicted with this branch. I took main's version of test_studio_text_descender_clipping.py so the model-selector path stays correct and we do not carry two competing sidebar matchers. The watchdog replacement-race fix is kept here, so the net diff versus main is now just test_training_stop_watchdog.py. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ebbb115efa
ℹ️ 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".
| watched_job_id = None, | ||
| ): | ||
| started.append(target_proc) | ||
| release.wait(timeout = 5) |
There was a problem hiding this comment.
Keep the blocked watchdog alive past the poll window
On a slow or heavily loaded CI worker, this 5-second timeout can expire before the replacement watchdog thread is scheduled and before the later _wait_until(..., timeout=5.0)/first_wd.is_alive() assertions run, so the test can fail even though _start_stop_watchdog correctly created a new watcher. Since the event is released in the finally block, the fake watchdog should either wait indefinitely after the test enters cleanup coverage or use a timeout comfortably longer than the assertion polling windows.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in baff5c1. The stub now waits on the release event with no timeout, so the superseded watchdog stays alive until the finally releases it regardless of scheduler load; the is_alive assertion no longer depends on a timeout beating the poll windows. The thread is a daemon, so a release missed on a pre-cleanup abort cannot block process exit.
|
@codex review |
1 similar comment
|
@codex review |
|
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". |
Rebuild on current main. Restore the set-membership sidebar account-block matcher (#6647, which fixed the same order-sensitive regex, was reverted on main, so the guard is failing on main again) and keep the watchdog replacement-race fix, whose blocked-watchdog stub now waits without a timeout so a superseded watchdog stays alive until cleanup regardless of scheduler load.
baff5c1 to
685f843
Compare
|
Update on the earlier sync. #6647 was reverted on main shortly after it landed, which restored the old order-sensitive sidebar regex and moved model-selector.tsx back to components/assistant-ui. That left the sidebar account-block guard failing on main again (the same bug this PR targets), and it showed up as the Repo tests (CPU) failure here. I rebuilt this branch on current main with the two original fixes: the set-membership account-block matcher (order-independent, so it survives utility reordering) and the watchdog replacement-race fix. Both test files pass against current main (33 tests). Net diff versus main is just the two test files. The model-selector path is back at components/assistant-ui to match current main. |
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. 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. Can't wait for the next one! 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". |
* Stabilize Studio regression tests Rebuild on current main. Restore the set-membership sidebar account-block matcher (unslothai#6647, which fixed the same order-sensitive regex, was reverted on main, so the guard is failing on main again) and keep the watchdog replacement-race fix, whose blocked-watchdog stub now waits without a timeout so a superseded watchdog stays alive until cleanup regardless of scheduler load. * Tighten the blocked-watchdog stub comment --------- Co-authored-by: Daniel Han <[email protected]>
Summary
Root cause
The sidebar test encoded an obsolete class order. The component still uses
leading-tight, but additional layout utilities made the ordered regular expression miss the account block.The watchdog test replaced the watched process and then asserted that the old thread was still alive. The old thread is expected to exit after that replacement, so the assertion raced with correct production behavior.
Impact
This is test-only. Production behavior is unchanged. The regression guards still fail when the account block loses
leading-tightor when a replacement process does not receive its own watchdog.Validation