Progress for builds, copies and deploys #22

Open
slop-cannon Bot wants to merge 8 commits from progress into main
pull from: progress
8 Commits
Author SHA1 Message Date
jackos1998andClaude Opus 5.5 6bce33dc66 slop: Draw a bar for each node
CI / Check (pull_request) Successful in 5m49s
A deploy drew a bar for each phase of each node, so bars came and went
as nodes moved from copying to comparing to activating. Each node now
keeps one bar, labelled with its name, through all three, saying what
it's doing like the web app's rows; it goes once the node is activated
or has failed. Lines for agents are unchanged.

Bars tick every 100 ms: `indicatif` drops draws that come too close
together, which left a stale bar until the next update. Tests draw on
`indicatif`'s in-memory terminal, at stderr's rate, and check the
screen through a node's steps.

Refs #21

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:33:15 +00:00
jackos1998andClaude Opus 5.5 817655ad77 progress: Share formatting and phases between slop and the web
Times are formatted by `humantime` and sizes by `indicatif`, which
were already dependencies, instead of by our own code, and the web
app's copy of the time format is gone. Sizes now have two decimals.

The latest progress of each phase, and how each node is getting on,
move from `runs::Run` to `progress::Phases`, so `slop` can use them
too. A phase's counts and what's running now are written once, in
`Progress`, for its line, its bar in `slop` and the web app.

Refs #21

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:33:15 +00:00
jackos1998andClaude Opus 5.5 df3aac8208 progress: Report evaluating apart from building
Evaluating a big flake can take minutes before Nix builds anything,
which looked like a build stuck at nothing. The build is now two
phases: evaluating, until Nix starts its first build, fetch or copy,
and building. The builder tells the broker when evaluation ends with
`Reply::Evaluated`, or after the build when Nix had nothing to do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:33:15 +00:00
jackos1998andClaude Opus 5.5 a8a2303d2c demo: Build the app from slower, bigger parts
The demo's app built and copied in moments, which left nothing for the
progress in `slop` and the web app to show. It now has twelve parts in
three layers, each layer built once the one below it is, so a build
takes about a minute and a half; each part adds a few MiB to copy, and
the box VM has room for them. `demo-help` shows `--logs` too.

The parts follow from the version alone, so a version built before is
already in the builder's store and only evaluates, and a new one
rebuilds them all. `demo-bump` in the agents' VM sets a new version
and pushes it on a branch of its own, and a check runs it against a
bare copy of the repository, including from a fresh clone, as after
the VM restarts.

Refs #21

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:33:15 +00:00
jackos1998andClaude Opus 5.5 b71d0d7c36 test: Check the progress of deploys and builds
Deploys show progress as plain lines without build logs or escapes,
which only come with `--logs`. Copies count paths and bytes: two paths
to `box` at first, then only the new profile. The push to the cache
counts its closure, and the audit log keeps how each phase ended.

Refs #21

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:13:27 +00:00
jackos1998andClaude Opus 5.5 45075229de web: Show the progress of running requests
The broker keeps the latest progress of each phase of requests that
build (`runs::Runs`), from the build on. A request's page shows a
full-width bar for the build and a row for each node in its region,
and the main page gets a region of its own listing running requests
with a bar each, both kept current by the page's event stream. A
request's page reads the audit log again only when the queue changes
or a run starts or ends, not with every bit of progress.

The `finished` and `failed` audit events keep how each phase ended,
which the request's page shows afterwards.

Refs #21

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 20:13:27 +00:00
jackos1998andClaude Opus 5.5 0f9f56f7b0 slop: Draw progress bars
On a terminal, `slop` keeps a bar for each running phase below other
output, drawn by `indicatif`. Remote output can stop mid-line, which
bars drawn then would overwrite, so they hide until the line ends.
Without a terminal, or with `TERM=dumb`, where `indicatif` draws
nothing, it writes a plain line for a running phase every 30 seconds
and one when it ends, as for agents.

Refs #21

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 19:26:22 +00:00
jackos1998andClaude Opus 5.5 672ae1a489 progress: Report build, copy and deploy progress
The builder and the broker run Nix with `--log-format internal-json`
and turn its activities into `Progress` messages for each phase: the
build, each node's copy, comparison and activation, and the push to
the cache. Build logs no longer stream by default, since they're
mostly noise to an agent; `--logs` brings them back, and a failed
build's error still ends with the last lines of its log. Text from Nix
loses its terminal escapes.

The builder now answers with progress frames before its result.
Protocol 4.

Refs #21

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 19:26:22 +00:00