Repository navigation
fix: make Daybreak one toggle that follows the chat's model - #204302
Conversation
Each OpenAI model supports exactly one Daybreak program: mainline models take Daybreak Blue (or Standard), cyber models take Daybreak Red only. The chat popover still offered a Blue/Red chooser, so GPT-6 Cyber showed "Blue (unavailable)" next to "Red", and a chat that turned Blue on with GPT-6.2 Sol kept daybreak_blue after switching to GPT-6 Cyber. Every send then failed with an error that suggested selecting Standard, which a cyber model cannot run either. Daybreak is now one per-chat toggle in chat and new-session controls. The model's advertised programs decide Blue or Red, shown as a caption. Models that cannot run at Standard show the toggle locked on with "Required by this model". A model switch sends the remapped program in the same sessions.patch, new-session drafts submit the model's required program, and a stale saved program renders the toggle off so turning it on repairs the chat in place. The remembered Blue/Red preference is removed. Runtime errors in the embedded runner and Codex harness now name the supported programs and the next step.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: blocked before merge. What this changesThis PR replaces the Blue/Red chooser with a model-aware Daybreak toggle and remaps access when switching models. Example: Switch a chat using Daybreak Blue to a model requiring Daybreak Red.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep open: this PR addresses a concrete model-switch failure with approved direction, but introduces a mismatch between the displayed and submitted Daybreak setting in new drafts. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Control UI derives access controls from account-scoped model capabilities and sends session settings to the Gateway; embedded and Codex runtimes enforce the advertised programs before inference. flowchart LR
A[Account model catalog] --> B[Daybreak resolver]
B --> C[Chat controls]
B --> D[New session draft]
C --> E[Gateway session settings]
D --> E
E --> F[Runtime access guard]
F --> G[Provider request]
Technical reviewBest possible solution: Keep the shared resolver and atomic session patch, and use the same normalized access value for draft rendering and submission. Do we have a high-confidence way to reproduce the issue? Current-main source leaves the saved program unchanged during model switches, and the PR's Red-only draft fixture exposes the new display/submission divergence without executing target code. Is this the best way to solve the issue? The shared capability resolver and existing session mutation owner are appropriate, but draft presentation must consume the normalized value that submission uses. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f1debfde108a. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource -106, Tests -64, Docs +4. Total -166 across 35 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 23, 2026, 8:01 PM ET / November 24, 2026, 01:01 UTC. |
A new draft on a model that requires Daybreak Red displayed the catalog default (Standard) while submission normalized to Red. Drafts now render the same normalized program they submit. Adds a legacy stored-draft decode test for the retired remembered color.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a3e659af4
ℹ️ 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".
A new draft that starts on a Red-only model shows and submits Daybreak Red, but the model switch remapped from the raw catalog default (Standard), so switching to a mainline model dropped Daybreak. The switch now remaps from the same normalized program the draft displays and submits, carrying it over as Blue.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a5a4f5a4f5
ℹ️ 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".
When Daybreak was on only through the current model's configured default, switching to a model with the same program but a Standard default wrote nothing and Daybreak turned off. Chat and new-session model switches now store the destination's program whenever Daybreak stays on and that exact program is not already stored.
…daybreak-single-toggle # Conflicts: # scripts/check-control-ui-performance.mts
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…#204302) * fix(ui): make Daybreak one toggle that follows the model Each OpenAI model supports exactly one Daybreak program: mainline models take Daybreak Blue (or Standard), cyber models take Daybreak Red only. The chat popover still offered a Blue/Red chooser, so GPT-6 Cyber showed "Blue (unavailable)" next to "Red", and a chat that turned Blue on with GPT-6.2 Sol kept daybreak_blue after switching to GPT-6 Cyber. Every send then failed with an error that suggested selecting Standard, which a cyber model cannot run either. Daybreak is now one per-chat toggle in chat and new-session controls. The model's advertised programs decide Blue or Red, shown as a caption. Models that cannot run at Standard show the toggle locked on with "Required by this model". A model switch sends the remapped program in the same sessions.patch, new-session drafts submit the model's required program, and a stale saved program renders the toggle off so turning it on repairs the chat in place. The remembered Blue/Red preference is removed. Runtime errors in the embedded runner and Codex harness now name the supported programs and the next step. * fix(ui): resolve Daybreak test type import and record chat boot cost * fix(ui): show the Daybreak program a new draft will submit A new draft on a model that requires Daybreak Red displayed the catalog default (Standard) while submission normalized to Red. Drafts now render the same normalized program they submit. Adds a legacy stored-draft decode test for the retired remembered color. * fix(ui): carry a draft's required Daybreak program across model switches A new draft that starts on a Red-only model shows and submits Daybreak Red, but the model switch remapped from the raw catalog default (Standard), so switching to a mainline model dropped Daybreak. The switch now remaps from the same normalized program the draft displays and submits, carrying it over as Blue. * fix(ui): keep an inherited Daybreak program on across model switches When Daybreak was on only through the current model's configured default, switching to a model with the same program but a Standard default wrote nothing and Daybreak turned off. Chat and new-session model switches now store the destination's program whenever Daybreak stays on and that exact program is not already stored.
…l UI (#204325) * fix(agents): default Access to a model's only advertised program Cyber models advertise only Daybreak Red and reject Standard, but the runtime default fell back to Standard whenever no accessPrograms.cyber was configured, so unconfigured cyber-model turns outside the Control UI failed with invalid_access_program. The default now follows the selected account's advertised programs from the prepared model catalog for both the catalog projection and the physical request. * test(agents): satisfy test typecheck for Access default contracts * test(agents): give the overflow-compaction runtime fixture its isCurrent contract * fix(agents): read advertised Access programs only on routes that send one Dispatch now skips the prepared-catalog account read for providers and routes that never send an Access program, so non-OpenAI turns do no extra account-catalog work. The default resolver and dispatch share one route predicate. (cherry picked from commit 862c71e) Release adaptation: Keep stable's Daybreak toggle and separate Access selector wording; document the advertised single-program default and stale-choice error without importing the UI behavior from #204302. Include eccac8a (#204461), which keeps the attempt lookup private and tests the dispatch wrapper. Role, current-account, and entitlement checks are unchanged. Later same-file changes not needed: a1ba2bc (#204545) is newer Control UI behavior; d2699a8 (#204847) adds separate participation limits; f00839d adds MCP requester propagation; 26f82df (#205687) adds streaming preflight progress; 41dc731 (#195479) retains transcript targets across catalog reloads; 4ff18a0 changes project-move prompt inputs. None is a dependency of the Access default. Co-authored-by: RomneyDa <[email protected]>
Release adaptation: Use the advertised program at the stable chat switch and draft submission owners; keep the account fence, existing settings field, confirmation path and native guards. Do not import the toggle/persistence redesign. Pinned companion audit: No pinned #204302 or source-SHA follow-up cites this fix. Later switch, persistence, and visual changes are not prerequisites for the same-account remap. (cherry picked from commit 5a4cb12) Co-authored-by: RomneyDa <[email protected]>
* fix(ui): make Daybreak one toggle that follows the model Each OpenAI model supports exactly one Daybreak program: mainline models take Daybreak Blue (or Standard), cyber models take Daybreak Red only. The chat popover still offered a Blue/Red chooser, so GPT-6 Cyber showed "Blue (unavailable)" next to "Red", and a chat that turned Blue on with GPT-6.2 Sol kept daybreak_blue after switching to GPT-6 Cyber. Every send then failed with an error that suggested selecting Standard, which a cyber model cannot run either. Daybreak is now one per-chat toggle in chat and new-session controls. The model's advertised programs decide Blue or Red, shown as a caption. Models that cannot run at Standard show the toggle locked on with "Required by this model". A model switch sends the remapped program in the same sessions.patch, new-session drafts submit the model's required program, and a stale saved program renders the toggle off so turning it on repairs the chat in place. The remembered Blue/Red preference is removed. Runtime errors in the embedded runner and Codex harness now name the supported programs and the next step. * fix(ui): resolve Daybreak test type import and record chat boot cost * fix(ui): show the Daybreak program a new draft will submit A new draft on a model that requires Daybreak Red displayed the catalog default (Standard) while submission normalized to Red. Drafts now render the same normalized program they submit. Adds a legacy stored-draft decode test for the retired remembered color. * fix(ui): carry a draft's required Daybreak program across model switches A new draft that starts on a Red-only model shows and submits Daybreak Red, but the model switch remapped from the raw catalog default (Standard), so switching to a mainline model dropped Daybreak. The switch now remaps from the same normalized program the draft displays and submits, carrying it over as Blue. * fix(ui): keep an inherited Daybreak program on across model switches When Daybreak was on only through the current model's configured default, switching to a model with the same program but a Standard default wrote nothing and Daybreak turned off. Chat and new-session model switches now store the destination's program whenever Daybreak stays on and that exact program is not already stored. (cherry picked from commit 5a4cb12) Release adaptation: Preserve the beta release chat-boot budget and its existing single-program default documentation; do not import main-only budget increases. Co-authored-by: RomneyDa <[email protected]>
What Problem This Solves
Each OpenAI model supports exactly one Daybreak program: mainline models (GPT-6.2 Sol and similar) take Daybreak Blue or Standard, while cyber models (GPT-6 Cyber, GPT-5.6 Cyber) take Daybreak Red only. The chat speed menu still offered a Blue/Red chooser, so GPT-6 Cyber showed "Blue (unavailable)" next to "Red", which reads as if access were missing. Worse, a chat that turned on Blue with GPT-6.2 Sol kept
daybreak_blueafter switching to GPT-6 Cyber. Every send then failed with "This Daybreak program is not advertised… Select Standard", and Standard cannot run a cyber model either. New chats on an unconfigured cyber model also started at Standard.User Impact
Daybreak is one on/off toggle per chat. The model decides Blue or Red and the toggle shows it as a caption. Cyber models show the toggle locked on with "Required by this model". Switching models carries Daybreak along, so Blue becomes Red on a cyber model (and back to Blue on a mainline model) in the same update as the model change. A chat that already stores the wrong program shows the toggle off, and turning it on repairs it in place. Runtime errors now name what the model supports and the next step.
Behavior note: choosing a cyber model turns Daybreak on, and it stays on (as Blue) when the chat switches back to a mainline model. It is visible there and can be turned off.
Why This Change Was Made
ui/src/lib/chat/daybreak-access-program.ts) derives the program, locked state, checked state, and model-switch remap from the model's advertisedavailableAccessPrograms.cyber. Chat controls, chat model switches, and new-session drafts all use it.modeland the remappedcyberAccessProgramin onesessions.patch(also through native-runtime recovery). New-session drafts submit the model's required program.daybreakAccessProgram) is removed; legacy stored drafts and preferences still decode and drop the field. It was never part of the Gateway protocol.Out of scope, named on purpose: sessions created outside the Control UI on an unconfigured cyber model still get the server's
standarddefault (resolveModelCyberAccessProgramDefault) and fail untilparams.accessPrograms.cyberis configured; that runtime default is a separate follow-up. A remap that an operator role ceiling rejects fails the model switch; restricted roles get Standard only, so this is not reachable with default roles.Evidence
Synthetic Control UI E2E fixtures (mocked Gateway, synthetic models and chat), dark theme, 1440×900, speed popover open. Before =
mainat 34c8570, after = this branch.Clean comparison
GPT-6 Cyber chat that still stores Daybreak Blue (the reported failure):
Annotated comparison
Other states
Behavior proof:
ui/src/e2e/chat-daybreak-controls.e2e.test.ts(4 cases): mainline toggle writesdaybreak_blue; cyber model renders locked Red; switching GPT-6.2 Sol (Blue) → GPT-6 Cyber through the model picker sends onesessions.patchwithmodelandcyberAccessProgram: "daybreak_red"(this case fails onmain: the patch carried only the model); a stale Blue on GPT-6 Cyber renders unchecked and turning it on sendsdaybreak_red, after which it is locked with caption "Red" (fails onmain).ui/src/e2e/chat-daybreak.real-gateway.e2e.test.ts(3 cases) passed against a built, isolated Gateway with synthetic provider I/O.src/agents/embedded-agent-runner/run/access-program.test.tsandextensions/codex/src/app-server/run-attempt.native-config.test.tscover the new error guidance.pnpm tsgo:prod,pnpm tsgo:ui, oxlint and format on touched files, stylelint oncomposer.css,pnpm ui:i18n:baseline/verify(no baseline drift),pnpm check:test-lines-ratchet(net −170 test lines),git diff --check.Review follow-up (head 245be29):
accessProgramForSubmission(), the same value they submit, so the toggle shows locked Red before sending. The restored testcommits the displayed first-use Access as daybreak_redfailed before this fix and passes now. Existing chats keep the separate stale-program repair.ui/src/lib/chat/composer-draft-store-codec.test.tsloads an IndexedDB draft that still carries the retireddaybreakAccessProgram, keepingcyberAccessProgramand dropping the old field.ui/src/pages/new-session/preferences.test.tsdoes the same for authenticated new-session preferences. No Gateway protocol, config, or server-side state changed, so there is no Doctor or upgrade migration.CI notes (head 3598443):
chatBootJsGzipBytesis raised by exactly that measured cost plus 64 B headroom, with a provenance comment inscripts/check-control-ui-performance.mts. New-session boot grew +151 B and stays within its limit.CyberAccessProgramnow comes from the gateway-protocol schema module) that brokecheck-test-types-core-2.extensions/codexapp-server tests (host credential execution, compaction model policy, parent continuation) still fail locally.test/vitest-projects-config.test.tsfailed becausesrc/shared/session-unread.test.ts(from fix(sessions): unread advances only when a run ends with a new visible reply #204281) had two owners; main fixed that in test(vitest): keep database-worker files out of the shared-core project #204316, so head 1a3e659 merges current main and the test passes locally (42/42).boot-module-boundaries,session-catalog-backoff, andsigned-call-boundarypass locally. The gateway e2e shards that failed don't involve the touched code, and main's hourly full CI is red across similar shards.Live context: the reported failure reproduced on a real Gateway (GPT-6.2 Sol with Blue → GPT-6 Cyber); this PR's flow was verified with mocked/isolated Gateways, not yet on that deployment.
Release note context: Control UI: Daybreak is now a single per-chat toggle; the model picks Blue or Red, cyber models show it locked on, and model switches carry Daybreak over instead of failing with an unavailable-program error.