forge: traces.key.store ingest as handle blocks; re-render Caddy security env on reload #172

Merged
founder merged 1 commit from claude/kse-0191-caddy-ingest-reload into main 2026-08-22 04:34:47 +00:00
Owner

KSE-0191 go-live follow-up (forge generation a778a065 kept the previous Caddy config).

  • caddy-security-env only ran before a Caddy start; a config-only switch reloads, so the new {$KEY_STORE_TELEMETRY_HASH_*} basic_auth placeholders were empty and the adapter rejected the reload (username and password cannot be empty). The renderer is now a shared script, re-run by the ExecReload wrapper and caddy-deferred-reload, with an env loader for the reload client.
  • The bare handle { redir } fallback precedes route in Caddy directive order, so every ingest request was 302d to Grafana. The ingest routes are handle blocks now (verified with caddy adapt on the built toplevel: grpc -> ingest -> fallback in one exclusive group).

🤖 Generated with Claude Code

KSE-0191 go-live follow-up (forge generation a778a065 kept the previous Caddy config). - caddy-security-env only ran before a Caddy *start*; a config-only switch reloads, so the new {$KEY_STORE_TELEMETRY_HASH_*} basic_auth placeholders were empty and the adapter rejected the reload (username and password cannot be empty). The renderer is now a shared script, re-run by the ExecReload wrapper and caddy-deferred-reload, with an env loader for the reload client. - The bare handle { redir } fallback precedes route in Caddy directive order, so every ingest request was 302d to Grafana. The ingest routes are handle blocks now (verified with caddy adapt on the built toplevel: grpc -> ingest -> fallback in one exclusive group). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Post-deploy of KSE-0191 (forge generation a778a065) Caddy kept running the
previous config: the Caddyfile's new {$KEY_STORE_TELEMETRY_HASH_*} basic_auth
placeholders were empty because caddy-security-env.service only runs before a
Caddy *start* and a config-only switch merely reloads, so the adapter failed
with "username and password cannot be empty". Once reloaded by hand, every
ingest request was still 302'd to Grafana: the bare `handle { redir }`
fallback precedes `route` in Caddy's directive order.

- caddySecurityEnvRender: the env rendering as a standalone script, run by
  caddy-security-env.service and again by the ExecReload wrapper and
  caddy-deferred-reload right before `caddy reload`.
- caddySecurityEnvExec: loads security.env into the reload client's
  environment (no shell expansion; bcrypt hashes carry `$`).
- traces.key.store: `handle @otlp_grpc` / `handle @ingest` so the browser
  fallback only sees what the ingest blocks did not claim.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
founder force-pushed claude/kse-0191-caddy-ingest-reload from 6719dd5415 to 9c78835d41
Some checks failed
Deploy: API / Deploy (API) (push) Failing after 3s
Release: If Needed / Check (Release Needed) (push) Successful in 5s
Deploy: Web / Deploy (Web) (push) Successful in 3m43s
2026-08-22 04:34:43 +00:00
Compare
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
key-store/key.store!172
No description provided.