cast/test
claude-hdb 6f0b0f6fc1 feat(resolve): derive base-URL env vars from manifest domains via ${domain:...} (#66)
A public base URL an app reads (LANDING_BASE_URL, ADMIN_WEB_BASE_URL) is a
fact the manifest already states in `domains`/`service_domains` — the same
fields cast parses to reconcile Coolify domains. Hand-transcribing it into an
env template is a second copy that drifts (incubator's prod LANDING_BASE_URL
silently kept a pre-apex host). So a template can now say it directly:

    LANDING_BASE_URL=${domain:landing}
    ADMIN_WEB_BASE_URL=${domain:core.admin}

- ${domain:<app>}            -> applications.<app>.domains[0]
- ${domain:<app>.<service>}  -> applications.<app>.service_domains.<service>[0]

Symmetric with ${resource:...} (#60) — parse -> sentinel -> validate -> fill —
but a domain is PURE MANIFEST DATA, known at plan time, so it resolves fully in
desiredFromManifest against a map built from the manifest: no live read, no
executor deferral, no unresolved-at-write path. Domains are PUBLIC, so they
resolve to secret:false (printed in diffs) and read as plain literals
downstream (no diff.ts change). Not secrets: excluded from templateRefs, never
captured. assertDomainRefs is the single validation gate (apply/diff/capture),
refusing an undeclared app/service, a wrong-shape ref, or an empty/blank domain
list before the sentinel can escape. Applications only (Coolify 4.1.2 can't set
service domains). REPORTING_TZ-style operator literals stay literal.

Closes #66.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 12:02:33 +00:00
..
fixtures feat: place a resource on a destination — and a state file that can say which (#21) 2026-07-13 19:31:02 +00:00
apply.test.ts fix(apply): refuse to write the generated-secret placeholder over a live value 2026-07-14 22:56:27 +00:00
backup-cli.test.ts feat: diff and apply a database's backup schedule (#51) 2026-07-14 23:07:54 +00:00
bindings.test.ts fix: smoke resolves its target inside the project it was declared under (#29) 2026-07-13 20:08:35 +00:00
capture-cli.test.ts feat(capture): --generated-only, the bootstrap's missing pass 2 2026-07-14 22:32:07 +00:00
capture.test.ts Merge pull request #58 from claude-hdb/feat/capture-generated-only 2026-07-14 23:49:49 +01:00
cli.test.ts fix: smoke resolves its target inside the project it was declared under (#29) 2026-07-13 20:08:35 +00:00
config.test.ts feat: select the Coolify instance by name instead of editing .coolify.env (#14) 2026-07-13 16:42:45 +00:00
coolify.test.ts feat: diff and apply a database's backup schedule (#51) 2026-07-14 23:07:54 +00:00
destroy.test.ts feat(destroy): a scoped teardown verb, gated in state (#43) 2026-07-14 22:52:17 +00:00
diff.test.ts feat(resolve): derive DATABASE_URL/REDIS_URL from the database cast created (#60) 2026-07-14 23:46:26 +00:00
domain-preflight.test.ts fix(apply): pre-flight domain uniqueness, and translate Coolify's 409 (#44) 2026-07-14 22:30:34 +00:00
draft-cli.test.ts feat: emit a draft of what a box holds — a proposal, never desired state (#27) 2026-07-13 20:32:25 +00:00
draft.test.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.test.ts feat(resolve): derive base-URL env vars from manifest domains via ${domain:...} (#66) 2026-07-15 12:02:33 +00:00
fleet-cli.test.ts feat: --all — every project in an environment, and a report that says so (#26) 2026-07-13 20:23:23 +00:00
fleet.test.ts feat: --all — every project in an environment, and a report that says so (#26) 2026-07-13 20:23:23 +00:00
inventory.test.ts feat: read-side coordinates (#17, #18) + cast inventory (#19) 2026-07-13 18:20:53 +00:00
live-lookup.test.ts feat(resolve): derive DATABASE_URL/REDIS_URL from the database cast created (#60) 2026-07-14 23:46:26 +00:00
manifest.test.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
placement-cli.test.ts fix: the first apply against a fresh multi-destination box (#40, #41) 2026-07-14 17:25:29 +00:00
read-side-cli.test.ts feat: --resource, the third name a hand-built box does not share with you 2026-07-13 18:50:06 +00:00
reserved.test.ts fix: never write an env var whose name Coolify injects itself (#50) 2026-07-14 22:29:23 +00:00
resolve.test.ts feat(resolve): derive base-URL env vars from manifest domains via ${domain:...} (#66) 2026-07-15 12:02:33 +00:00
secrets.test.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
smoke-cli.test.ts fix: smoke resolves its target inside the project it was declared under (#29) 2026-07-13 20:08:35 +00:00
smoke.test.ts feat: cast — the Coolify executor, extracted from the infra state repo 2026-07-11 12:25:44 +00:00
sweep-cli.test.ts feat: inventory sweeps the instance — a discovery verb that needed you to have discovered 2026-07-13 19:07:17 +00:00
team.test.ts feat: assert the token's team before touching Coolify (fail-closed) 2026-07-12 20:55:04 +00:00
wire.test.ts Merge pull request #65 from claude-hdb/feat/derive-resource-url 2026-07-15 00:49:49 +01:00