Provisioning progress: explore splitting the one weighted bar into two — service download and installation #434

Closed
opened 2026-08-11 14:47:02 +00:00 by ben · 2 comments
Owner

Request (Ben, live QA 2026-08-11)

During the Files deploy the single weighted bar (DDR 0156) sat at 26% for the entire fat middle step — correct by construction (the deploy-services step weighs 12/19 and the wire only reports step transitions), but it reads as frozen during a long first-time closure download.

Explore splitting the deploy progress into two bars:

  1. Service download — the closure fetch/seed onto the node (the network-bound phase; on a slow link this dominates).
  2. Installation — the build/switch/activation on the node (the CPU-bound phase).

Notes for the design pass

  • The current wire is deliberately coarse: DeployRun frames carry step transitions only, no per-step estimate — the running step shows an indeterminate shimmer (DeployProgress.vue, DDR 0156; sibling of the founding bar, DDR 0144). Real download progress exists underneath (nix copy/substitution reports bytes) but is not surfaced through the clan seam today; the seam would need to carry it (an Event stream already exists on Deploy.Run).
  • Decide honesty rules first (ADR 0100): a bar may only show numbers the seam can back — bytes-fetched/total is backable for downloads; switch progress may stay a shimmer or fold to sub-steps.
  • Fold into the DDR 0156 contract (or a successor DDR) + the P4-S4 wireframe before implementation; weights/patience-line wording will need re-calibration.
  • Related observed pain: first-ever deploy on a machine shows the seeded 10–30 min patience range; two bars would let the download phase carry its own honest signal.
## Request (Ben, live QA 2026-08-11) During the Files deploy the single weighted bar (DDR 0156) sat at 26% for the entire fat middle step — correct by construction (the deploy-services step weighs 12/19 and the wire only reports step transitions), but it reads as frozen during a long first-time closure download. Explore splitting the deploy progress into **two bars**: 1. **Service download** — the closure fetch/seed onto the node (the network-bound phase; on a slow link this dominates). 2. **Installation** — the build/switch/activation on the node (the CPU-bound phase). ## Notes for the design pass - The current wire is deliberately coarse: `DeployRun` frames carry step transitions only, no per-step estimate — the running step shows an indeterminate shimmer (`DeployProgress.vue`, DDR 0156; sibling of the founding bar, DDR 0144). Real download progress exists underneath (nix copy/substitution reports bytes) but is not surfaced through the clan seam today; the seam would need to carry it (an Event stream already exists on `Deploy.Run`). - Decide honesty rules first (ADR 0100): a bar may only show numbers the seam can back — bytes-fetched/total is backable for downloads; switch progress may stay a shimmer or fold to sub-steps. - Fold into the DDR 0156 contract (or a successor DDR) + the P4-S4 wireframe before implementation; weights/patience-line wording will need re-calibration. - Related observed pain: first-ever deploy on a machine shows the seeded 10–30 min patience range; two bars would let the download phase carry its own honest signal.
Author
Owner

Design tier complete (Ben's deploy-bar-ui-refactor session, 2026-08-11): DDR 0164 — the deploy bar splits into download and install (docs/adr/0164-design-the-deploy-bar-splits-into-download-and-install.md). Ruled: two stacked bars on P4-S4 — Downloading service software fills from the measured substitution signal (paths done/total, bytes on the live line; covers seed-closures + the node's substitution inside deploy-services), Installing & starting fills by settled step slices with a calibrated within-slice fill ("~N min left") from this machine's last install; first-ever deploy shows shimmer + the honest seeded range (ADR 0100). Wire: the polled DeployRun frame grows the download-progress field; calibration splits download/install durations. Founding's single bar (DDR 0144) explicitly untouched. Note #429 is a prerequisite for the bars to be honest. Frame amended: p4-s4 (✎ 2026-08-11). Flipping to ready-for-agent.

Design tier complete (Ben's deploy-bar-ui-refactor session, 2026-08-11): **DDR 0164 — the deploy bar splits into download and install** (`docs/adr/0164-design-the-deploy-bar-splits-into-download-and-install.md`). Ruled: two stacked bars on P4-S4 — *Downloading service software* fills from the measured substitution signal (paths done/total, bytes on the live line; covers seed-closures + the node's substitution inside deploy-services), *Installing & starting* fills by settled step slices with a calibrated within-slice fill ("~N min left") from this machine's last install; first-ever deploy shows shimmer + the honest seeded range (ADR 0100). Wire: the polled DeployRun frame grows the download-progress field; calibration splits download/install durations. Founding's single bar (DDR 0144) explicitly untouched. Note #429 is a prerequisite for the bars to be honest. Frame amended: `p4-s4` (✎ 2026-08-11). Flipping to ready-for-agent.
Author
Owner

Landed as 7791dca on origin/main (DDR 0164).

What shipped

Seam (Go): DeployRun grows Download {paths_done, paths_total} — the measured substitution signal (the DDR 0134 honesty class founding's enroll-copy uses). applyRevision now consumes the clan.Deploy Event stream: it counts store-path lines (copying path/building) onto the numerator, reads the stage Total as the denominator, and rides the raw nix line as the deploy-services live line (bytes on the live line). A stream-less deploy leaves Download nil and the download bar shows the honest shimmer, never a fabricated number (ADR 0100). snapshot() deep-copies it; the fake seam gains FakeConfig.SubstitutionPaths to drive the wiring under test.

UI (dashboard): DeployProgress.vue renders TWO stacked bars per the p4-s4 ✎ amendment — Downloading service software (data-bar="download", download-measure "N of M · P%", measured fill) above Installing & starting (data-bar="install", settled step slices, the switch weighs the fat slice), each with its own data-state, per-bar monotonic hold, and shimmer on the running bar only. Founding's single bar (DDR 0144) untouched.

Evidence: internal/provision/deploy_test.go (TestDeploy_StreamsTheMeasuredDownloadSignal, TestDeploy_NoSubstitutionStreamLeavesDownloadNil) — go test + -race green; dashboard/tests/unit/provisionDeployProgress.test.ts (11 tests, two-bar contract) — full dashboard suite 1025 green, vue-tsc clean; gofmt/vet/golangci-lint clean; pre-push Go gate (go test ./...) green.

Follow-ups (noted in STATUS.md, not blocking this slice):

  1. The production clan machines update adapter still runs as a blocking cli.Run and emits no per-path Progress events — the download bar reads measured the moment that adapter streams its nix output; the consumer + seam field are already in place.
  2. DDR 0164's calibrated within-slice "~N min left" install fill awaits the calibration file's download/install split — until then the install bar honestly shimmers (the DDR's own first-ever fallback, ADR 0100).
Landed as `7791dca` on origin/main (DDR 0164). **What shipped** *Seam (Go):* `DeployRun` grows `Download {paths_done, paths_total}` — the measured substitution signal (the DDR 0134 honesty class founding's enroll-copy uses). `applyRevision` now consumes the `clan.Deploy` Event stream: it counts store-path lines (`copying path`/`building`) onto the numerator, reads the stage `Total` as the denominator, and rides the raw nix line as the deploy-services live line (bytes on the live line). A stream-less deploy leaves `Download` nil and the download bar shows the honest shimmer, never a fabricated number (ADR 0100). `snapshot()` deep-copies it; the fake seam gains `FakeConfig.SubstitutionPaths` to drive the wiring under test. *UI (dashboard):* `DeployProgress.vue` renders TWO stacked bars per the p4-s4 ✎ amendment — **Downloading service software** (`data-bar="download"`, `download-measure` "N of M · P%", measured fill) above **Installing & starting** (`data-bar="install"`, settled step slices, the switch weighs the fat slice), each with its own `data-state`, per-bar monotonic hold, and shimmer on the running bar only. Founding's single bar (DDR 0144) untouched. **Evidence:** `internal/provision/deploy_test.go` (`TestDeploy_StreamsTheMeasuredDownloadSignal`, `TestDeploy_NoSubstitutionStreamLeavesDownloadNil`) — go test + -race green; `dashboard/tests/unit/provisionDeployProgress.test.ts` (11 tests, two-bar contract) — full dashboard suite 1025 green, vue-tsc clean; gofmt/vet/golangci-lint clean; pre-push Go gate (`go test ./...`) green. **Follow-ups (noted in STATUS.md, not blocking this slice):** 1. The production `clan machines update` adapter still runs as a blocking `cli.Run` and emits no per-path Progress events — the download bar reads measured the moment that adapter streams its nix output; the consumer + seam field are already in place. 2. DDR 0164's calibrated within-slice "~N min left" install fill awaits the calibration file's download/install split — until then the install bar honestly shimmers (the DDR's own first-ever fallback, ADR 0100).
ben closed this issue 2026-08-11 17:09:18 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#434
No description provided.