GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — _openai provider: self-contained main OpenAI door that does it all without Codex (Drew top priority) · Issue #8163 · developing-today/code

_openai provider: self-contained main OpenAI door that does it all without Codex (Drew top priority) #8163

New issue
Copy link
New issue
Copy link
Closed
Closed
_openai provider: self-contained main OpenAI door that does it all without Codex (Drew top priority)#8163
Copy link
Labels
expediteImportant - do this very soon, before anything not expeditedstatus:done

Description

@dezren39
dezren39
opened on Nov 10, 2026
Issue body actions

Drew's direct order (2026-11-10, pool-intelligence chat) — TOP PRIORITY

"make _openai that does it all without codex" — supersedes the prove-the-Codex-sync mandate for the openai.main door.

Problem

The openai.main door's credential is fed by the Muse: codex-sync.ts copies ~/.codex/auth.json into the store and stamps the credential externalRefresh, so the provider itself never refreshes it. When the sync path broke, the door auth-died for ~a day (0/9,897 Authentication on 2026-11-10's pool-intelligence window) while quota reads called it healthy. openai.alternate already proves the self-renewing pattern: its own in-store OAuth credential (chatgpt-headless), refreshed in-process, no Codex involvement (#8102 self-renewal audit).

Build

A self-contained _openai provider door for the drewrypope ChatGPT account:

  • Own credential in the OpenCode credential store under its own integration id, obtained via the fork's existing OpenAI OAuth flows (seeded from the currently-valid drewrypope tokens if that avoids a fresh consent; the seeded row must NOT carry the externalRefresh stamp).
  • Own refresh token, refreshed in-process by the provider (Integration connection resolve), exactly like openai.alternate. No reading ~/.codex/auth.json, no codex-sync in its path, no Muse involvement at any point.
  • Direct HTTPS plan auth to the ChatGPT backend in-process (native openai provider wire), no proxy hop.
  • The Codex sync must never write this door's credential (explicit guard + test in the fork).
  • Config: seat _openai as the main door in openai-plan (replacing openai.main's seat; openai.alternate untouched). Keep the openai.main definition until _openai is proven, then retire the Codex-sync dependency for the main door.

Proof standard (traffic, never a quota read alone)

  • route_attempt rows under the _openai provider id: successes, or — while the weekly quota wall lasts (reset Fri Nov 13 08:28 CST) — attempts that pass auth and fail only QuotaExceeded.
  • A successful in-process token refresh cycle in the provider's own store with ~/.codex/auth.json untouched/unread.
  • Negative proof: the door still works with the Codex sync path disabled for it.

Refs: #7991 (closed, the auth-death incident), #5705 (Luna re-lead off openai.main), #8102 (self-renewal audit). Fork: developing-today-forks/opencode.

Activity

Next
  1. dezren39
    added
    expediteImportant - do this very soon, before anything not expedited
    on Nov 10, 2026
  2. developing-today commented on Nov 10, 2026

    @developing-today
    developing-todayBot
    on Nov 10, 2026 – with developing.today
    Contributor
    More actions

    CODE-2410

  3. developing-today
    added
    status:in-review
    on Nov 10, 2026
  4. dezren39
    added a commit that references this issue on Nov 10, 2026

    Merge pull request #8165 from developing-today/feat/8163-openai-door

    463ded4
  5. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 10, 2026
  6. developing-today
    closed this as completedon Nov 10, 2026
  7. dezren39
    added a commit that references this issue on Nov 10, 2026

    Merge pull request #8167 from developing-today/chore/8163-opencode-pi…

    58369f9
  8. developing-today
    added
    status:in-review
    and removed
    status:done
    on Nov 10, 2026
  9. developing-today
    reopened this on Nov 10, 2026
  10. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    Progress — build chain complete, deploy in flight

    • Fork: fix(core): Codex credential sync never targets the self-contained _openai door (code#8163) developing-today-forks/opencode#2250 MERGED (6cc10dae) — CodexSync explicitly never targets the self-contained _openai door (guard + regression test, 14/14 in credential-codex-sync.test.ts). The door itself rides the fork's instance machinery: OpenAIPlugin registers the existing ChatGPT OAuth flows (browser + headless/device) for the _openai integration and Integration.connection.resolve refreshes its credential in-process, exactly like openai.alternate (Provider self-renewal audit 2026-11-09 — every door checked against Drew's rule (all providers renew themselves) #8102).
    • Config stage 1: feat(config): add self-contained _openai door definition (#8163, stage 1) #8165 MERGED (463ded4) — _openai provider definition added (instanceOf: openai), openai-plan unchanged until proof.
    • Pin: chore(nix): bump opencode pin to 6cc10dae — CodexSync never targets _openai (#8163) #8167 MERGED (58369f9) — opencode pin ba0e822 → 6cc10dae.
    • Credential seeded: new row under integration _openai (account drewrypope), copied from the currently-valid main tokens WITHOUT the externalRefresh stamp, method chatgpt-headless, expiry set to now so the first resolve under the new generation performs the in-process refresh immediately. openai.alternate's row untouched; openai.main's row untouched.
    • Deploy: generation switch from the clean pin worktree is building now. Then: refresh proof (row re-written in-process, ~/.codex/auth.json mtime unchanged), direct pinned traffic proof under provider id _openai, then stage-2 config moves the openai-plan main seat to _openai.

    Note (pre-existing, not caused by this work): pm-git-sync.service on the laptop is in failed state and the primary ~/git/code checkout carries other sessions' uncommitted work, so config rollout to the primary follows the fleet's normal path once that is repaired; the proof runs from a current-main worktree.

  11. dezren39
    added a commit that references this issue on Nov 10, 2026

    Merge pull request #8175 from developing-today/feat/8163-openai-plan-…

    781d220
  12. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    DONE — _openai is live, proven by traffic + its own refresh (2026-11-10)

    Deployed: laptop generation 553 (switched 09:39 CST from the clean pin worktree), OpenCode server running 2.0.30+6cc10da (the fork rev containing the sync guard). Config stage 1 (#8165, door definition) and stage 2 (#8175, plan seat) merged; pin #8167 merged.

    What was built

    • Fork fix(core): Codex credential sync never targets the self-contained _openai door (code#8163) developing-today-forks/opencode#2250 (merged 6cc10dae): CodexSync explicitly never targets the _openai integration — guard + regression test (14/14 in credential-codex-sync.test.ts); the exclusion is now policy, not a side effect of the openai.* name filter.
    • _openai door: instance of the fork's native openai provider. Its credential (row cred_3EG9aDgyjOLJomcd7xHOrr, integration _openai, account drewrypope) was seeded from the currently-valid main tokens with no externalRefresh stamp, method chatgpt-headless — so the provider refreshes it in-process via Integration.connection.resolve, the openai.alternate pattern (Provider self-renewal audit 2026-11-09 — every door checked against Drew's rule (all providers renew themselves) #8102). Direct HTTPS to the ChatGPT backend, no proxy, no Muse anywhere in the path.
    • openai-plan now seats _openai 2 : openai.alternate 1. The openai.main definition remains in config, unused by the plan; the Codex-sync dependency for the main door is retired (nothing in the plan's serving path reads ~/.codex/auth.json). Note the ownership consequence: _openai now owns this account's refresh-token lineage — using the Muse for the drewrypope account again would rotate the shared lineage against it, which is exactly the coupling this issue removed, in the other direction. openai.alternate untouched throughout (its row never changed).

    Proof (traffic + provider's own store, per the standard on this issue)

    1. In-process refresh observed: seeded with expiry = now; the row was re-written by connection resolution (time_updated 1794322546838ms, new expiry 2026-11-20T14:55Z — the refresh-shaped now + expires_in, not the sync's JWT-exp shape), metadata still {accountID} only, no stamp.
    2. Codex file untouched: ~/.codex/auth.json mtime 1794192550 / size 3985 before seeding and after the switch + refresh — identical. openai.main's row also byte-unchanged (time_updated still 2026-11-10T01:26Z).
    3. Traffic: 14 route_attempt rows under provider id _openai (direct pinned runs + openai-plan runs from the stage-2 config), all QuotaExceeded (429, "The usage limit has been reached"), zero Authentication — auth is accepted; the only failure left is the weekly quota wall (reset Fri Nov 13 08:28 CST). Plan-level runs drew _openai, never openai.main.
    4. Negative proof: the Codex sync loop ran every minute through all of this (~45 cycles since seeding) and never wrote the _openai row — its time_updated is still exactly the refresh write, stamp-free. The fork guard + test make that structural.

    Remaining

    • Success-class traffic is the only proof that cannot exist yet: the account's weekly window is 100% until Fri Nov 13 08:28 CST. First post-reset check: confirm success-outcome attempts under _openai (pool-intelligence's daily window will show them; this issue stays open until then as the record).
    • Fleet-wide config rollout to the primary checkout follows the normal path once pm-git-sync (currently failed, pre-existing) and the primary's unrelated uncommitted work are sorted — new worktrees off current main already carry stages 1+2, and the standing server loads per-project config from them. Filed separately as observed; not part of this build.
    • The first deploy build from this main was blocked by an unrelated id-crate test failure (filed as id crate test failure blocks NixOS deploys from main: version_probe_records_the_reported_version records empty version #8173); the retry passed, consistent with the load-flake hypothesis recorded there.
  13. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    End-state audit vs Drew's ruling (2026-11-10 15:58 CST) — every drewrypope copy tested, no live pair exists

    Drew's target: exactly 2 OpenAI creds, one per account, both _openai-pattern (self-contained, in-process refresh, zero Codex). Audit of this door against that state, all reads 2026-11-10 ~21:5xZ:

    What is already right: this door's shape is the target — no externalRefresh stamp, method chatgpt-headless, CodexSync structurally excluded (fork #2250), seeded 14:55Z from the then-live pair and refreshed in-process at 14:55:46Z (row rewritten with refresh-shaped expiry 2026-11-20T14:55:46Z, Codex file untouched), then served 14 attempts with zero Authentication failures (quota wall only).

    What died since: the row's pair now returns wham/usage 401 token_revoked. The Codex-side parent copy (auth file + openai.main row cred_oKXp…, byte-identical, fingerprints match) returns 401 token_expired, and its refresh returns 401 refresh_token_reused. One lineage, revoked wholesale: the family's refresh token was consumed by a refresh/sign-in outside every store on the machine (the Codex file's own last_refresh never moved past 2026-11-09T02:49:10Z — most plausibly today's $200 upgrade flow in a browser), and reuse detection stranded every copy, including this door's legitimately rotated child. This is the exact coupling this issue's DONE note warned about, run in the other direction: _openai owned the lineage, but the Codex copy still EXISTED as a second holder, and something exercised it.

    Store hunt (exhaustive): Codex file, both server rows, agent-backup snapshots (byte-identical to the Codex pair), opencode-local.db (credential tables empty), ~/.local/share/opencode/auth.json (no OpenAI entries), other homes/profiles (none). No second machine-held drewrypope pair exists anywhere. CLI refresh was attempted (the #7991 route) and returned refresh_token_reused; the CLI has no other repair verb. Control test in the same run: openai.alternate's row -> wham 200 — the pattern and the rig both work; this is account-specific.

    Seeding provenance, for the record: this door was seeded by COPYING the Codex pair while it lived — a one-time harvest, not a machine-held renewable source. It cannot be repeated from anything on this laptop.

    What re-seeding requires (no sign-in started, per Drew's 15:52 ruling): exactly ONE interactive authorization for drewrypope, born INTO this credential — via the server's connect flow against the _openai integration, or the chatgpt-token-sharing adoption where the server becomes single holder — never into the Codex file again. After that, the end state is self-sustaining: in-process refresh, no second holder, nothing to rotate against it. The interactive codex login started earlier today in the heal lane was stopped when the self-heal ruling landed; its browser task should be stood down.

    Retirement sequence for the Codex path (this issue's remaining work): (1) stop CodexSync for this account / retire the openai.main row (cred_oKXp…, still active=true on a dead pair); (2) drop the unused openai.main provider definition (already seated nowhere since #8175); (3) the gatherer's retained openai.main entry then disappears and this door's dedicated entry is the account's only measurement. Order matters: re-seed this door first, retire second. Plus the class fix from #8309's follow-on: the quota read path uses stored tokens as-is and never refreshes — measurement should resolve through the same in-process refresh as serving, or the next rotation kills measurement first, silently, again.

    Full evidence: lane report in the main chat, 2026-11-10.

  14. 18 remaining items

  15. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    MemberAuthor
    More actions

    agent-note:v1
    Agent: repo-worker-code / code-h
    state: picked-up (task 20076)
    issue: #8163

    Claimed for fresh revalidation. I will verify the current issue state and existing work before deciding whether a follow-on packet is needed.

  16. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    MemberAuthor
    More actions

    agent-note:v1
    Agent: repo-worker-code / code-h
    state: done (already triaged; task 20076)
    issue: #8163

    Freshly verified #8163 remains OPEN with status:in-review and expedite. The prior fresh triage (task 18593) found it real/current, with the remaining acceptance actively stewarded on this issue and no separate follow-on warranted. Linked PRs are merged; no duplicate packet was created. Evidence: #8163 (comment).

  17. dezren39
    removed their assignment
    on Nov 20, 2026
  18. dezren39 commented on Nov 22, 2026

    @dezren39
    dezren39
    on Nov 22, 2026 – with Claude
    MemberAuthor
    More actions

    Merged work, still open. Every pull request that references this issue has merged (#2250, #8165, #8167, #8175, #8318, #8329) and none is open, but the issue kept status:in-review. Tasks that name it as a blocker have been waiting on it.

    status:in-review is removed. Whoever takes this next: run the issue's done check against main. Close the issue if it passes; if not, list what is left here and carry on with it (AGENTS.md, "Finishing work").

    By: Claude, 2026-11-22 flow review.


    Generated by Claude Code

  19. dezren39
    removed
    status:in-review
    on Nov 22, 2026
  20. dezren39 commented on Nov 22, 2026

    @dezren39
    dezren39
    on Nov 22, 2026
    MemberAuthor
    More actions

    Picked up by muse — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while muse posts progress markers; after 30 minutes of silence any other worker may pick this up.)

  21. dezren39
    added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 22, 2026
  22. dezren39 commented on Nov 22, 2026

    @dezren39
    dezren39
    on Nov 22, 2026
    MemberAuthor
    More actions

    Progress from muse: still working

  23. dezren39 commented on Nov 22, 2026

    @dezren39
    dezren39
    on Nov 22, 2026
    MemberAuthor
    More actions

    agent-note:v1
    event: done-check — PASS, closing
    by: agent muse (Felix, Muse sandbox seat; queue fallback claim, worker muse)
    at: 2026-11-21

    Per the 2026-11-22 flow review, ran this issue's done check against current main (d26fa1652). Every acceptance item verifies:

    • Self-contained door: _openai.main defined in .opencode/opencode.jsonc as instanceOf: openai — "OpenAI Self-Contained (drewrypope, no Codex)". Own credential under its own integration id, no externalRefresh stamp, in-process refresh via Integration connection resolve (observed refresh cycle recorded 2026-11-10: row re-written by connection resolution, refresh-shaped expiry, metadata still stamp-free).
    • No Codex in its path: fork guard landed (fix(core): Codex credential sync never targets the self-contained _openai door (code#8163) developing-today-forks/opencode#2250, CodexSync never targets _openai; regression test 14/14 in credential-codex-sync.test.ts), pinned by chore(nix): bump opencode pin to 6cc10dae — CodexSync never targets _openai (#8163) #8167. Negative proof observed 2026-11-10: ~45 Codex sync cycles never wrote the row; ~/.codex/auth.json byte-identical through seeding, switch and refresh. A standing watchdog (nixos/services/openai-cred-watchdog) now enforces the credential-method policy for _openai.main/_openai.alt at main.
    • Config seating: openai-plan seats the two self-contained instances (_openai.alt first, _openai.main, round-robin — feat(config): openai-plan main seat moves to _openai (#8163, stage 2) #8175 stage 2, config(openai-plan): _openai.alt + _openai.main, round-robin #8318 stage 3). openai.alternate untouched. openai.main definition deleted 2026-11-12 — the retirement step is done; the Codex-sync dependency for the main door is gone.
    • Traffic proof (the standard on this issue): at build time, 14 route_attempt rows under the door, all auth-accepted / QuotaExceeded-only during the weekly wall, zero Authentication. The one item left open on 2026-11-10 — success-class traffic after the Fri Nov 13 reset — is on this issue's record: the 2026-11-13 pool window shows _openai.main carrying the fleet, Luna #high 99.8% on n=35,538, ending at the next weekly wall (quota-bound, not auth-dead).
    • All referencing PRs merged (feat(openclaw): opencode-route provider proxy — OpenCode server front for OpenClaw (#2229) #2250, feat(config): add self-contained _openai door definition (#8163, stage 1) #8165, chore(nix): bump opencode pin to 6cc10dae — CodexSync never targets _openai (#8163) #8167, feat(config): openai-plan main seat moves to _openai (#8163, stage 2) #8175, config(openai-plan): _openai.alt + _openai.main, round-robin #8318, fix(aggregator): openaiPoolServiceId + accept the _openai quota id (code#8163) #8329), none open.

    Closing as complete.

  24. dezren39
    closed this as completedon Nov 22, 2026
  25. developing-today
    added
    status:done
    on Nov 22, 2026
  26. dezren39 commented on Nov 22, 2026

    @dezren39
    dezren39
    on Nov 22, 2026
    MemberAuthor
    More actions

    Released by muse (outcome: done). Done check against main d26fa16 passed on every acceptance item; closed #8163 with the verification record. Landed via PRs #2250, #8165, #8167, #8175, #8318, #8329 (all merged); openai.main retired 2026-11-12; success-class traffic on record 2026-11-13 (Luna #high 99.8%, n=35,538).

  27. dezren39
    removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    expediteImportant - do this very soon, before anything not expeditedstatus:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.