gunk-dev/the-valley

roadmap.md

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