An operator wants a host unit of their own to run when a named project's main lands, with no timer. No general declaration exists: the mirror queue has one dedicated consumer, the web publisher runs on an interval, and telemetry local sources observe units without starting them.
Design drafted in a consult, 2026-11-21, not built:
- Semantics: converge to the latest tip, not once per landing. Landings during a run coalesce; after a run, main is read again and the newest tip runs if it differs. Repetition is possible, so the unit must tolerate it.
- Declaration, in the host's configuration: services.valley.onMain.<name> = { project; unit; }. The operator declares the unit itself (command, user, credentials, sandbox, timeout) in the ordinary way.
- A small Go bridge watches the repository's ref storage (loose refs and packed-refs), establishes watches before reading, resolves refs/heads/main through git, and rereads after overflow. It alone starts the bound unit, serialises attempts, and hands VALLEY_REPOSITORY and VALLEY_COMMIT through a generated environment file that does not change during a run. On start it reconciles the current main.
- Failure leaves the unit failed and visible through a telemetry local source. Retry on a new tip or by the operator; no automatic restart loop.
- Not to build: a deployment engine, per-landing job history, an acknowledgement protocol, a new attestation kind, or a callback chain on the mirror drain. The bus is not authoritative (unauthenticated). The bridge may start only its bound unit; the integrator and worker get no deployment credentials.
- Concept at risk: "follows" (checks producing evidence on main) must not be extended to host actions; telemetry sources stay observations.