Skip to content

Give the GPU summary probe test the AMD helpers its extracted block calls - #11472

Merged
danielhanchen merged 1 commit into
mainfrom
fix/sh-probe-test-missing-amd-helpers
Sep 21, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix/sh-probe-test-missing-amd-helpers

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

tests/sh/test_setup_gpu_summary_probe_sources.sh is red on main: 8 passed, 29 failed, with every failing case reporting _amd_prefer_discrete_gfx: command not found.

Cause

That test does not restate the probe logic, it pulls the real functions out of studio/setup.sh with sed and assembles a runnable block. #11437 added _amd_prefer_discrete_gfx and _amd_gfx_is_shadowing_integrated and called them from the selection block, but neither is one of the functions the test extracts, so the assembled block runs with both undefined and every case that reaches a discrete versus integrated choice dies instead of answering.

Bisected:

commit result
17e14909f~1 37 passed, 0 failed
17e14909f (#11437) 8 passed, 29 failed

The product code is fine. Both helpers are defined in studio/setup.sh and reachable at runtime; it is only the test's extraction that is short.

Fix

Both helpers are extracted into both halves the test builds (block.sh, and the split select.sh used by the arms that reach selection without probing), plus a guard that fails loudly if either stops arriving, the way the existing guards do for the record parsers.

Verification

  • tests/sh/test_setup_gpu_summary_probe_sources.sh on current main with this change: 37 passed, 0 failed.
  • Every other suite under tests/sh: green.

test_setup_gpu_summary_probe_sources.sh builds a runnable block by pulling named
functions out of studio/setup.sh. #11437 added _amd_prefer_discrete_gfx and
_amd_gfx_is_shadowing_integrated and called them from the selection block, but not from
a function the test extracts, so the block ran with both undefined: 8 passed, 29 failed,
every case that reaches a discrete versus integrated choice dying on command not found.

Both helpers are now extracted into both halves the test builds, and a guard fails
loudly if either stops arriving, the way the existing ones do for the record parsers.
37 passed, 0 failed on main, and every other suite under tests/sh stays green.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 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-21T23:06:16.132604Z fd24142 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.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 21, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: fd2414261d

ℹ️ 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 726c32a into main Sep 21, 2026
22 of 25 checks passed
@danielhanchen
danielhanchen deleted the fix/sh-probe-test-missing-amd-helpers branch September 21, 2026 23:09
danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Sep 22, 2026
…othai#11538)

The harness builds a runnable block by sed-ing named functions out of
studio/setup.sh. When setup.sh gains a helper and the selection block
calls it, nothing here notices until the block runs with it undefined,
and then every case that reaches the call dies on a bare "command not
found". unslothai#11437 did exactly that with _amd_prefer_discrete_gfx: 8 passed,
29 failed, and not one of the 29 named the cause.

unslothai#11472 added the helper to the sed lines and a named grep guard for it,
which fixes that helper and only that helper. The next one repeats it.

Give each extracted artifact a command_not_found_handle instead, so the
first call that is actually reached says which function is missing and
which sed line would supply it.

Reached, not merely present: setup.sh arms this test never takes do call
helpers it never extracts (the NVIDIA banner, the step/substep
printers), so a static scan of the text reports those as defects when
they are not. A static version of this guard failed the suite on all
three.
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
…unslothai#11472)

test_setup_gpu_summary_probe_sources.sh builds a runnable block by pulling named
functions out of studio/setup.sh. unslothai#11437 added _amd_prefer_discrete_gfx and
_amd_gfx_is_shadowing_integrated and called them from the selection block, but not from
a function the test extracts, so the block ran with both undefined: 8 passed, 29 failed,
every case that reaches a discrete versus integrated choice dying on command not found.

Both helpers are now extracted into both halves the test builds, and a guard fails
loudly if either stops arriving, the way the existing ones do for the record parsers.
37 passed, 0 failed on main, and every other suite under tests/sh stays green.
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
…othai#11538)

The harness builds a runnable block by sed-ing named functions out of
studio/setup.sh. When setup.sh gains a helper and the selection block
calls it, nothing here notices until the block runs with it undefined,
and then every case that reaches the call dies on a bare "command not
found". unslothai#11437 did exactly that with _amd_prefer_discrete_gfx: 8 passed,
29 failed, and not one of the 29 named the cause.

unslothai#11472 added the helper to the sed lines and a named grep guard for it,
which fixes that helper and only that helper. The next one repeats it.

Give each extracted artifact a command_not_found_handle instead, so the
first call that is actually reached says which function is missing and
which sed line would supply it.

Reached, not merely present: setup.sh arms this test never takes do call
helpers it never extracts (the NVIDIA banner, the step/substep
printers), so a static scan of the text reports those as defects when
they are not. A static version of this guard failed the suite on all
three.
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