The last item of the plan in install-path-gap.md, and the one everything else is
blind to: every other check in the tree drives the engine against a stub
`systemctl`, so none of them can see whether a restart *happened*.
`scripts/systemd-test.sh` boots systemd as pid 1, mints three signed releases
carrying real units and a real `updaterd`, installs one, applies the next through
the running daemon, and then applies one shipping a unit that cannot start. It
observes four things nothing else can:
- `on_apply` really restarts what the release ships — asserted on the unit's main
PID changing, not on a command having been issued;
- the deferred transient timer really fires and really replaces `updaterd`, in
about four seconds, and the successor runs the new release. A child process
could not: it would sit in the cgroup being killed. That was the reason for
`systemd-run` and, until now, an untested claim;
- `hooks/postinstall` really installs, enables and starts a unit the board has
never had;
- a unit that installs cleanly and cannot start fails the update and names itself,
rather than reverting with "not healthy within 30s: unreachable" — bug 1, and the
only class the cheaper items cannot reach.
Docker rather than systemd-nspawn, which the plan proposed. The objection to
privileged containers *in CI* stands and this is not CI; what decided it is the
plan's own argument for ranking this last — a check that can only run on a machine
nobody develops on stops being read. Docker Desktop runs systemd as pid 1 on the
laptop this was written on. nspawn does not.
The fixture is its own example rather than a flag on `fake-release`, which
deliberately mints releases with no units because it exists to drive the engine
where systemd is not present.
Two injections are left, both cheap now the harness exists: `systemd-run` failing,
and `enable --now` on a unit whose `User=` does not exist.
Not in CI: it needs --privileged and the host's cgroup filesystem, and the `board`
job is already the slowest thing in the loop. Run it when `on_apply`, the deferred
restarts or the hook change.
Assisted-by: Claude:claude-opus-5