Remove OAuth sidecar credential runtime support#82777
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: not applicable. This PR is an auth-storage cleanup rather than a standalone bug report. Current-main and PR-head source inspection show the before/after Real behavior proof Next step before merge Security Review detailsBest possible solution: Keep this PR open for human maintainer/security review, green or accepted CI, and explicit acceptance of the inline Codex OAuth credential contract before landing. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR is an auth-storage cleanup rather than a standalone bug report. Current-main and PR-head source inspection show the before/after Is this the best way to solve the issue? Yes, with maintainer sign-off: moving compatibility into What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against c2e90914b735. |
c97241b to
4d10c46
Compare
|
This was helpful refactoring, but the "leaving undecryptable sidecars in place with a warning" behavior caught us silently on upgrade — the legacy Suggestion: when migration cannot inline a legacy sidecar, Repro: a profile authored via |
* fix(auth): remove oauth sidecar runtime support * docs(changelog): note oauth sidecar removal
* fix(auth): remove oauth sidecar runtime support * docs(changelog): note oauth sidecar removal
* fix(auth): remove oauth sidecar runtime support * docs(changelog): note oauth sidecar removal
* fix(auth): remove oauth sidecar runtime support * docs(changelog): note oauth sidecar removal
* fix(auth): remove oauth sidecar runtime support * docs(changelog): note oauth sidecar removal
* fix(auth): remove oauth sidecar runtime support * docs(changelog): note oauth sidecar removal
* fix(auth): remove oauth sidecar runtime support * docs(changelog): note oauth sidecar removal
* fix(auth): remove oauth sidecar runtime support * docs(changelog): note oauth sidecar removal
* fix(auth): remove oauth sidecar runtime support * docs(changelog): note oauth sidecar removal
* fix(auth): remove oauth sidecar runtime support * docs(changelog): note oauth sidecar removal
* fix(auth): remove oauth sidecar runtime support * docs(changelog): note oauth sidecar removal
* fix(auth): remove oauth sidecar runtime support * docs(changelog): note oauth sidecar removal
* fix(auth): remove oauth sidecar runtime support * docs(changelog): note oauth sidecar removal
Summary
oauthRefsidecar-backed Codex OAuth credentials and persist OAuth credentials inline with the existingauth-profiles.jsonpattern.Verification
.agents/skills/codex-review/scripts/codex-review --mode localexited clean with no accepted/actionable findings.node scripts/run-vitest.mjs src/commands/doctor-auth-oauth-sidecar.test.ts src/commands/doctor/repair-sequencing.test.ts src/commands/doctor/shared/stale-oauth-profile-shadows.test.ts src/commands/agents.add.test.ts src/agents/auth-profiles/portability.test.ts src/agents/auth-profiles.store.save.test.ts src/agents/auth-profiles/credential-state.test.ts src/agents/auth-profiles/persisted-boundary.test.ts src/agents/auth-profiles/profiles.test.ts extensions/codex/src/app-server/auth-bridge.test.tsgit diff --checknode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental false --pretty falseaws, idcbx_c9433cd7114f(jade-prawn). The OAuth exchange completed successfully, and redacted inspection showed anopenai-codexOAuth profile with inline access and refresh credential material, account metadata present, and nooauthRef.Real behavior proof
Behavior addressed: legacy Codex OAuth profiles that used
oauthRefsidecar credentials are no longer readable by broad runtime code;openclaw doctor --fixmigrates affected profiles back to inline credentials and removes only sidecar files it successfully migrated. Normal ChatGPT/Codex onboarding and auth setup continue to persist credentials through the inlineauth-profiles.jsonpattern instead of the removed sidecar/keychain path.Real environment tested: Blacksmith Testbox through Crabbox, provider
blacksmith-testbox, idtbx_01krsh6ah3v9sk9h5g7vrq64a7, Actions run25975545206; AWS Crabbox WebVNC live OAuth proof, provideraws, idcbx_c9433cd7114f(jade-prawn); and local manual onboarding verification from this branch.Exact steps or command run after this patch:
git diff --check, core test typecheck vianode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental false --pretty false, and the focused Vitest command covering doctor migration, auth persistence, agent-copy behavior, stale OAuth shadow cleanup, and Codex auth bridge behavior. For live proof, ranpnpm openclaw models auth login openai-codexin the remote desktop session, completed the OpenAI browser OAuth flow, then inspected only redacted auth profile shape and credential-presence booleans. For local manual proof, ran the onboarding/auth flows for ChatGPT/Codex device pairing, browser login, and API key setup.Evidence after fix: remote Testbox proof passed 12 test files and 112 tests, including repro coverage for migrating encrypted legacy sidecars back to inline OAuth credentials, leaving undecryptable sidecars in place with a warning, avoiding unsafe deletion of unreferenced sidecars, and removing only successfully migrated sidecar files. The live Codex OAuth proof produced an
openai-codexOAuth profile with inline access and refresh credential material, expected account metadata, andoauthRefabsent. Local manual validation confirmed the three expected ChatGPT/Codex setup paths completed successfully: device pairing, browser login, and API key.Observed result after fix: the runtime path no longer treats
oauthRefas usable credential material, copied OAuth profiles require inline token material, doctor owns the one-time migration off of the sidecar/keychain pattern, and fresh ChatGPT/Codex onboarding/auth setup still succeeds without writing a sidecar reference.What was not tested: full repository test suite. CI has run for this PR; current remaining failures outside Real behavior proof match failures observed on latest
mainand were not caused by this branch.