Skip to content

Fix three tests red on main after #12431, #12408 and #12382 - #12441

Merged
danielhanchen merged 1 commit into
mainfrom
fix/main-red-contracts-oct1
Oct 1, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix/main-red-contracts-oct1

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Problem

Three tests are red on main (407246cc9), so every PR picks them up (seen on #12433). Each comes from a deliberate product change that a test pinned too tightly. In every case the product is right and the test is wrong.

Test Introduced by What changed
tests/studio/test_settings_compact_overflow_contract.py::test_api_monitor_entries_and_expanded_text_can_shrink #12431 "keep rounded boxes rounded when they scroll" added scroll-rounded inside the API monitor's text box class string, which the test matched as one exact substring
studio/backend/tests/test_diffusion_memory.py::test_top_level_group_counts_against_the_running_pin_total #12408 (Qwen-Image-2.1 placement) the new test expects _pin_top_level_group to pin, but Tensor.pin_memory() raises Cannot access accelerator device when none is available on the CPU runners, so the function correctly returns False
studio/backend/tests/test_video_chat_completions_behaviour.py::test_the_text_of_the_turn_survives_translation #12382 "keep a local model's built-in system prompt when the date setting is on" with no system prompt, the date note now leads the chat's first message as [Current date: YYYY-MM-DD]\n\n, so the user text arrives as [Current date: 2026-10-01]\n\nwhat colour?

Fix (tests only)

  • API monitor: read the class lists token by token. Every wrapped, rounded text box must still carry max-h-72, overflow-auto and break-words; added tokens such as scroll-rounded no longer matter.
  • Pin running total: the test is about the budget accounting, not page locking, so a plain host copy stands in for Tensor.pin_memory (monkeypatched for this test only). The accounting now actually runs on CPU CI instead of failing at the pin. The real pinning is still covered by the two ..._on_a_real_gpu tests, which skip without CUDA.
  • Video turn text: a text part must be exactly what colour?, optionally preceded by that one date note. Any other rewrite of the user's text still fails.

Verification

  • All three files: 155 + 78 passed (4 skipped are the GPU-only tests).
  • Sabotage, each failing the matching test:
    • removing max-h-72 from the API monitor text box;
    • making _pin_top_level_group ignore the running total (already = 0), which lets the over-budget call pin;
    • appending text to the user's text part inside _translate_video_parts.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 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-01T14:13:30.933946Z 38827d6 Manual request
🔒 Security Review ⚠️ Failed 2026-10-01T14:11:43.343789Z 38827d6 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. Nice work!

Reviewed commit: 38827d6c1e

ℹ️ 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 a334038 into main Oct 1, 2026
2 of 36 checks passed
@danielhanchen
danielhanchen deleted the fix/main-red-contracts-oct1 branch October 1, 2026 14:52
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