Isolate production and staging CLI credentials - #40
Merged
Merged
Conversation
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
force-pushed
the
codex/production-default
branch
from
September 24, 2026 20:04
c75a40f to
b55b33a
Compare
raghubetina
marked this pull request as ready for review
September 24, 2026 20:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Keep production as the default and add
--stagingbefore a command group or among a remote command's options. Requests tohttps://staging.firstdraft.comrequireFIRSTDRAFT_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 fullnpm run checkgate 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.