gunk-dev/the-valley

roadmap.md

source813c6679e1c2main's published tip history
8.7 KiB · Rendered
1# Roadmap
2
3This roadmap orders the work on the-valley, cosmo and klaus. cosmo is the operator's NixOS fleet
4configuration and the-valley's reference deployment. klaus is the agent runner. The order closes
5security holes before it gives agents more autonomy.
6
7The roadmap gives no dates. Each step says what it unlocks. What runs today is in
8[architecture.md](./architecture.md), and the gates and their checks are in
9[security.md](./security.md). Purpose and principles are in [purpose.md](./purpose.md).
10
11## The sequence
12
13| Step | Milestone | Status |
14| ---- | ----------------------------------------------- | ----------------------------- |
15| 1 | Close present-day holes | Done |
16| 2 | M3: agent isolation | Done |
17| 3 | M5: cosmo on the valley | Next. The design is in review |
18| 4 | M1-C: signed releases and touch-gated approvals | Queued |
19| 5 | M6: klaus on the valley | Queued |
20| 6 | M7: throughput and research | Ongoing, after step 5 |
21
22M2 (real builds, a binary cache, promotion and canaries) and the rest of M4 (the-valley's refocus)
23are planned. They have no place in the sequence yet.
24
25### 1. Close present-day holes (done)
26
27These steps closed the paths by which an agent could reach root on a host, or change a host, with no
28human act:
29
30- M0, containment: klaus does not merge on approval, unifi-sync runs only by hand, and the update
31 workflows open pull requests.
32- M0-H, credentials: two YubiKeys are enrolled, and every cosmo secret is encrypted to the YubiKeys
33 and the hosts only. Credential rotation is deferred.
34- M1-A, converge: a host health-checks each new generation, rolls back on failure, and holds the bad
35 revision.
36- M1-B, the verifier: `sigverify` checks OpenSSH signatures, including the hardware key's presence
37 bit. It is landed and not wired to anything yet.
38- The ref policy: the valley's push hook is default-deny, and filing an integration request needs
39 the `request` grant.
40- The CI runners' root helpers are hardened, so a pull request job cannot reach root on the CI host.
41
42**Unlocks:** no agent-approved change reaches `main` automatically, and a bad rollout undoes itself.
43
44### 2. M3: agent isolation (done)
45
46The coordinator and all agents run in the `klaus-env` VM on classic-laddie. On GitHub they act as
47the `patflynn-agent` account. On the valley they push as the `klaus-env` principal, which may push
48topic branches and nothing else. The operator's Unix account runs no agents.
49
50**Unlocks:** the valley's server-side gates bind agents whether or not the agents follow the rules.
51An agent cannot file an integration request, because only the operator's principal holds `request`.
52
53### 3. M5: cosmo on the valley (next)
54
55cosmo is hosted on the valley, with GitHub as a mirror. The design is in review.
56
57**Unlocks:** cosmo changes land only through the integrator, so `patflynn-agent` loses its path to
58cosmo's `main` on GitHub. cosmo work continues while GitHub is unavailable.
59
60The archive records two traps for a second project on the valley:
61[ida-62a7a3b](../archive/.the-valley/ideas/ida-62a7a3b-reactions-have-no-home.md) (GitHub bots left
62running on a mirror) and
63[ida-a0e5d03](../archive/.the-valley/ideas/ida-a0e5d03-second-mirror-identity.md) (GitHub refuses
64one deploy key on two repositories).
65
66### 4. M1-C: signed releases and touch-gated approvals
67
68This step is rebuilt on `sigverify`. It has two halves.
69
70- **Releases.** The operator signs sequenced release tags with a YubiKey release key, which takes a
71 PIN and a touch. Each host verifies the tag with trust roots from its running system, refuses an
72 older or replayed release, and ignores unsigned pushes to `main`. Hosts never track `main`. The
73 same check covers the hosts on `system.autoUpgrade` and the work profiles, or those paths retire.
74- **Approvals.** The identity schema and compiler accept hardware-backed keys. The `request` grant
75 moves to the operator's `ssh:valley-approve` YubiKey keys, so filing a request takes a touch. A Go
76 `valley approve` signs the repository, the change, the candidate commit, the target and the policy
77 snapshot, with batching. The integrator enforces approvals per path class. By default the
78 approval-required classes are governance, policy, identity, check definitions and `docs/`.
79
80**Unlocks:** landing on `main` and deploying to a host become separate acts, each signed by the
81operator. Agents can then hold `request` for low-risk paths, while infrastructure changes still need
82a touch.
83
84### 5. M6: klaus on the valley
85
86- The pipeline moves out of the dashboard into a daemon with persistent state, and with budgets per
87 pull request, per session and for every backend.
88- A valley backend: agents submit through `valley request` with `Change-Id` and `Klaus-Run`
89 trailers, and paused runs checkpoint to valley refs.
90- Instrumentation: head SHAs on events, a dispatch reason, check start and end, and repo-qualified
91 keys.
92
93**Unlocks:** human and agent work on cosmo and the-valley with no GitHub dependency, and a report of
94where agent wall-clock time goes.
95
96### 6. M7: throughput and research
97
98- Measure first.
99- Then try a hybrid speculative queue with evidence reuse.
100- Then run the throughput experiments: land-then-verify with automatic revert for low-risk classes,
101 and stacked changes. These run only where fixes really are cheap. DNS, routing, boot and
102 credential changes stay outside them.
103
104**Unlocks:** more accepted changes per human touch, measured against unchanged acceptance criteria.
105
106## Planned, not yet sequenced
107
108- **M2, builds and rollout.** CI builds every converging host, including the aarch64 Pis. Harmonia
109 on classic-laddie serves the cache. CI runners get memory and CPU caps. `cosmo-promote` runs in
110 the release environment. Rollouts go through role canaries and soak periods. `/srv/git` gets its
111 own ZFS dataset with snapshots.
112- **M4, the-valley's refocus.**
113 - A crash-safe landing: one ref transaction moves the target, writes a decision record to an
114 append-only ledger ref, and consumes the request. A write-ahead intent and recovery cover
115 crashes, and interruption tests prove it.
116 - The reconciliation memo includes the instance policy and registry snapshot.
117 - Workers produce missing check results, and the integrator only referees.
118 - Path classes for Go, Nix and CUE, so the integrator's own code is gated by real checks.
119 - The review flow inverts: `valley request` produces the evidence before human review.
120 - Effectful validity windows and the closure-transfer machinery are dropped.
121 - `bin/valley`, `integrator/`, `identity/` and `attest/` become one Go binary, and SSHSIG with
122 `sigverify` replaces the custom note format.
123- **Valley identity follow-ups.** qinling bumps its the-valley pin. The registry compiles when
124 qinling lands a change, as well as on its timer. The static key for `stoned-flynn` stops outliving
125 its registry expiry.
126- **Credential rotation.** The secrets whose old ciphertext stays in git history are rotated,
127 starting with the integrator's signing key.
128
129## Deliberately deferred
130
131- Capability-style delegation chains
132 ([ida-a8243d2](../archive/.the-valley/ideas/ida-a8243d2-agent-runs-act-under-delegated-authority.md)).
133 Grants in the registry are flat.
134- Approving broad intent, as a delegation contract.
135- Speculative integration. The integrator stays sequential until measurements justify more.
136- A custom change API, or "no `main`". Git and `main` stay the substrate.
137- A self-hosted forge. GitHub stays as an untrusted mirror and transport, because trust comes from
138 signatures.
139- An agent-environment fulfillment engine. `klaus-env` is a declared NixOS VM.
140
141## Open decisions
142
1431. **The release environment.** Where release builds are verified and the operator signs. It must
144 sit outside classic-laddie's root authority and away from agents. The options are weller with
145 agents kept off it, a dedicated small machine, or a laptop used only for releases.
1462. **The touch budget.** Which path classes need approval in cosmo and the-valley, and the batching
147 policy, such as one ceremony per release covering integration and promotion.
1483. **The work-profile switch.** Keep it paused, or bring it under signed promotion.
1494. **Phase 2 release manifests.** When releases pin exact closures, signed off classic-laddie, so
150 the cache becomes untrusted transport.
1515. **`docs/` as an approval-required path class.** Now, or with the approval rework.
1526. **The `klaus-env` memory size.** The VM's memory is too small for a full `nix flake check` of
153 cosmo.
1547. **Where new knowledge-graph nodes go.** See the proposal in [AGENTS.md](../AGENTS.md).