Skip to content

Tests: catch up with four product changes that landed red on main - #13445

Merged
danielhanchen merged 1 commit into
mainfrom
ci-main-red-after-burst
Oct 12, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-main-red-after-burst

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Problem

Four product PRs merged on Oct 12 without the test changes they needed, so main fails 13 tests in four files. It shows on unrelated PRs such as #13425. All four are the test lagging the product; none of the product changes is wrong.

Failing test Introduced by Why
tests/test_return_logits_survives_for_training.py (4) #13392 merged after #13374 The test lifts FastLlamaModel.for_training into a stub namespace. #13374 made for_training call switch_training_mode(model, True, defer = True) and pass checkpointing to resolve_training_gradient_checkpointing. #13392's branch predated that, and its namespace returns None for unknown names, so it failed as TypeError: 'NoneType' object is not callable.
tests/studio/install/test_windows_torch_flavor_invariant.py (3) #13396 It added the causal-conv1d + mamba-ssm slot (base_total += 1, same gate as flash-attn) and _ensure_ssm_kernels() after _ensure_flash_attn() in step 13. The test pins both: assert 19 == 18, plus the step-13 call list.
tests/studio/test_token_count_prompt_parity.py (5) #13372 buildLocalTokenCountExtras now calls browserAgentToolsForTurn(), which reads useBrowserAgentStore. The harness defines no such store, so node fails with ReferenceError: useBrowserAgentStore is not defined.
tests/test_source_read_encoding.py[12] #13379 test_diffusion_mlx_engine_router.py:412 reads install_python_stack.py with a bare read_text().

I checked each product change before touching its test:

Fix

  • return_logits: stub switch_training_mode (returns ([], apply)) and the three-argument resolve_training_gradient_checkpointing / arm_gradient_checkpointing. for_training's namespace is now a _StrictNamespace that raises NameError naming any unstubbed global. The next drift will say what is missing instead of 'NoneType' object is not callable. The other lifted functions keep the lenient namespace, because they rely on optional names reading as None.
  • windows torch flavor: 19 for Windows and Linux with torch, and _ensure_ssm_kernels after _ensure_flash_attn in step 13. The no-torch and macOS totals are unchanged, as the gate excludes them.
  • token count parity: a useBrowserAgentStore stub backed by state.browserAgent, seeded with the store's defaults (enabled: false, historyAccess: "ask").
  • mlx router test: read_text(encoding = "utf-8").

Verification

main this PR
the four files above 13 failed 96 passed
studio/backend/tests/test_diffusion_mlx_engine_router.py 132 passed 132 passed
tests/test_formatter_fixed_point.py with the pinned ruff 16 passed

Sabotage, product changed, this PR's tests:

  • for_training no longer restores UNSLOTH_RETURN_LOGITS: 2 failed.
  • The causal-conv1d + mamba-ssm slot is removed from base_total: 2 failed.
  • The token count stops sending thread_id: 1 failed.

The other reds on #13425's run are already gone on main and are not touched here:

  • the formatter fixed point (since reformatted);
  • the Core zoo test_pypi_version_sync (zoo main is at 2026.10.4 again).

test_return_logits_survives_for_training lifts for_training into a stub namespace that predates #13374's switch_training_mode, so the missing name came back as None. Stub it and the three-argument resolve, and make that namespace raise NameError on any unstubbed name.
test_windows_torch_flavor_invariant: count #13396's causal-conv1d + mamba-ssm slot in the torch totals and its call in step 13.
test_token_count_prompt_parity: stub #13372's browser agent store with its defaults; the count and the request both call browserAgentToolsForTurn.
test_diffusion_mlx_engine_router (from #13379): read install_python_stack.py as UTF-8 for test_source_read_encoding.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 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-12T14:49:15.906373Z 074e784 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. 👍

Reviewed commit: 074e7844ee

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

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 12, 2026
@danielhanchen
danielhanchen merged commit 496a816 into main Oct 12, 2026
@danielhanchen
danielhanchen deleted the ci-main-red-after-burst branch October 12, 2026 14:56
danielhanchen added a commit that referenced this pull request Oct 12, 2026
…read (#13457)

codex_auth.asyncio is the asyncio module, so patching its sleep replaced asyncio.sleep for every event loop in the worker. A loop left running by an earlier test then spun on the instant fake and flooded the recorded sleeps, and the assert's repr of that list ran past the 330 s pytest-timeout (seen on #13445). Route other threads to the real sleep.
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