Implement the first local event-driven preparation and integration path under the settled shared wakeup contract. This is a platform feature, configurable through the valley host module, with no project-specific polling script.
Acceptance:
- A ready version wakes its eligible worker promptly; published evidence and an integration request wake the relevant integrator promptly.
- Required policy and signer changes also cause the appropriate reread.
- Relevant events during a running pass are not lost, duplicates coalesce, and unrelated projects are not needlessly awakened.
- Restart and interrupted delivery recover from durable refs/due state. Recovery resync and retries retain correctness without setting normal latency.
- The normal warm path is measured end to end against the baseline, with queue time distinct from work time.
- A real NixOS integration test drives real pushes, evidence publication, concurrent updates and process/service restart. Existing authorization and integration behavior stays intact.
- Host activation, deployment and any remote NATS consumer remain separately reviewed work. This slice uses the local contract approved by its prerequisite; bus authentication is not bypassed.
Research: nix/valley-host.nix has postReceiveDispatch, busPublisher, busEventHook, the publish queue and its path unit, valley-worker.service/timer, and valley-integrator@.service. integrator/bus.go queues landing ref moves. integrator/main.go and status/worker.go contain the current reconciliation entry points. Keep the design usable by Klaus and later valley jobs.
Comments
contributor2026-11-08 22:24 UTC
Measured, as an estimate from worker telemetry: with nothing ready, the worker's passes run about every 77 s and cost roughly 0.6 of a core.
contributor2026-11-08 22:29 UTC
Done: workers and integrators wake on their input refs, recover after a restart, and reread on policy and signer changes (oc-29d5091, oc-9daa661, and bd-4619dc1 in bc331c79). The durable wakeup contract stays open as qn-53c2cd3.