Skip to content

Commit 9a05d84

Browse files
sametbasbugclaude
andcommitted
Teach the production config guard about the second callback
The deploy failed at `production:config:check` with "live config vars drifted", and it was right to. The guard holds an exact expected `vars` map for both production configs, and the Google callback was added to the wrangler files without being added here. Nothing in `npm run build` runs this check, so it stayed invisible until the deploy. The URL is expected relative to `expected.origin` rather than written out, because the only thing that can plausibly be wrong about it is the live and dark-launch origins getting crossed — and a literal string would compare equal in exactly that case. It is also added to the mode-difference normalizer for the same reason the GitHub one is there: the two production configs are required to be identical apart from the surface that genuinely differs by mode, and an origin-derived callback is part of that surface. Both lines are temporary in the same way the GitHub path is: when the existing accounts have finished attaching Google, the GitHub entries come out of the wrangler files and out of this guard together. Local proof: `node scripts/orbit-frontend-production-verify.mjs` exits 0 — the same job that failed in run 31389895331 — with 80 config assertions passing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 0878c21 commit 9a05d84

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎scripts/orbit-production-config-tests.mjs‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,13 @@ function validateConfig(config, expected) {
205205
ORBIT_ENVIRONMENT: 'production',
206206
ORBIT_DEPLOYMENT_MODE: expected.mode,
207207
ORBIT_ALLOWED_ORIGIN: expected.origin,
208+
/* İki sağlayıcı, iki dönüş adresi. GitHub'ınki GEÇİCİ — mevcut
209+
* hesapların Google'ı bağlaması bitince o satır da bu liste de
210+
* kısalacak. Adresler kaynağa değil `expected.origin`e bağlı, çünkü
211+
* yanlış olabilecek tek şey buranın canlı ile dark-launch arasında
212+
* karışması. */
208213
ORBIT_GITHUB_CALLBACK_URL: `${expected.origin}/v1/auth/github/callback`,
214+
ORBIT_GOOGLE_CALLBACK_URL: `${expected.origin}/v1/auth/google/callback`,
209215
ORBIT_PLATFORM_OWNER_GITHUB_ID: '126420524',
210216
ORBIT_OPEN_REGISTRATION: 'true',
211217
ORBIT_BACKUP_ENABLED: 'true',
@@ -227,6 +233,7 @@ function normalizeModeDifferences(config) {
227233
delete normalized.vars.ORBIT_DEPLOYMENT_MODE;
228234
delete normalized.vars.ORBIT_ALLOWED_ORIGIN;
229235
delete normalized.vars.ORBIT_GITHUB_CALLBACK_URL;
236+
delete normalized.vars.ORBIT_GOOGLE_CALLBACK_URL;
230237
return normalized;
231238
}
232239

0 commit comments

Comments
 (0)