Skip to content

Fix trial model selection during save recovery - #519

Merged
johnlanni merged 3 commits into
mainfrom
codex/fix-trial-recovery-selection
Nov 19, 2026
Merged

johnlanni merged 3 commits into
mainfrom
codex/fix-trial-recovery-selection

Conversation

@johnlanni

@johnlanni johnlanni commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Keep the trial model and connection in one selection. A default queued by the return-to-trial availability refresh applies only to the selection that found it, so switching models as soon as the form becomes enabled keeps the correct binding.
  • Treat a change to the first regular model in Review changes as a new trial selection when returning to setup. Refreshing an earlier save result preserves that choice and offers the recovered model for explicit selection.

Follow-up to #518.

Verification

  • The immediate-switch regression holds the refresh triggered by Back to trial, switches models when the form becomes enabled, and checks the selected model and exact connection. It reproduces the race on e71ff5d8f and passes on 2e6844bf1.
  • The review regression changes the first regular model while a save result awaits verification, returns to setup, and reopens and refreshes the earlier result. It reproduces the unwanted switch on ed0cb5a2b. On 2e6844bf1 it keeps the new binding, offers the recovered model for explicit use, and records exactly one apply_compute_save call.
  • All 54 trial setup scenarios, 21 recommendation scenarios, and 16 connection reuse scenarios passed in Chrome with synthetic host calls.
  • The Desktop build, 483 Desktop tests, and 24 contract convergence tests passed. The convergence checker reported green.

Keep the model choice and connection binding together so a delayed default from the previous model cannot overwrite a newer choice. Reproduce the refresh race and verify that reopening a saved result only applies it on explicit selection.

Signed-off-by: 澄潭 <zty98751@alibaba-inc.com>
Treat a changed regular model binding as a newer selection when leaving review. Reopening the old save result then preserves that selection and reuses the original save.

Signed-off-by: 澄潭 <zty98751@alibaba-inc.com>
…ery-selection

Signed-off-by: 澄潭 <zty98751@alibaba-inc.com>
@johnlanni
johnlanni merged commit 2f31fb4 into main Nov 19, 2026
8 checks passed
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