Repository navigation
Description
impl: telemetry rollup — one stats pipeline under fleet init (implements the #5925 design)
Implementation follow-up for the design in #5925 ("design: telemetry rollup — one stats pipeline under fleet init"). The design is complete in that issue's body: inventory of 11 components with keep/fold/adopt/delete/move verdicts, coverage analysis, two-purpose audit of init, explicit end state, and acceptance criteria. This issue is the implementation half of criterion 4 (follow-ups as separate issues); the design itself implements nothing.
End state (from #5925)
fleet init (location-aware, #5687) ensures exactly: {proxy serve + pool prewarm; sysstat-collector; pidstat collector; tree-size cache writers} on the sandbox. Aggregation lives laptop-side. The boot-init job shrinks to: append one boot record, invoke fleet init prewarm, exit — and ~/tools/init.sh is deleted outright once the #5770 generic restorer owns the shed installers/restores.
Slices
- pidstat collector: add a persistent pidstat loop in the sysstat unit family (
pidstat -urdclass), writing per-PID daily files beside~/logs/sysstat/sa-<day>; 14-day retention to match. - Boot record fold: fold the init.sh telemetry block into the rollup boot record; promote
~/logs/init.jsonlto the canonical boot/stats series (one record per boot: duration, store/profile counts, disk, latency samples). Retire~/logs/init-statusas the read path — sweeps read the JSONL. - resource-sampler retirement: once the pidstat history + a daemon-state event exist in the rollup, retire
~/logs/resource/resource-<day>.log's bespoke script/unit (historical logs stay). - Tree-size cache writers: generalize the detached
du→~/logs/.nix-persist-sizepattern: one throttled cache-writer per watched tree, value+timestamp, consumers tolerate staleness explicitly. - Dead-probe removal: delete
conn-watch.pyremnants (already stopped per Standing-load inventory 2026-11-04 (WS-C): residents measured — daemon dominates, RustDesk on-demand only, conn-watch stopped, sysstat keep #5775) and remove the init.sh live verification probes (services-verify900 s budget, toolchain presence checks, nix eval smoke) — health is read from the rollup/watchdog, never probed at boot. - Laptop-side aggregates: per-hour trip aggregates from trips.jsonl (counts by status/failure class; per-leg p50/p95 once Trip logging v2: four timestamps per trip (sent / received / duration / returned) for per-leg attribution #5702's four timestamps land) and the per-lane proof table (tasks completed per lane per shift) computed laptop-side on a slow cadence; fleet-watchdog reads these outputs instead of live-joining agent.tasks.
Explicitly out of scope (per the design)
- quota-recorder stays separate (Standing-load inventory 2026-11-04 (WS-C): residents measured — daemon dominates, RustDesk on-demand only, conn-watch stopped, sysstat keep #5775 owns its cadence ruling) — rollup consumers may read its outputs as a source only.
- The installers/restores init sheds land in the Migration M3: sandbox quota-recorder as first sandbox deploy target + generic unit restorer #5770 generic restorer, not here; the final
~/tools/init.shdeletion waits on that landing. - No stats DB unless query pain actually appears; files first.
Acceptance criteria
- All six slices landed or explicitly deferred with a named owner/issue.
- A consumer (watchdog or sweep) reads at least one rollup output instead of a live probe/join, demonstrated in its code.
- design: telemetry rollup — one stats pipeline under fleet init (sysstat + extra stats); init reduced to stats + prewarm #5925's acceptance criteria all checked, including this issue linked from design: telemetry rollup — one stats pipeline under fleet init (sysstat + extra stats); init reduced to stats + prewarm #5925.
Links: design #5925 · #5687 (fleet init location semantics) · #5701 (sampler-gap incident) · #5702 (trip log v2) · #5770 (generic restorer) · #5775 (standing-load rulings) · #5766 (deploy tool owns fleet symlinks)
Activity
developing-today commentedon Nov 7, 2026
Picked up by
repo-worker-code-c— working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live whilerepo-worker-code-cposts progress markers; after 30 minutes of silence any other worker may pick this up.)developing-today commentedon Nov 7, 2026
Progress from
repo-worker-code-c: scoped: umbrella of 6 slices, dependencies #5770/#5702 open; posting slice-independence map, releasing free for per-slice claimsdeveloping-today commentedon Nov 7, 2026
🤖 Agent note · scoped (umbrella — work per-slice, not as one claim)
Verified fresh (2026-11-07):
6759appears in design: telemetry rollup — one stats pipeline under fleet init (sysstat + extra stats); init reduced to stats + prewarm #5925's body/comments).~/tools/init.shdeletion) is still OPEN and parked/queued; the init.sh-deletion part of this issue is blocked on it, exactly as the issue body says.conn-watchremnants exist in the laptop~/toolsor in this repo'sinfra//doc/fleet/trees today (the stopped-per-Standing-load inventory 2026-11-04 (WS-C): residents measured — daemon dominates, RustDesk on-demand only, conn-watch stopped, sysstat keep #5775 remnants named in the slice were not found); the init.sh live-probe removal half of that slice was not verified here and remains open.Slice independence map (for per-slice claims):
Disposition: releasing free. This issue stays OPEN as the umbrella; each slice above is a claimable unit of work, and the acceptance list should be checked slice-by-slice as those land or are explicitly deferred to a named owner.
developing-today commentedon Nov 7, 2026
Released by
repo-worker-code-c(outcome: free). Scoped (fallback): 6-slice umbrella verified - #5925 design open and already links #6759; #5770 restorer open/parked blocks init.sh deletion; conn-watch remnants absent on laptop/repo (dead-probe slice partial); pidstat slice unstarted by unit evidence. Slice independence map posted: pidstat + tree-size writers independent, boot fold before sampler retirement, aggregates partly on #5702. Remainder: claim and land slices individually.98 remaining items
dezren39 commentedon Nov 24, 2026
Lane oc-code-06 rechecked task 22899 on 2026-11-24. The packet requires editing the canonical
hatch-personal/scripts/boot-hook/init.sh, live~/tools/init-ensure.sh, and deployed~/tools/~/logsreaders. The claimed scratch checkout isdeveloping-today/codeand contains none of those paths; the canonical hatch-personal source checkout exists locally, but laptop-route doctor reports all laptop transport legs unavailable, and the live tool/log paths are absent here. No files were changed. Parking the task until a reachable laptop route is available so the boot-record + sweep migration can be implemented and verified as one coherent slice; acceptance remains outstanding.dezren39 commentedon Nov 24, 2026
Lane any-n (task 22899, boot-record-fold slice) parked on 2026-11-24. The laptop shell route now answers, but the packet's live surfaces are absent: ~/tools/init.sh, ~/tools/init-ensure.sh, ~/logs/init.jsonl and ~/logs/init-status do not exist, and hatch-personal has no tracked scripts/boot-hook/init.sh. No files changed. Resume when the canonical boot-init source is located or fleet init owns the boot record (#5925). Re-check set for 2026-11-25 18:00Z.
dezren39 commentedon Nov 26, 2026
Task 22899 source-route recheck (agent-next-22-local, 2026-11-26):
fleet shell targetsreports laptop and Codespace unreachable; this lane runs onamd.~/tools/init.sh,~/tools/init-ensure.sh,~/logs/init.jsonl, and~/logs/init-statusare absent on this host./home/user/git/hatch-personalcheckout contains the log files but has noscripts/boot-hook/init.sh; a search across the local hatch-personal clones found no canonicalinit.shorinit-ensure.sheither.hatch-personal/scripts/boot-hook/init.shand live~/toolsreaders are available from an authenticated source copy. Then fold the boot fields into JSONL and update the readers as specified in the earlier impl: telemetry rollup — one stats pipeline under fleet init (implements the #5925 design) #6759 route note.developing-today-fleet commentedon Nov 27, 2026
Task 22899 recheck — agent-next-19-local, 2026-11-27:
~/tools/init.sh,~/tools/init-ensure.sh,~/logs/init.jsonl, and~/logs/init-statusare all absent.hatch-personal/mainsource hasscripts/boot-hook/init.sh, which already appends a boot record to~/logs/init.jsonlwith duration, store/profile counts, disk, and latency fields. It still writesinit-status; no trackedinit-ensure.shreader exists in the repo tree.~/tools/init-ensure.shand sweep reader, plus logs, so producer and consumers can be migrated and verified together.Resume condition: the Hatch runtime or authenticated source copy provides the live readers/logs. Recheck in six hours and resume earlier if that source becomes available.
developing-today-fleet commentedon Nov 27, 2026
Task 22899 recheck — lane oc-code-02, 2026-11-27 (fresh verification, parked with 6h recheck):
hatch-personal@main:scripts/boot-hook/init.sh(shaad37e3f, 549 lines) still writes BOTH$STATUSkey=value block and the JSONL; JSONL still lacksstart_datetime,quota,quota_spool. Fold not landed.init-ensure.shanywhere in the hatch-personal tree (scripts/boot-hook/holds only README, boot-check/boot-ensure/init/install-hook/nix-ensure). The consumer reader remains host-only.fleet shell --target laptop:~/tools/init.sh,~/tools/init-ensure.sh,~/logs/init.jsonl,~/logs/init-statusall missing (this host is/home/user, not the/home/hatchHatch runtime).developing-today/code:init-status/init.jsonlappear only in fixtures/audit supplements under stale.worktrees/. Read path still centers on init-status (install-hook.sh:60,README.mdprocedures).lane-oc-code-06-6759-boot-record-foldholds no slice commits, old worktree dir already gone.Resume when a reachable Hatch runtime (
/home/hatch) or authenticated source copy provides~/tools/init-ensure.sh, the sweep readers, and logs, so producer + consumers migrate and verify together. Task parked withnot_before=2026-11-27T23:47:03Z.dezren39 commentedon Nov 28, 2026
Lane 1807-C-C (Xaltha seat, charlie ADVANCE) claiming the boot-record-fold slice of #6759 (queue task 22899).
Premise recheck from THIS seat — the resume condition is met here: this is the Hatch runtime (
/home/hatch). Live~/tools/init.sh,~/tools/init-ensure.sh,~/logs/init.jsonl, and~/logs/init-statusall exist on this host, so producer + consumers can be migrated and verified together per the 2026-11-24 specification recorded on this issue.Plan: fold
start_datetime/quota/quota_spoolinto the JSONL boot record in canonicalhatch-personal/scripts/boot-hook/init.sh(init-status stops being written), deploy byte-identical to~/tools/init.sh, migrate the~/tools/init-ensure.shprevious-failure reader and the boot-check hook prompt/read-path text to the JSONL, run the spec step-5 tests, and tick the slice checkbox. #6759 stays open (3 slices remain after this one).dezren39 commentedon Nov 28, 2026
Boot-record-fold slice LANDED — lane 1807-C-C (Xaltha seat, charlie ADVANCE), 2026-11-27.
The parked resume condition was met on this seat: this is the Hatch runtime (
/home/hatch) — live~/tools/init.sh,~/tools/init-ensure.sh,~/logs/init.jsonl,~/logs/init-statusall present, so producer + consumers migrated and verified together per the 2026-11-24 specification on this issue.Canonical (dezren39/hatch-personal PR #132, merged e5973f5, head 6c9c84a):
scripts/boot-hook/init.sh: previous-boot info parses the lastinit.jsonlline via python3 (boot_id,ts); legacy init-status greps kept only as fallback for a missing/unparseable JSONL. The key=valueinit-statuswrite block is deleted; the JSONL record gainsstart_datetime,quota,quota_spool. Header/quota-spool comments updated.scripts/boot-hook/install-hook.sh: boot-check hook prompt reads the last line of~/logs/init.jsonl(the canonical boot record).scripts/boot-hook/README.md: procedural mentions updated (hook-instruction summary + "Verify a boot" procedure); dated journal entries untouched.Live on this seat:
~/tools/init.sh(it has drifted from canonical — muse-boot header, rust-check fix, no quota-spool block — so it was folded in place rather than overwritten; its JSONL gainsstart_datetime+quota). Backups of both pre-fold live files were taken before editing.~/tools/init-ensure.sh(host-only reader): previous-failure surfacing now reads the last JSONL line (ts→END_DT,result→RESULT, empty on any error); watermark semantics unchanged; stale-init comment updated to "(the boot record is only appended at END)".Verification (spec step 5):
bash -nclean on all edited scripts; branch copies byte-compared against the tested files before merge.sboot_id/ts`.bash ~/tools/init-ensure.shagainst the live JSONL exits 0 silently.s JSONL line carrying the folded fields (block-level proof stands in; init-status mtime freezing after the next boot is the observable). The live boot-check hook registration is not a file on this seat (~/hooks/definitions/is empty); its prompt source ininstall-hook.sh` is updated, and re-registration from that source is the one follow-up.Slice checkbox ticked. #6759 stays open — 3 slices remain (resource-sampler retirement, dead-probe removal, laptop-side aggregates).
developing-today-fleet commentedon Nov 28, 2026
Queue task 22899 completed (done) — lane any-o, 2026-11-28 ~04:30Z
Boot-record-fold slice verified landed elsewhere; no change in this repo.
developing-today-fleet commentedon Nov 29, 2026
Census 2026-11-29 (Felix):
fleet initensure-set), and slices are checkboxed in the body with per-slice landing notes in the thread (pidstat collector ✓, tree-size family landed, boot-record fold LANDED 2026-11-28 via hatch-personal PR 132, queue task 22899 completed).developing-today-fleet commentedon Nov 29, 2026
Issue census — 2026-11-29
Gaps found: no effort/* and no source/* (effort remedied this pass; filer not stated, source left unlabelled).
Strengths: detailed body with context a picker-up can start from; linked to its epic/programme via epic/* labels; full
## Acceptance criteriapresent.Actions taken: labels added this pass:
effort/lPriority:
priority/normalretained — matches the work's urgency as evidenced on the issue; no band change.