Skip to content

Fix test_every_resolver_probe_forwards_the_trust_decision on main - #14990

Merged
danielhanchen merged 1 commit into
mainfrom
fix-non-vlm-probe-trust
Oct 23, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix-non-vlm-probe-trust

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

tests/test_remote_code_class_and_expert_submodules.py::test_every_resolver_probe_forwards_the_trust_decision fails on main since #14945:

AssertionError: ('unsloth.models.loader', 839)

That test statically requires every resolve_model_class probe to pass trust_remote_code or splat _probe_hub_kwargs. _resolve_non_vlm_auto_model (added in #14945) received the same _probe_hub_kwargs dict from FastModel.from_pretrained, so trust_remote_code was already forwarded, but it splatted it under the name hub_kwargs, which the check does not recognise.

This renames the helper's keyword collector to _probe_hub_kwargs. No behaviour change. The test fails on main and passes here; tests/test_audio_load_routing.py and tests/python/test_feature_extractor_only_checkpoints.py still pass.

@danielhanchen danielhanchen self-assigned this Oct 23, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 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-10-23T14:37:06.377000Z fec709b 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

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

Reviewed commit: fec709b489

ℹ️ 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 042a717 into main Oct 23, 2026
17 of 37 checks passed
@danielhanchen
danielhanchen deleted the fix-non-vlm-probe-trust branch October 23, 2026 16:14
danielhanchen added a commit that referenced this pull request Oct 23, 2026
Four checks fail on `main` (fd924a5), so every open PR inherits them.
Each was reproduced on a clean `main` worktree and attributed. A fifth,
`test_every_resolver_probe_forwards_the_trust_decision`, was fixed on
`main` by #14990 in the meantime, so this PR takes that version.

| Check | Introduced by | Wrong side | Fix |
|---|---|---|---|
|
`studio/backend/tests/test_text_io_encoding.py::test_text_io_names_its_encoding[_xpu_triton_toolchain.py]`
| #14814 | Product | The `vswhere` call used `text=True` with no
encoding, so it decoded with the locale code page. A Visual Studio
install path with non-ASCII characters would garble. It now passes
`-utf8` to vswhere and decodes as UTF-8 (`errors="replace"`). |
|
`tests/python/test_accelerator_skip_guards.py::test_no_skip_guard_reads_a_spoofable_accelerator_probe`
| 0947723 | Test | `test_packed_fp32_cuda_parity` skipped on
`torch.cuda.is_available()`, which the CPU CI spoof answers True. It is
now gated on `has_real_cuda()`, same as the sibling attention tests. |
|
`tests/studio/test_usage_examples_model_source_contract.py::test_examples_never_print_a_hardcoded_model_id`
| #14914 | Test | #14914 deliberately renders the example with a
`YOUR_MODEL` placeholder when nothing is servable, instead of hiding it.
The test still asserted the old "no snippet" shape. |
|
`tests/test_fp8_pre_sm89_byte_dequant.py::test_kill_switch_env_is_read_at_import`
| #14936 | Test | The subprocess imports `unsloth` in a fresh
interpreter that has no conftest spoof, so on CPU CI the import raised
"cannot find any torch accelerator" before the switch was read. With no
GPU, the subprocess now applies `tests/_zoo_aggressive_cuda_spoof.py`,
the same pattern `test_qat_phone_deployment.py` uses. It now checks both
`0` and `1`. |

For the third check, the invariant is unchanged: no hardcoded
`unsloth/...` id and no `MODEL_FALLBACK`. The test now also pins the new
contract:
- the placeholder constant
- the `model ?? MODEL_PLACEHOLDER` call as the only `buildSnippets` call
site
- the no-model note rendering exactly when the placeholder is shown

## Verification

- On `main` before #14990: 4 failed in `tests/` and 1 failed in
`studio/backend/tests`.
- On this branch: `test_accelerator_skip_guards.py`,
`test_usage_examples_model_source_contract.py` and
`test_attention_packed_fp32_routing.py` give 48 passed, 1 skipped. With
the two new files and `test_audio_load_routing.py` added, the run gives
94 passed, 133 skipped. `test_text_io_encoding.py` and
`test_xpu_triton_toolchain_14807.py` give 904 passed.
- Sabotage check: hardcoding `_HIP_FP8_BYTES_DEQUANT = True` fails the
kill-switch test.
- Sabotage check: both edits below make the updated contract test fail.
  - Changing the placeholder to `"unsloth/Qwen3-4B"`.
  - Dropping the `model ? null :` gate on the note.
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