gunk-dev/the-valley
the-valley:oc-0bd6677outcomeopen

The valley provides durable operational history and observability

State
free to start
Created
2026-11-01 by contributor
Progress
0 of 2 done
Children

Body

Observability is a valley platform capability. Operators and clients can ask what happened, why work is waiting, where time and resources went, and what state can be reconstructed after a failure. The answer must survive the session, harness, workstation and host process that produced it.

This develops ida-ef3cc9b, the operational data warehouse idea, into an explicit platform outcome. On 2026-11-01 the operator accepted the immediate session telemetry work as a short-term way to unblock CI investigation, while asking for a separate durable valley-native solution. The operator also prefers retained workflow history to be authoritative. The store and transport have not been selected.

Required capabilities:
- A common versioned record model for changes, approvals, evidence preparation/publication, checks, controller decisions, integration and deployment, agent runs and costs. Correlate project, identity, change/version, exact head/tree, run/attempt, cause and relevant policy/evidence. Define provenance and trust; arbitrary build text is not a trusted event.
- Durable accepted workflow history with an explicit acceptance/commit point, recovery and replay semantics. Specify how history and referenced objects remain available across restart and machine loss, and how current views can be rebuilt. Reconcile history with approval/evidence authority and external effects. This requirement cannot be met by a lossy diagnostic spool or a best-effort bus publication after the fact.
- Diagnostic logs, measurements and traces with explicit retention, aggregation, privacy, quotas, sampling and visible loss. Not every log line belongs in authoritative history. Define separately what may be dropped without delaying work and what must be durable before an action can be acknowledged.
- Valley-owned producer and consumer contracts. The CLI, agent sessions, dashboards and reporting tools are clients of those contracts. Collection, queries and resumable subscriptions must not depend on one harness, one shell command, one host journal or one UI. Define identity/read boundaries, revocation and cross-project access.
- Queryable current state and historical explanations, including queue/evidence wait, check execution, retries, resource contention and approval-to-landing latency. Measurements distinguish source/receipt time and overlapping work. Reports state freshness, gaps and their workload denominator.
- Operational ownership for schema evolution, storage growth, repair/backup/restore and the observability service itself. Test crash windows, duplication/reordering, disconnected producers, clock skew, retention boundaries, access changes and reconstruction from durable records.

Design work must specify these requirements and acceptance scenarios before choosing storage or a broker. JetStream is one candidate, not an agreed architecture. Resolve the authoritative-history boundary jointly with qn-53c2cd3; reuse oc-d1eff79 for durable harness records rather than creating a second run archive. The runtime and CI controllers are producers and consumers of the same platform contracts.

The immediate oc-8e7e027 work stays under the CI latency mission and may ship independently. Its SSH interface, journal access and bounded spools are an interim diagnostic capability. Reuse its safe instrumentation where useful, but define an explicit adoption/migration path and do not make its provisional storage or transport the permanent architecture by accident. Completing that work does not complete this outcome, and this design must not block the current CI fixes.

Done when a reviewed architecture defines the contracts and durability boundaries; implementation slices deliver them; and deployed clients demonstrate retained cross-component history, recovery/reconstruction, authorized queries and subscriptions, plus trustworthy latency/resource reports. A document or a locally queryable spool alone is insufficient.

Comments

No comments.