Expand description
Shared scaffolding for cloud substrates (Render, Vercel, …).
Only verified-identical machinery lives here — credential resolution, operator-side prepare, the health-gate poll, and the spend line. Each provider keeps its own error type, codes, and deploy semantics; the shared helpers return neutral data the provider maps to its own fault, so per-provider error codes stay distinct (ARCHITECTURE.md §2). Deploy/lifecycle (the REST clients, teardown verification, namespace shape) is deliberately NOT abstracted here — it differs materially between providers and has too few instances to generalise safely.
Modules§
- checkpoint
- Shared checkpoint kind policy for cloud substrates.
- credential
- Shared cloud credential resolution (§4): env var → resolved secrets →
scoped key file. Each cloud substrate names its own env var and key file and
maps the neutral
CredentialMissingto its own fault, so per-provider error codes and remediation stay distinct (ARCHITECTURE.md §2). - ensure
- Stripe project + environment ensure shared by cloud substrates.
- health
- Shared cloud health gate (§4): poll a service URL until it returns the
expected status (and, if set, a body containing a needle) or a budget
expires. The loop is identical across cloud substrates; only the fault they
raise differs, so this returns a neutral
HealthFailurethe substrate maps to its ownHealthFailed(preserving per-provider codes/remediation, §2). - prepare
- Operator-side cloud prepare (§4): shallow git checkout + run a command on
the operator’s machine. Cloud substrates call this and map the neutral
PrepareFailureto their ownPrepareFailed-style fault. - source_
ref - Operator-side source-ref checkout helpers (Render/Vercel verify checkouts).
- spend
- Shared spend line (§4 — never silently nothing): prefer the plugin’s live spend summary; fall back to the hard cap plus a dashboard pointer when the plugin doesn’t expose spend. Each substrate passes its own provider label, cap, and dashboard URL.