Skip to content

Isolate production and staging CLI credentials - #40

Merged
raghubetina merged 1 commit into
mainfrom
codex/production-default
Sep 24, 2026
Merged

raghubetina merged 1 commit into
mainfrom
codex/production-default

Conversation

@raghubetina

@raghubetina raghubetina commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Keep production as the default and add --staging before a command group or among a remote command's options. Requests to https://staging.firstdraft.com require FIRSTDRAFT_STAGING_API_TOKEN, including existing pinned Projects and retained artifact reads, so a production token is never used as a staging fallback.

Reject a conflicting staging flag, URL override, or Project pin before sending a request. Preserve local output preflight and existing Project origins; moving to another environment requires a separate initialized project directory. Prepare CLI 0.7.0 for the token configuration change while retaining API 0.6 and Plan 0.22 compatibility.

Validation: npm ci --ignore-scripts, npm audit, and the full npm run check gate passed (213 tests, package allowlist, and packed installation smoke). The full gate also passed with a staging API URL and both token environment variables exported; focused environment checks passed with a loopback URL exported. Skills consumer contract probes passed against the unchanged runtime.

Keep production as the default and add an explicit staging option.
Select credentials from each Project's effective origin so an existing
staging pin cannot receive a production token.

Preserve pinned Projects and local output preflight. Bump the CLI minor
version for the staging token configuration change while retaining the
API 0.6 and Plan 0.22 contracts.
@raghubetina
raghubetina force-pushed the codex/production-default branch from c75a40f to b55b33a Compare September 24, 2026 20:04
@raghubetina
raghubetina marked this pull request as ready for review September 24, 2026 20:06
@raghubetina
raghubetina merged commit fb45245 into main Sep 24, 2026
4 checks passed
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