cast/src
claude-hdb 8c396736c8 fix(secrets): read the age identity once per process so <(...) keys survive --all (#36)
A process substitution (`CAST_AGE_KEY_FILE_<ENV>=<(pm read ...)`) is a
read-once pipe, but `diff --all` / `apply --all` call decryptSecrets once
per project. The first project drained the pipe; every later project
re-read the key file, handed age an empty identity, and failed — the
fleet loop then misreported the project as unreachable (diff) or aborted
the fleet (apply). Latent today because only one registered project has
a prod store; real the moment a second one gains one.

Cache the key bytes by key path, module-level, so the identity is read
exactly once per process. Exposure is unchanged: the key already
transits this process's memory on every call.

The regression test uses a FIFO, which really drains — unlike the
existing /proc/self/fd test, whose regular file re-opens at offset 0 on
every read. A second writer serves emptiness after the first decrypt so
a regression fails loudly (age: no secret keys found) instead of
blocking the suite on a writerless FIFO open.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 18:27:53 +00:00
..
apply.ts fix(apply): refuse to write the generated-secret placeholder over a live value 2026-07-14 22:56:27 +00:00
bindings.ts feat(destroy): a scoped teardown verb, gated in state (#43) 2026-07-14 22:52:17 +00:00
capture.ts Merge pull request #56 from claude-hdb/fix/reserved-env-names 2026-07-14 23:54:15 +01:00
cli.ts fix(diff): ignore preview env rows so they cannot shadow production (#85) 2026-07-16 16:37:32 +00:00
config.ts feat: select the Coolify instance by name instead of editing .coolify.env (#14) 2026-07-13 16:42:45 +00:00
coolify.ts feat(service): set and diff per-container service hostnames via urls (#72) 2026-07-16 15:14:29 +00:00
destroy.ts feat(destroy): a scoped teardown verb, gated in state (#43) 2026-07-14 22:52:17 +00:00
diff.ts fix(diff): Coolify's own generated vars are not orphans (#87) 2026-07-16 16:56:34 +00:00
draft.ts fix(diff): Coolify's own generated vars are not orphans (#87) 2026-07-16 16:56:34 +00:00
envtemplate.ts feat(resolve): derive base-URL env vars from manifest domains via ${domain:...} (#66) 2026-07-15 12:02:33 +00:00
fleet.ts feat: --all — every project in an environment, and a report that says so (#26) 2026-07-13 20:23:23 +00:00
inventory.ts fix(inventory): biome lint — a bare template literal and a string concat 2026-07-13 19:22:07 +00:00
manifest.ts feat(service): set and diff per-container service hostnames via urls (#72) 2026-07-16 15:14:29 +00:00
reserved.ts fix(diff): Coolify's own generated vars are not orphans (#87) 2026-07-16 16:56:34 +00:00
resolve.ts feat(service): set and diff per-container service hostnames via urls (#72) 2026-07-16 15:14:29 +00:00
secrets.ts fix(secrets): read the age identity once per process so <(...) keys survive --all (#36) 2026-07-16 18:27:53 +00:00
server.ts feat: cast — the Coolify executor, extracted from the infra state repo 2026-07-11 12:25:44 +00:00
smoke.ts fix: never write an env var whose name Coolify injects itself (#50) 2026-07-14 22:29:23 +00:00
team.ts feat: assert the token's team before touching Coolify (fail-closed) 2026-07-12 20:55:04 +00:00