Skip to content

Parallel-isolation guard: exempt the nvidia-smi fake's poll deadline - #12353

Merged
danielhanchen merged 1 commit into
mainfrom
fix/benign-gpu-query-poll
Sep 30, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix/benign-gpu-query-poll

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

workflow-trigger lint (pull_request_target / cache-poisoning) is red on main and every open PR at tests/studio/test_backend_ci_parallel_isolation.py::test_every_tight_elapsed_bound_is_isolated:

{'test_gpu_query_cache.py': ['test_gpu_query_cache.py:107 one duration against another']}

Cause

#12275 (merged 2026-09-29) hardened test_gpu_query_cache.py by replacing fixed sleeps with FakeSmi.wait_for_call:

deadline = time.monotonic() + timeout   # timeout = 30.0
while self.calls(needle) < count:
    assert time.monotonic() < deadline, ...
    time.sleep(0.01)

This is a poll deadline: it waits for a condition and only fails after 30 s. A descheduled worker just polls longer, so it cannot flake under -n 4. The guard reads any comparison between two clock-derived values as a possible timing claim, and it asks for exactly this kind of site to be listed in BENIGN_TIMING once a human has read it. #12275's change is right; the entry was just never added.

Fix

Add ("test_gpu_query_cache.py", "wait_for_call") to BENIGN_TIMING, with a one-line reason, next to the existing poll-deadline entry. The exemption is keyed on the function, so any other timing assert in that file is still scanned.

Testing

test_every_tight_elapsed_bound_is_isolated
main fails
this branch passes (whole file: 41 passed)
this branch plus a new assert time.monotonic() - t0 < 0.01 test in test_gpu_query_cache.py fails

Test-only change.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 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 ✅ Completed 2026-09-30T13:17:24.478419Z 80eac41 Manual request
🔒 Security Review ⚠️ Failed 2026-09-30T13:14:53.030961Z 80eac41 PR opened
ℹ️ 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

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 80eac417a2

ℹ️ 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".

@danielhanchen
danielhanchen merged commit 3d7dde0 into main Sep 30, 2026
11 of 15 checks passed
@danielhanchen
danielhanchen deleted the fix/benign-gpu-query-poll branch September 30, 2026 13:24
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