Skip to content

Refuse a deploy whose shell still sets the retired stage variable - #474

Merged
benschac merged 1 commit into
mainfrom
cairn-fixes/landed-review-retired-stage
Dec 1, 2026
Merged

benschac merged 1 commit into
mainfrom
cairn-fixes/landed-review-retired-stage

Conversation

@benschac

@benschac benschac commented Dec 1, 2026 •

Copy link
Copy Markdown
Owner

Codex found that after the rename a shell still exporting CAIRN_STAGE=staging, with PRDDD_STAGE unset, deploys to prod without being asked. Stage resolution now fails with a message naming the rename. This is a guard on the one variable that selects production; no old name is read as a fallback.

The checked-in config still named the old gateway token variable, so a fresh clone following the docs had a judge with no token. It now names PRDDD_AI_GATEWAY_TOKEN.

Co-Authored-By: Claude Fable 5.2 noreply@anthropic.com

What this changes

Checks

Provenance

Review by Codex

This commit fixes what Codex's first round found on #458. Its second round, on this commit, found two things, left open because two rounds are done:

  • P1, open. The guard is bypassed when the shell exports CAIRN_STAGE=staging and PRDDD_STAGE=prod is set only in apps/hosted/.env: the package script falls back to --stage prod and the declaration then sees a matching PRDDD_STAGE.
  • P2, open. The retired CAIRN_AI_GATEWAY_TOKEN name is no longer in the Redactor's credential set, so a shell that still exports only the old name has that value left unredacted.

Rebased onto the local-settings work on main: alchemy.run.ts keeps originFor, presentSecret and the alchemy dev block from main and takes configuredStage and deployStage from src/config.ts.

🤖 Generated with Claude Code

benschac commented Dec 1, 2026 •

Copy link
Copy Markdown
Owner Author

Merge activity

@benschac
benschac force-pushed the cairn-fixes/landed-review-lazy-trace-hash branch from abad71f to ae9f909 Compare December 1, 2026 17:28
@benschac
benschac force-pushed the cairn-fixes/landed-review-retired-stage branch from 4e2daee to 8e131f2 Compare December 1, 2026 17:28
@benschac
benschac force-pushed the cairn-fixes/landed-review-lazy-trace-hash branch from abad71f to ae9f909 Compare December 1, 2026 17:28
@benschac
benschac force-pushed the cairn-fixes/landed-review-retired-stage branch from 4e2daee to 8e131f2 Compare December 1, 2026 17:28
@benschac
benschac changed the base branch from cairn-fixes/landed-review-lazy-trace-hash to graphite-base/474 December 1, 2026 17:31
@benschac
benschac changed the base branch from graphite-base/474 to main December 1, 2026 17:33
Codex found that after the rename a shell still exporting CAIRN_STAGE=staging, with PRDDD_STAGE unset, deploys to prod without being asked. Stage resolution now fails with a message naming the rename. This is a guard on the one variable that selects production; no old name is read as a fallback.

The checked-in config still named the old gateway token variable, so a fresh clone following the docs had a judge with no token. It now names PRDDD_AI_GATEWAY_TOKEN.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@benschac
benschac force-pushed the cairn-fixes/landed-review-retired-stage branch from 8e131f2 to 5d5d713 Compare December 1, 2026 17:33
@benschac
benschac merged commit c8c519a into main Dec 1, 2026
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