Skip to content

Keep CLI credentials and requests bound to their initiating session - #79

Merged
barfle merged 5 commits into
codex/native-pkce-loginfrom
codex/gateway-cli-account-lifecycle
Nov 6, 2026
Merged

barfle merged 5 commits into
codex/native-pkce-loginfrom
codex/gateway-cli-account-lifecycle

Conversation

@barfle

@barfle barfle commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

A delayed CLI request or renewal could reload another account from the same saved file, retry the original action as that account, or overwrite a newer sign-in. Bind each client to an opaque local session identity; renewal retains that identity and explicit sign-in, key installation and sign-out replace it. Check ownership before admission, retry, persistence and response publication.

Use short cross-process file transactions and private atomic replacement, preserving concurrent renewal and independent preferences while refusing stale or conflicting writes. Persist an input-bound renewal recovery UUID before HTTP so competing processes and response-loss recovery reuse the same server request. Keep tunnel publishers on a separate credential-free Runtime client, pin recipients, and prevent netrc/session authentication from overriding selected proof. Primary sign-in uses an anonymous client and binds a new authenticated client only after commit.

Validation: 292 unit tests and 74 subtests pass in a clean installation using only declared dependencies, with the configured 100% coverage gate (cli.py and remote_access.py remain the existing exclusions). All 326 qualification contracts pass, including a local TCP bridge. Compile and five help commands pass with no external Click installed; configuration failures use supported Typer echo/Exit. All 15 packaged Python sources match the local private wheel. Real process tests cover competing sign-ins, shared recovery IDs and lock contention.

The initial CI exposed an undeclared Click import, now removed, and a cancelled macOS package job on a retired macos-14 runner. CI and the existing release-build workflow now select supported macos-15-intel; release triggers and qualification-only/publication rules are unchanged. Exact source ed2ce62 passed CI 42310201370: both Python unit jobs, Windows unit tests, all three compile/help/native TCP jobs, Windows MSI installation/uninstallation, macOS PKG installation/forwarding and Linux package installation/forwarding. No blind reruns or waived assertions.

Stacked on #78; merge only into the private codex/native-pkce-login qualification branch. Hold main merge and release for matching backend/client staging qualification and unchanged published agent campaigns. Actual server logout remains separate work pending the per-session/account-wide contract. No production, public package, installer feed or store release is dispatched.

Private qualification-only signed build 42310729728 was rejected before build steps by the release-signing environment, which permits only main and v* tags. The publication job was SKIPPED. Environment protections remain intact; no release tag or public distribution was used to bypass that restriction.

@barfle
barfle marked this pull request as ready for review November 6, 2026 23:40
@barfle
barfle requested a review from a team as a code owner November 6, 2026 23:40
@barfle
barfle merged commit 3f37d6a into codex/native-pkce-login Nov 6, 2026
11 of 15 checks passed
@barfle
barfle deleted the codex/gateway-cli-account-lifecycle branch November 6, 2026 23:40

This branch had an error being deployed

1 failed deployment
release-signing — ed2ce626 Deployed Nov 6, 2026 by barfle via Build macos-universal2 #13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant