gunk-dev/the-valley
the-valley:oc-d2a370doutcomeopen

A check's full build log is kept and readable from a session

State
free to start
Created
2026-11-10 by contributor

Body

Today the worker keeps at most the first 256 KiB of a check's output, in a bounded diagnostic spool. A long build that fails near its end loses the lines that explain the failure (bd-93360e8), and once a retry passes, nothing from the failed attempt can be read from a session.

Outcome: the worker keeps the full output of every check attempt, compressed, named by tree, check and attempt. A check's result record names its log. A session reads a log, whole or its tail, through the same authenticated read path and project scoping as telemetry.

Requirements:
- A host setting names the log store's directory and its size limit. The valley assumes nothing about where that directory lives: local disk or a network share.
- Builds and evidence never wait on the store. The worker writes a log to its own local disk while the build runs and moves it into the store after the check ends. If the store is unavailable, logs queue locally under a bound, and telemetry shows the queue and anything dropped.
- Retention is policy: failed attempts can be kept longer than passed ones, and when the store is over its limit the oldest passed logs go first. A reader can tell a log that was dropped from one that never existed.
- Build output is untrusted text. It is served escaped and bounded, and never parsed into telemetry records.
- This is the diagnostic-log piece of oc-0bd6677. Its naming, retention and read contract should be adoptable by that platform rather than replaced.

Open for design review: whether logs live beside the evidence refs in the repository or in a plain file store served by the read path (refs make retention and publication harder), and whether logs from client-side attesters reach the same store.

Tests prefer the real binaries and NixOS VM tests: a long failing check whose tail is read after a retry passed; the store unavailable during a check; eviction at the size limit.

Comments

No comments.