From f2242e969afe16a4ad66562d7a5b358b2876615a Mon Sep 17 00:00:00 2001 From: Natalie Date: Mon, 29 Jun 2026 10:20:12 -0400 Subject: [PATCH] feat(infra_manifest): optional .infra..yaml dev/prod variants (v0.3.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- programming_general/infra_manifest.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/programming_general/infra_manifest.yaml b/programming_general/infra_manifest.yaml index 020b13a..211b0e0 100644 --- a/programming_general/infra_manifest.yaml +++ b/programming_general/infra_manifest.yaml @@ -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..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..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