Raxx · internal docs

internal · gated

RCA — Raptor prod release command failed: in-process smoke blocked by CF origin guard

Incident ID: 2026-06-21-release-smoke-cf-origin-guard Date: 2026-06-21 Severity: SEV-3 Duration: ~6 minutes (19:29 UTC dispatch → 19:35 UTC confirmed, release failure noticed immediately post-deploy) Blast radius: Heroku marked raxx-api-prod v154 release as failed. No user impact — app is healthy, migration applied, dyno running. Author: sre-agent

Summary

The Raptor prod deploy for the 2026-06-21 six-PR wave succeeded in all meaningful respects: migration 0046 applied cleanly, the dyno booted, and /health returned 200. However, the Heroku release phase exited non-zero because 14 in-process smoke tests across two files (test_beta_walk_route_smoke_3682.py and test_beta_walkthrough_route_smoke_3455.py) failed with 403 direct_origin_blocked instead of expected 404/401 responses. The cause: FLAG_ENFORCE_CF_ORIGIN=1 is set on raxx-api-prod config-vars. The in-process test _make_inprocess_client() helper calls create_app(), which inherits FLAG_ENFORCE_CF_ORIGIN=1 from the dyno environment — causing the CF origin guard to fire on every test-client request before route logic executes. The fix is to override FLAG_ENFORCE_CF_ORIGIN=0 in the _TEST_APP_CONFIG dict used by both smoke files.

Timeline (all times UTC)

Impact

What went well

What didn't go well

Root cause analysis

Detection

Resolution

Action items

# Action Owner Due Issue
1 Fix _TEST_APP_CONFIG in test_beta_walk_route_smoke_3682.py and test_beta_walkthrough_route_smoke_3455.py to add "FLAG_ENFORCE_CF_ORIGIN": "0" (or equivalent env override) so in-process smoke is immune to dyno env-var leakage feature-developer 2026-06-23 file
2 Add release-command exit-code check to deploy-heroku.yml: after the health check passes, query heroku releases --app <app> --num 1 --json and fail the workflow if the latest release has status=failed sre-agent 2026-06-28 file
3 Update cloudflare_origin_guard.py docstring to clarify that "default off" means "absent from the environment" — in-process test clients must explicitly pin FLAG_ENFORCE_CF_ORIGIN=0 in their test config to be immune to dyno env leakage feature-developer 2026-06-23 on same PR as action item 1

References