Skip to content

Tests: picker superseded-plan contract allows the pick release added in #18420 - #18536

Merged
danielhanchen merged 1 commit into
mainfrom
ci/picker-superseded-plan-test-follow-18420
Nov 19, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci/picker-superseded-plan-test-follow-18420

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Repo tests (CPU, studio) fails on main (seen on #18444):

FAILED tests/studio/test_model_picker_contracts.py::test_a_plan_that_lands_after_a_newer_pick_is_dropped
E   AssertionError: features/images/images-page.tsx: a superseded plan is not dropped

Root cause

#18420 added dropReleasedPick(ownRevert); to both superseded-plan guards in images-page.tsx's loadOrStage, between pickToast.dismiss(pickToastId); and return true;, so a pick released while it was the newest is cleaned up. The behaviour this test protects is unchanged: a plan that lands after a newer pick still returns true (started), so its rollback does not fire at the newer pick's label. The test's regex allowed only the toast dismiss before the return, so it no longer found either guard.

Changes

  • Both regexes in the test now allow plain call statements (name(...);) between the toast dismiss and the return, and still require the guard's condition and return true / the fallback-load ordering exactly as before. One line says why.

Test-only change.

Testing

  • pytest tests/studio/test_model_picker_contracts.py: 205 passed (the test fails on main).
  • Sabotage: turning the first guard's return true; into return false; fails the test ("a superseded pick reports failure").

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T22:34:03.721219Z ef62686 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.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: ef62686562

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

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