carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1# Census: wake latency, pass 1
2
3Status: ACCEPTED as proposed by the census owner on #280, 2026-10-24, as
4`census-ruling-wake-latency-1`. Every row now carries
5`rev3=census-ruling-wake-latency-1`; the `@legacy` fingerprints were
6recomputed and the seal moved to
7`09e20ea4bbc534710334e632e903878656dabfb5817d4d96c6e7c56508172148`.
8
9The census owner's rationale (the recommendation, accepted): clock reads and
10journal lines only, no read added or moved, the same class as the accepted
11envelope re-pins.
12
13The branch is `wake-latency-1`, cut from amadan `main` at 64a002c8. A dev
14wake took 843 ms for an app that boots in milliseconds, and a box-wide
15`systemctl daemon-reload` inside instance-control's generation start took
16297 ms of it (dev box journal, 2026-10-24 11:16:31). The branch:
17
18- starts a generation without the reload when systemd already reads its
19 drop-in (`internal/instancectl/gen.go`, `startGen` and
20 `genDropInApplied`): one `systemctl show` of Slice, NeedDaemonReload and
21 the tier's three memory lines, and a reload only when any of them is not
22 the drop-in's, then the same check again before the start;
23- backs off health probes from 5 ms to 50 ms instead of a fixed 150 ms
24 (`waitHealthy`, `waitHealthyAddr`);
25- logs per-step wake timing to the journal (`wakeSteps`).
26
27It adds one root-read overlay,
28`internal/provision/testdata/plan14-root-reads-wake-latency-1.tsv`, loaded
29last in `TestPlan14RootReadCensus`, after `db-region-forward-3` (the overlay
30main loads last at 64a002c8).
31
32## Root reads
33
34Executing identity, for every unit: the agent (`/opt/carlos/carlos agent`,
35`carlos-edge.service`, user carlos).
36
37| unit | change | proposed disposition |
38|---|---|---|
39| `internal/activator/activator.go` `Service.doWake` | marks the end of each wake step on the wake's timer: `a.now()` and a slice append, journal only. No read added, no step moved | re-frozen at `census-ruling-292fix` with this change appended |
40| `internal/activator/activator.go` `Service.wake` | logs that timer's breakdown after a successful wake. No read added | re-frozen at `census-ruling-carlos-run` with this change appended |
41| `internal/activator/backend_exec.go` `ExecBackend.startUnitAt` | times the unit's launch and its health wait with `time.Now()`, and logs both after a successful health wait. The log names `rt.Host`, which is the new `registry:Host` site. No read added, no behaviour changed | re-frozen at J1 (`root-route`) with this change appended |
42
43Frozen declarations are added, so the seal moves from
44`79cb56b4c7d3a8e155d1eff1902715d818fcf4c09b1d8a82921c413b116938a9`
45(`db-region-forward-3`'s, checked before the overlay loads) to
46`09e20ea4bbc534710334e632e903878656dabfb5817d4d96c6e7c56508172148` (it
47was `5976190a…4b1a` while the rows were PROPOSED).
48
49Two envelopes are re-pinned:
50
51| envelope | why |
52|---|---|
53| `internal/activator` | the units above, `wakesteps.go`, and the health-probe backoff in `backend_exec.go` and `backend_unit.go` |
54| `internal/instancectl` | `startGen`'s drop-in check in `gen.go`, and the timings on its start log line |
55
56`startGen` is outside the scanner's units: its `systemctl` calls run as
57instance-control (`carlos-instance-control.service`, root), the same calls
58in a different order, and the reload is now conditional. Review: Astra round
591 found one P2 (NeedDaemonReload is mtime-based, so a reused and
60still-loaded generation could read as applied). It was fixed by checking the
61tier's memory lines, and round 2 was clean.
62
63Record-write census (9B8): unchanged. Claim routes: unchanged. go.mod:
64unchanged.
65