Measure delivery latency, human minutes and touches per outcome, and where agent and queue time go, before changing the queue.
Done when there is a baseline report of those measures.
Source: `plan.md` M7 ("Measure first") and "Success metrics".
Comments
contributor2026-10-31 18:04 UTCedited2026-11-04 00:27 UTC by contributor
Work started on 2026-10-31 for oc-0e703d0 (ordinary approved changes land within one minute). The existing measurement work remains here, rather than being duplicated under the new outcome.
Initial source and report findings:
- Integrator phase timings already exist in integrator/timing.go and are emitted to the controller journal. The moved-tree closures phase is separate.
- attest run --timings records duration_ms and eval_ms; each check can include the same shared evaluation. These fields must not be summed to estimate batch elapsed time.
- The worker currently invokes attest run without --timings, so it prints durations but does not persist the richer timing log through this flag.
- klaus report time --since 7d was captured separately for the-valley and a downstream project at 2026-10-31T18:03:32Z. Both reports contain zero approval samples. Their waits include human review/idle time and cannot be treated as integration latency. Some unknown run rows use change handles; validate these before treating aggregate run counts as a baseline.
- Local report files: session-20261031-1741-78ca0541/workspace/the two baseline report files. These are supporting artifacts, not a completed baseline.
- Read access to the deployment host's live system journal is not established from this coordinator's guest. A prior SSH probe as the default klaus user was denied. No host configuration or service was changed.
Next measurements: record the approval action timestamp and canonical landing for representative unchanged-tree and moved-tree changes, collect the integrator's stage timings, and distinguish queue delay, evidence preparation, evaluation, builds and human review. For the first implementation oc-deeb48e, measure before/after evaluator invocation count and actual batch elapsed time using the same real-Nix workload. That experiment is useful independently of the production-journal gap.
contributor2026-11-01 16:21 UTC
2026-11-01 measurement follow-up: all three first latency slices are integrated at 34d12a6791c46ff581b3762b04d61de0743e9ccc, but the consuming host pin still predates them. Record the running host's revision and unit settings before comparing timings. A pin-adoption change is running separately; a new source commit is not proof of activation.
Next comparison must distinguish ready/version publication -> check start, check execution -> evidence publication, approval action -> request publication (including any synchronous checks), and request/evidence publication -> canonical landing. Capture elapsed intervals directly; do not sum shared evaluation time from per-check records or infer approval start from Git commit dates. Report checks reused versus run, warm versus cold, moved-tip cases, queue contention and failures. The integrator wake slice must provide controlled real-host VM evidence with a distant recovery interval while this production baseline remains open.
The coordinator still cannot read the production host journal through the guest's configured Git-only SSH access. Current local session events contain no complete production approval samples. Do not silently substitute decision-stage timing for the end-to-end approval metric, or declare a p95 from these few changes.
contributor2026-11-01 16:34 UTC
2026-11-01 live latency investigation: the operator reported still waiting for checks on a small consuming-project change. A read-only coverage probe on its exact head verified passing reusable worker evidence for all 11 required checks, including three system closures and a VM firewall test. At the same observation, status reported no integration request and no landing. This wait is upstream of the integrator, so removing its 15-second sleep cannot explain or eliminate this instance.
Source finding: bin/valley:approve computes coverage once before launching its remaining checks in one attest batch. A running approval does not adopt worker evidence that arrives during that batch. This is a plausible duplicate-work race, not yet a confirmed explanation for this approval. The current approval output is needed to distinguish building, signing, publication, or another wait. No approval or process interruption was performed.
The published pure evidence has no publication timestamp, and host-journal access is still unavailable, so the exact evidence-ready time and total latency cannot be reconstructed from this observation alone. Do not report a check duration or a production percentile from it.
contributor2026-11-01 16:57 UTC
Measured operator example, 2026-11-01: the supplied terminal transcript reports an approval command wall time of 43m43s. Its toplevel host check reports 43m30.3s; the VM firewall check reports 3m54.2s. All 11 required checks passed and the request was filed. These check durations overlap and share evaluation, so do not sum them. The dominant check accounts for nearly the entire observed approval wait.
A read-only coverage probe before that approval finished had already verified all 11 required checks from the host worker for the exact same head. The operator transcript independently shows local execution of all 11, rather than reuse. The exact explanation is not yet established: the executing client version and the worker publication timestamp are missing. Possibilities include an older CLI or evidence arriving after the approval's one-time coverage read. The change has since integrated; its post-request delay was not measured.
Prioritize visibility and preparation/evidence reuse for this class of delay. A 15-second integrator-wakeup improvement remains useful but does not solve the measured 43-minute approval path. The operator now explicitly requires all valley telemetry to be viewable from a Klaus session, including client-run telemetry. This one uncontrolled sample is evidence of a bottleneck, not a production percentile or proof of a cold-cache cause.
contributor2026-11-01 18:32 UTC
2026-11-01 agent delivery latency measurement: implementation runs themselves wait on checks. The integrator wake change's initial run lasted about 46 minutes; its ownership-correctness follow-up lasted 36m46s. The final follow-up ran all 19 policy-required checks. Its sequential VM group reported ssh-e2e 55s, restack-host-e2e 44s and worker-e2e 738s: 13m57s for that group, including 12m18s for the worker VM alone. Other unit/e2e, regression-on-old-head, formatting and review runs add time; these are not a complete mutually exclusive phase breakdown.
The same change also spent 20m20s without a run between its initial completion and the follow-up start. The follow-up completed at 18:09:39Z and was still draft when inspected at 18:29Z, awaiting coordinator readiness review. Completion-to-review/readiness is therefore another measured handoff delay, distinct from build execution and operator approval.
At 18:29Z the telemetry implementation run, started at 17:08Z, was waiting on its suite after a CLI help/completion fixture fix. Its actual worker VM was running; this was local validation, not a remote integration request waiting for approval. Shared host-module changes select a broad suite, and changed derivation inputs can cause expensive VM executions across implementation iterations.
Measurement limitation: klaus report time derives check intervals from shell tool calls. A background suite launch is recorded for roughly the launch duration while later polling waits are not necessarily classified as checks. Shell success can also mask an inner failing test. Its aggregate CHECKS total is therefore not a reliable full test-wait breakdown for these runs. Retain command-level result evidence and actual process/check lifecycle observations; do not interpret zero recorded failures or a short launch duration as a passing or fast suite.
The latency baseline must include authoring/validation, failed-check and review-fix loops, completion-to-ready handoff, operator action and integration. Optimize required check granularity and trustworthy reuse from measured dependencies, without skipping correctness checks or moving waiting out of the reported interval.
contributor2026-11-01 20:05 UTC
Measured VM startup separately from scenario duration in the completed local 39-check run of 2026-11-01. Worker VM boot: 10.43 seconds; whole test script: 695.09 seconds; final cleanup: 0.01 seconds. Five timer, hold-off, recovery and failed-batch scenarios account for 486.38 seconds (about 70 percent). They execute sequentially and include waits for production one-minute scheduling intervals. CPU and memory cap scenarios together take only 42.64 seconds. Resource stress is not the dominant measured cost.
Other checks from the same run: restack-host boots in 9.12 seconds and completes its script in 30.34 seconds; ssh boots in 9.39 seconds and completes in 45.78 seconds; publish boots in 9.54 seconds and completes in 87.81 seconds, including two approximately 30-second retry scenarios; telemetry boots in 10.31 seconds and completes in 223.85 seconds. These script timings exclude derivation builds and queue time before VM execution.
The immediate optimization candidate is shorter fixture-specific timer and retry intervals with explicit assertions preserving production defaults, controlled coordination instead of fixed waits in synthetic builds, and smaller independent scenarios where concurrency is useful. Preserve real systemd, SSH, Nix daemon, kernel and failure-recovery behavior. A different provisioning system alone cannot recover the minutes spent inside these tests. Treat measured total time and retained assertions as the acceptance criteria; no speedup target has yet been demonstrated.
contributor2026-11-02 14:56 UTC
First traced approval, 2026-11-02: kwvx v2 (the-valley, head d8a8b7b), read from host and client telemetry.
- 14:35:37Z: the host worker starts preparing kwvx before approval. Its evaluation takes 85 s and its checks build one at a time in a single slot: cue-vet 2 s, module-eval 6 s, own-policy 70 s, prose-format 7 s, restack-host-e2e 93 s, telemetry-e2e 208 s, telemetry-unit 17 s, darwin-eval 1 s, then worker-e2e from 14:43:45Z.
- 14:41:51Z: the operator's approve starts (client run r20261102T144151-bf7ff690). The client evaluates in 42 s, then builds restack-host-e2e (55 s), telemetry-e2e (168 s) and worker-e2e (610 s) in parallel.
- 14:52:45.9Z: client evidence stored. 14:52:46.7Z: request pushed.
- 14:52:46.7Z to 14:52:48.5Z: integrator decision, land, 1.9 s.
- 14:53:12Z: the host worker's worker-e2e fails (exit 1 after 567 s), after the change already landed on client evidence. The cause is not established; the retained log is truncated.
- 14:55:11Z: Klaus reports the landing, 2 min 23 s after it happened.
Approval action to landing: about 10 min 57 s. Check execution during approval is about 10 min 54 s of that, and worker-e2e alone is 10 min 10 s. The integrator's share is under 2 s. Host preparation had not finished when the operator approved, so approval ran the VM checks again on the client.
One sample. It is not a baseline percentile.
contributor2026-11-02 16:25 UTC
Second traced approval, 2026-11-02: wzsy v4 (head 5605884), with evidence fully prepared before approval.
- 16:08:46Z: v3 (5d904db) is marked ready. 16:08:56Z: the host worker starts v3. Evaluation takes 76 s. The checks build one at a time, and telemetry-e2e takes 193 s. v3's evidence is stored at 16:17:06Z, after 8 min 10 s.
- 16:10:06Z: the restacker publishes v4, rebased onto 823c1f1. The worker finishes the superseded v3 before starting v4 at 16:17:19Z, so v4 waits 7 min 13 s in the queue.
- v4's run takes 83 s. Evaluation is 76 s, and every check build is a cache hit (under 0.2 s each, prose-format 6 s). Evidence is stored at 16:18:42Z.
- 16:24:09.2Z: the operator's approve starts. Policy and coverage are complete, so it builds nothing. The request is pushed at 16:24:11.35Z, 2.4 s later.
- Integrator decision 16:24:11.35Z to 16:24:13.46Z: land, 2.1 s.
- Klaus reports the landing at 16:25:22Z, 69 s after it happened.
Approval action to landing: 4.2 s. This is the first measured landing under the one-minute target. The time moved before approval. Readiness to prepared evidence took 9 min 56 s, and 7 min 13 s of that was v4 queued behind work on the version it replaced. With caches warm, the remaining fixed cost of preparation is the 76 s evaluation.
Still one sample per path; not a percentile. The host integrator ran the pre-wzsy binary, so this decision record lacks the first-seen fields.
contributor2026-11-02 16:28 UTC
Correction to the wzsy trace: the 7 min 13 s that v4 waited behind v3 was mostly not wasted. The derivations show it. integrator-e2e's derivation is identical at v3 (5d904db) and v4 (5605884), so v4 reused v3's 128 s build. The Go unit checks most likely match too, because kwvx changed only nix/checks, nix/tools and docs. telemetry-e2e's derivation differs (47rzs8nv… at v3, xbs14hpi… at v4), so v3's 193 s build of it served only v3. Even so, v4's telemetry-e2e was already valid on the host when v4 ran (built in 121 ms, empty log). Which build produced it is not established.
Dropping v3 at 16:10:06Z would have saved about v3's 76 s evaluation plus its telemetry-e2e, in the best case about 3.5 min. If v4 had needed to build telemetry-e2e itself, it would have saved under a minute. That is much less than the queue wait suggested.
The larger structural cost is serial building. The host worker runs on one CPU, so attest's buildSlots (runtime.NumCPU) is 1. With max-jobs = 1 and cores = 4 (nix/valley-host.nix workerNixConfig, enforced by module-eval in nix/checks/host-module.nix), checks build one after another. v3's builds summed to about 413 s. Built in parallel, they would be bounded by telemetry-e2e at 193 s. The operator's client builds them in parallel (slot_wait_ms 0).
contributor2026-11-02 20:15 UTC
Third traced approval, 2026-11-02: runz v2 (d934d6b). Approved at 20:02:24Z, before the host worker had evidence for any of its 33 required checks; it was still building them one at a time. The operator's client (32 build slots) built all 33 side by side; worker-e2e took 596 s, web-unit 314 s, valley-request 297 s, web-push-e2e 262 s. Evidence was stored at 20:12:58.8Z, and the request was pushed at 20:12:59.6Z. The integrator decided from 20:12:59.6Z to 20:13:03.4Z (land, 3.8 s). Approval action to landing: 10 min 39 s, all of it client check builds. Klaus reported the landing at 20:14:16Z, 73 s later.
contributor2026-11-08 22:30 UTC
Done: the baseline exists as traced approvals from telemetry and a 37-landing summary on oc-489b470. Measuring every landing is part of oc-0e703d0's success criteria.