GeezerVison is showing github.com — fix(core): Codex credential sync never targets the self-contained _openai door (code#8163) by dezren39 · Pull Request #2250 · developing-today-forks/opencode
Conversation
What this does
developing-today/code#8163 (Drew, 2026-11-10): "make _openai that does it all without codex" — a self-contained _openai door for the drewrypope ChatGPT account that holds its own credential and refreshes it in-process, with no Muse / ~/.codex/auth.json / codex-sync anywhere in its path.
The door itself rides the fork's existing instance machinery, by design:
- Config seats
_openai as instanceOf: "openai" (developing-today/code config PR), so OpenAIPlugin runs its body for the _openai integration: the fork's existing ChatGPT OAuth methods (browser + headless/device) are registered for it, its credential is resolved — and refreshed in-process when near expiry — by Integration.connection.resolve, and it serves direct HTTPS to the ChatGPT backend, exactly like openai.alternate already self-renews (🐛 Bug Report: MCP Tool JSON Parsing Errors on OpenCode (GLM-4.7) anomalyco/opencode#8102 audit).
- Its credential is seeded from the currently-valid drewrypope tokens WITHOUT the
externalRefresh stamp that codex-sync writes, so resolve owns its refresh from the first cycle.
This PR
CodexSync.selectTarget previously excluded _openai only as a side effect of its openai / openai.* name filter. That is exactly the kind of implicit exclusion that silently breaks the next time someone widens the door search (which is how the instance-door bug behind #2237 happened in the other direction). This change:
- Adds
CodexSync.selfContainedIntegrationID (_openai) and excludes it explicitly in selectTarget, with the reasoning recorded in the module header.
- Adds a regression test: a
_openai credential whose account matches the Muse auth file is never synced — syncOnce reports no-credential and the row is left byte-identical, with no externalRefresh stamp added.
Tests
packages/core/test/credential-codex-sync.test.ts: 14/14 pass (13 existing + 1 new). Note the new test also passes on the unpatched source today — it locks in the exclusion as explicit policy + coverage against the filter widening, rather than fixing a live mis-targeting.
Refs developing-today/code#8163, anomalyco#7991, anomalyco#5705, anomalyco#8102.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 10, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Caution
Review failed
The pull request is closed.
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 10, 2026
This was referenced Nov 27, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.