Commit c4e94f7
fix(rotate-api-token): force image refresh so rotation picks up code
changes baked into the orchestrator image
Caught during live smoke of the `local` path: the first invocation
failed auth verification (expected 401 got 200) because
`docker compose up -d` alone reuses the cached image, and the local
cache predated the ea3a431 auth-middleware ship. Rotating the token
wrote it into .env correctly but the orchestrator container was
still running an older build that had no auth middleware at all, so
every request still returned 200 unauthenticated.
Fix is target-specific:
- local: `docker compose up --build -d` forces a rebuild from the
current src/ tree. Picks up any code change in the repo, not just
the new env var.
- hetzner / lightsail / gcp: `docker compose pull` before `up -d` so
the remote grabs whatever's on GHCR before restarting. The `|| true`
on the pull guards against transient GHCR hiccups; `up -d` still
fires with whatever the remote already had cached.
Second run, same `local` path, clean output:
GET /v1/agents (no token) → 401 ✓
GET /v1/agents (Bearer token) → 200 ✓
GET /healthz (no token, bypass) → 200 ✓
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 11fe45b commit c4e94f7
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
181 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
182 | 185 | | |
183 | 186 | | |
184 | 187 | | |
185 | 188 | | |
186 | 189 | | |
187 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
188 | 197 | | |
189 | 198 | | |
190 | 199 | | |
| 200 | + | |
191 | 201 | | |
192 | 202 | | |
193 | 203 | | |
| |||
0 commit comments