Skip to content

Give the WMI deadline check headroom for Windows PowerShell job startup - #16257

Merged
danielhanchen merged 2 commits into
mainfrom
dh/fix-wmi-deadline-check-headroom
Oct 31, 2026
Merged

danielhanchen merged 2 commits into
mainfrom
dh/fix-wmi-deadline-check-headroom

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

tests/studio/test_early_python_process_image.ps1 failed its first check on the Windows PowerShell 5.1 step of parity (windows-latest), on a staging run for #16255, which does not touch the installer:

  FAIL  a WMI query that never returns is abandoned at the deadline
  ...
1 check(s) failed

The same check is green on most runs. It is timing-sensitive: Get-StudioWmiProcessImageRows -TimeoutSeconds 2 against a query that sleeps 60 s, and the whole call, including Start-Job, Stop-Job and Remove-Job, had to finish inside 20 s. On Windows PowerShell 5.1 each job runs in a fresh powershell.exe, and on a loaded hosted runner its start and stop can push the call past 20 s even though the deadline itself is honoured. The installer logic is fine. The bound was just too tight for what it measures.

Change

  • Allow 45 s instead of 20 s. That still separates abandoning the query at the deadline from waiting out its 60 s.
  • Print the elapsed time in the check line, so the next failure shows how close it came.
  • Check the empty result as its own line, so a failure says which half broke.

Verification

pwsh 7 on Linux:

elapsed deadline check
main install.ps1 2.1 s PASS
sabotage: Wait-Job without -Timeout 60.3 s FAIL

The check allowed 20 s for a 2 s deadline, but Windows PowerShell 5.1 runs the job in a fresh powershell.exe
whose start and stop can exceed that on a loaded runner. Allow 45 s, which still separates abandoning the
query from waiting its 60 s out, print the elapsed time, and check the empty result separately.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-31T02:43:53.773381Z
We couldn’t complete this review. Comment @codex review to try again.
628bff4 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

1 similar comment
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

danielhanchen added a commit to NilayYadav/unsloth that referenced this pull request Oct 31, 2026
@danielhanchen
danielhanchen merged commit 48c57aa into main Oct 31, 2026
@danielhanchen
danielhanchen deleted the dh/fix-wmi-deadline-check-headroom branch October 31, 2026 03:05
danielhanchen added a commit that referenced this pull request Oct 31, 2026
## Summary

Every `Core zoo` cell in `consolidated-tests-ci.yml` is now being
cancelled at its 35 minute job cap, on unrelated PRs, with the
unsloth_zoo suite at 99%. It is the same failure #14240 fixed at 25
minutes: the suite has grown past the cap.

A passing cell from today, for scale: the zoo `pytest -n 4` step
reported `14494 passed, 2462 skipped ... in 1770.53s (0:29:30)`, and the
whole job ran 34m57s, three seconds under the cap.

## Change

- `Core zoo` job: `timeout-minutes: 35` -> `50`, comment updated with
the current numbers.
- Unchanged: the 5 minute `PYTEST_TIMEOUT` per test, which is what names
and stack-dumps a genuine hang. The job cap only bounds the total.

## Evidence

Staging Core runs since 2026-10-30 21:28 UTC, Core zoo cells by combo:

| PR | HF=4.57.6 | HF=default | HF=latest |
|---|---|---|---|
| #16041 | failure | cancelled | cancelled |
| #16249 | cancelled | cancelled | cancelled |
| #16250 | cancelled | cancelled | cancelled |
| #16257 | cancelled | cancelled | cancelled |
| #16255 (run 1) | cancelled | success (34m57s) | success (28m46s) |
| #16255 (run 2) | success | cancelled | cancelled |

The cancelled cells end with `##[error]The operation was canceled.`
while the suite is printing its last progress lines (98-99%).

## Tests

`tests/studio/test_zoo_suite_parallel_isolation.py`,
`test_workflow_guards_run_unfiltered.py` and every test that reads
`consolidated-tests-ci.yml`: 267 passed.

## Not proven

- This PR's own CI run is the first measurement at the new cap; whether
50 minutes leaves enough headroom as the suite keeps growing is not
known.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant