Raised by the operator. Not to be implemented until we have had an extended discussion thinking it through. ## The observation Deploys to hosts, a router console, DNS and a web edge run one loop against different targets: declared state in a repository, a reconciler that plans against what it observes, applies, verifies, recovers, and notices drift. | | Target | Declared in | Executor | Recover | |---|---|---|---|---| | host deploys | NixOS hosts | the deployment project | on the host, pulling on a timer | last-known-good generation | | router writes | a router console | the deployment project, with a shared library's schema and module | the valley host, pushing to an API | re-apply a prior plan; no transactions | | DNS updates | a DNS registrar | an infrastructure project and the deployment project | CI, pushing | re-apply | | web edge deploys | apps at a hosting provider | an infrastructure project, with a shared library's app schema | a forge's CI workflows | the provider's releases | The plan already reaches for the common part from the valley's side: - signed releases that hosts deploy (oc-3bc80df, oc-2496a36); - promotion and canaries (oc-e873a0e, oc-be2a1c2); - the effects journal (decision 9); - a router write as a separately approved effect, bound to the plan, the tool version and the observed console configuration (oc-565a8e5). ## The idea Unify the decision layer, not the executors. One target-agnostic record: apply plan P from release R to target T, approved against observed state O, with the outcome journaled. It belongs in the valley beside approvals, signatures and the landing ledger (oc-c0db2b0). Each executor stays specific to its target and meets a small contract: plan, apply, verify, hold, and report an outcome. The host deployer and the router writer would be the first two. ## What stays separate, and why - **The host deployer.** It runs on its own target and must recover with the network and the valley gone. NixOS gives it atomic rollback. - **The API targets.** They are remote and have no transactions, and they recover by re-applying from elsewhere. A router write can cut the network its controller stands on. A shared executor library would be mostly adapters. ## Repository shape A shared library project already holds schemas and reusable executors; the deployment project and the infrastructure project are instances. That mirrors the-valley and the instance repository. Two things are drifting: - **The web edge's deploy workflows.** They are specific to one forge and would become valley jobs on the runner (oc-362886c). - **The host deployer.** It could become a NixOS module in the shared library if another fleet wanted it. For now it stays in the deployment project (oc-a1e21bb). ## Questions for the discussion - Is a release one thing across targets, or one per target class? - What does "observed state" mean for a host, as opposed to an API? - Who verifies after apply, and how long does verification soak? - How do canaries work where a target has no replicas (one router, one DNS zone)? - Does the effects journal share the landing ledger's substrate? - Where do the executors live? Many streams, one riverbed: the water differs, the banks are shared.
No comments.