fix(sessions): preserve compatible auth overrides#81886
Conversation
|
Codex review: passed. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. by source inspection: current main reaches the PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the alias-aware preservation path after maintainer auth-provider review and latest-head checks; request a live Dashboard smoke only if UI-level assurance is required. Do we have a high-confidence way to reproduce the issue? Yes by source inspection: current main reaches the Is this the best way to solve the issue? Yes. The PR uses the existing model override preservation hook plus the canonical provider-auth alias resolver, which is the narrow maintainable path; latest-head validation should still gate the auth-provider merge risk. Label changes:
Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 1b1580cbc3f5. |
This comment was marked as low quality.
This comment was marked as low quality.
e8e3d28 to
fba3d55
Compare
fba3d55 to
a70d8c3
Compare
|
Rebased this branch onto current Validation run:
Author attribution verified with |
|
Merged current Validation run locally on
|
b22c36f to
62c1a04
Compare
|
Rebased this onto current Validation:
I also verified every commit on the PR branch uses |
|
@clawsweeper automerge |
|
🦞🔧
Draft PRs stay fix-only until GitHub marks them ready for review. Pause with Automerge progress:
|
|
🦞✅ Source: Why human review is needed: Recommended next action: I added |
|
@Takhoffman Could you make the final maintainer call here or route this to the right auth/provider owner? The earlier merge gate from @stielemans called out the merge conflict plus alias-aware auth compatibility. The current head is clean, includes the Since ClawSweeper paused automerge for human review on this auth-provider path, I’m leaving the final risk/merge decision with maintainers. |
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Mossy Branchling Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
ClawSweeper 🐠 reef update Thanks for the work on this. ClawSweeper did not have permission to update this branch directly, so it opened a narrow replacement PR instead. that's a branch access thing, not a knock on the contribution. Why replacement: ClawSweeper could not update the source PR branch directly; GitHub did not grant sufficient push rights to the bot for that branch.
fish notes: model gpt-5.5, reasoning high; reviewed against 64a0739. |
Summary
sessions.patchswitches to another model for the same provider.Fixes #81837.
Real behavior proof
sessions.patchwith only a model ref; that path no longer drops a compatibleauthProfileOverrideand no longer forces the selected model into an auth failure/fallback path.applySessionsPatchToStoreimplementation fromsrc/gateway/sessions-patch.ts.PATH=/Users/andy/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH node --import tsx --input-type=modulewith a local proof harness that applies twosessions.patchmodel updates to real session entries: Anthropic-to-Anthropic and Anthropic-to-OpenAI.sessions.patchproof harness:{ "sameProvider": { "providerOverride": "anthropic", "modelOverride": "claude-sonnet-4-6", "authProfileOverride": "anthropic:default", "authProfileOverrideSource": "user", "authProfileOverrideCompactionCount": 3, "liveModelSwitchPending": true }, "providerChange": { "providerOverride": "openai", "modelOverride": "gpt-5.4", "authProfileOverride": null, "authProfileOverrideSource": null, "authProfileOverrideCompactionCount": null, "liveModelSwitchPending": true } }anthropic/claude-opus-4-6toanthropic/claude-sonnet-4-6preservedauthProfileOverride: "anthropic:default", while a patch from Anthropic to OpenAI cleared the provider-prefixed auth profile.sessions.patchRPC implementation used by the Dashboard.Validation
PATH=/Users/andy/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH pnpm test src/gateway/sessions-patch.test.ts src/sessions/model-overrides.test.ts src/auto-reply/reply/directive-handling.model.test.ts src/agents/auth-profiles/session-override.test.tsPATH=/Users/andy/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH pnpm exec oxfmt --check --threads=1 src/gateway/sessions-patch.ts src/gateway/sessions-patch.test.tsgit diff --checkPATH=/Users/andy/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH pnpm check:changed -- --base upstream/main --head HEADNotes
Local Homebrew Node is currently missing
libsimdjson.31.dylib, so validation and proof commands used the bundled Node runtime path shown above. If this PR is squashed or reworked, please preserve author attribution or include:Co-authored-by: Andy Ye 35905412+TurboTheTurtle@users.noreply.github.com