feat(infra_manifest): optional .infra.<env>.yaml dev/prod variants (v0.3.0)

Add an optional 'environment' field (default prod) and document sibling
.infra.dev.yaml manifests (same schema) so a project can declare a distinct
non-prod deployment — e.g. a local mac operator instance alongside the DO prod
service. Run-only/access config (passcodes, bind addrs) stays out of the manifest.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Natalie 2026-06-29 10:20:12 -04:00
parent 578233c1b4
commit f2242e969a

View file

@ -1,11 +1,11 @@
apiVersion: conventions/v1
version: 0.2.0
version: 0.3.0
updated: "2026-06-29"
name: infra_manifest
title: Per-project infra manifest (.infra.yaml)
scope: general
status: draft
summary: Every deployable project declares its infrastructure in a root .infra.yaml; `service.host` must be a host in net-tools mesh-hosts.json, so the infra-net reconciler can build the live picture. A future infra-apply renders the DO parts.
summary: Every deployable project declares its infrastructure in a root .infra.yaml; `service.host` must be a host in net-tools mesh-hosts.json, so the infra-net reconciler can build the live picture. A project with a distinct non-prod deployment may add a sibling .infra.dev.yaml (same schema, environment:dev) — e.g. a local operator instance on a mac host. The reconciler reads every .infra*.yaml. A future infra-apply renders the DO parts.
appliesTo: ["@applications/*", "@projects/@cocottetech", "@projects/@magic-civilization"]
rules:
- id: own_db
@ -21,8 +21,11 @@ rules:
- id: host_in_mesh
level: must
text: "`service.host` is a host name from net-tools mesh-hosts.json (lime, fennel, redroid, …) — the infra-net reconciler validates this and regenerates the mesh-hosts services map from all .infra.yaml."
- id: env_variants
level: should
text: "Default manifest is `.infra.yaml` (prod, environment defaults to prod). A distinct non-prod deployment lives in a sibling `.infra.<env>.yaml` (currently only `.infra.dev.yaml`) with the same schema + `environment` set. One project may thus appear as multiple services (e.g. prod on a DO droplet + a local mac instance). Keep run-only/access config (passcodes, bind addresses) out of the manifest — it is not mesh infra."
providesFile:
path: .infra.yaml
path: .infra.yaml # plus optional .infra.<env>.yaml siblings (same schema)
schema:
$schema: "https://json-schema.org/draft/2020-12/schema"
title: ProjectInfraManifest
@ -32,6 +35,7 @@ providesFile:
properties:
apiVersion: { type: string, const: "infra/v1", description: "Manifest contract version (independent of the convention's own version)." }
project: { type: string }
environment: { type: string, enum: [dev, prod], default: prod, description: "Deployment environment. Omitted = prod. A project may carry one manifest per environment (.infra.yaml + .infra.dev.yaml)." }
provider: { type: string, enum: [digitalocean, mac, bare-metal, local], description: "Where it physically runs: digitalocean droplet, a mac (e.g. fennel), bare-metal, or local." }
database:
type: object