fix(deploy): INCIDENT 2026-08-19 — script died silently after reset without DEPLOY_EVENT_TOKEN; in-container /api probes need X-Forwarded-For; EXIT trap restores HEAD #5505
ccantynzAI Reviewcommented 13d ago
AI Triage
(no summary)
Priority: medium Risk area: mixed
Suggested labels: (no label suggestions) Suggested reviewers: (no reviewer suggestions)
Suggestions only — nothing has been applied. The PR author stays in control.
gluecron[bot]🤖 botAI Reviewcommented 13d ago
AI review unavailable
The platform's AI balance is exhausted, so AI generation is temporarily unavailable. Nothing was lost. You can queue this as a repair for the internal agent from the repository's Health page, or try again once the balance is restored. The PR is otherwise unchanged.
Cross-repo impact
See what breaks downstream if this PR merges.
⮌ Merged
This pull request was merged into main.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts
Deploys of
027a403and9c12757never landed. Journal: "HEAD is now at …" then exit 1, no message.deploy_event()read the token with agreppipeline; the box.envhas noDEPLOY_EVENT_TOKEN, grep exited 1, and underset -euo pipefailthat killed the script right aftergit reset --hard— HEAD advanced, old container kept running, next tick saw "nothing new" forever. Also from the journal: the served-SHA gate couldn't read/api/versioninside the container because/api/*sits behind the rate limiter, which returns 400 withoutX-Forwarded-For.Fixes: tolerant token read;
X-Forwarded-For: 127.0.0.1on every in-container/apicall; an EXIT trap restores HEAD to the previous sha and logs loudly on any unexpected death, so a crash can never strand a deploy again. Harness gains a stateful git shim and tests for all three (23 pass).After merge I will recover the box by hand (HEAD is currently stranded at 9c12757 with a138741 running).
🤖 Generated with Claude Code