cast/src
claude-hdb d927a7ad57 fix(diff): converge live projection on compose domains and is_static
Two distinct root causes made `cast diff`/`apply` re-diff and redeploy an
application on every run against a live Coolify 4.1.2 (cast#68).

1. `docker_compose_domains` parse bug. Coolify 4.1.2 returns this field as a
   JSON-encoded, service-KEYED object ({ "<svc>": { "domain": "<comma-joined>" } }),
   not the [{name,domain}] array cast expected. The array-only parser bailed to
   `undefined`, so cast diffed the desired map against nothing forever.
   `parseDockerComposeDomains` now decodes the real object shape into the
   internal {service: string[]} map while still tolerating the legacy array
   shape (the write-side round-trip). Malformed/scalar/empty still → undefined.

2. `is_static` unreadable. Coolify 4.1.2 returns `is_static: null` on the read
   path even for a genuinely-static app, so projecting `false` diffed false→true
   forever. `projectLiveFields` now omits is_static when the live value is
   null/absent; `fetchLive` flags the app `staticNotCompared`; `computeDiff`
   skips the comparison (once-per-run warn), degrading is_static to a
   create-time-only setting. A real live boolean is still projected and diffed.

Closes #68

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 16:23:27 +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): converge live projection on compose domains and is_static 2026-07-15 16:23:27 +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: diff and apply a database's backup schedule (#51) 2026-07-14 23:07:54 +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): converge live projection on compose domains and is_static 2026-07-15 16:23:27 +00:00
draft.ts fix(apply): express static-site build settings so a monorepo app is served, not run (#63) 2026-07-14 23:46:14 +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 fix(apply): express static-site build settings so a monorepo app is served, not run (#63) 2026-07-14 23:46:14 +00:00
reserved.ts fix: never write an env var whose name Coolify injects itself (#50) 2026-07-14 22:29:23 +00:00
resolve.ts feat(resolve): derive base-URL env vars from manifest domains via ${domain:...} (#66) 2026-07-15 12:02:33 +00:00
secrets.ts fix: hand the age identity to age on stdin — fd paths resolve only in cast's process 2026-07-13 22:43:00 +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