roadmap NOT-STARTED

910. A package declares a service: install starts it, boot starts it, update restarts it

(Minted 2026-10-12 (UTC) by lane maintainer/mint-monit-milestone from calef's ruling the same day. The number is provisional until the merge queue lands it; the title, the slug and every name below are drafts.)

calef, 2026-10-12 (UTC), on question 2 of milestone 905 (monit is packaged in basalt, installed with jig, and restarts a nife service it watches), PR #2022: "a, and restart services on update." Option a was that a package may declare a service the progenitor starts at boot. monit needs it because a supervisor tied to a session is not one, and its own daemonize forks.

In brief. A package's manifest can declare a service. jig install shows that grant with the rest and starts the service. The progenitor starts it at every boot from the installed-programs table, and a package update restarts it on the new bytes. jig remove and jig rollback undo it. Restart is teardown and respawn by the progenitor, with no signals and no kill.

What calef ruled

What exists, and who else touches this

Checked 2026-10-12 (UTC). Nothing on the roadmap or in the proposal pile owns a declared service.

The install confirmation

Added 2026-10-12 (UTC). The 892 lane found (#2027) that no milestone builds jig install's confirmation, the list of everything an install grants under §208. This milestone's service line needs it. So does milestone 892 (a std program at the prompt holds the network and a name resolver): calef ruled (c) there, that the manifest asks for resolver zones and the owner grants them at install. So it is built here, once, for every grant:

The work

  1. The declaration in the manifest, beside 849's run-time needs: program, arguments, grants, restart policy (never, on-crash with a limit and backoff), optional control endpoint.
  2. The install confirmation above, and its record. The installer records the service in the installed-programs table's entry, with --no-start.
  3. The progenitor starts every enabled service in the live generation, at once on install and at every boot, each under a supervision endpoint the progenitor holds.
  4. Teardown and respawn on a crash, by policy, and on an update, for each service whose package changed; jig prints the list before it asks.
  5. remove stops and drops; rollback restores the previous set and restarts what changed.
  6. The service_control command and the control endpoint's messages: reload and stop, a stop that falls back to teardown, and start for a service that --no-start did not start.

Done when

On aarch64, riscv64 and x86_64 under QEMU, in script/swish-check, with a fixture service package that reports its version:

  1. jig install of the fixture lists each grant: "runs as a service, now and at every boot", a directory with its rights, and a resolver zone. After one confirmation the fixture is running, as ps shows over its domain, and the confirmed list is in its installed-programs entry.
  2. A second fixture whose manifest asks for the root zone is flagged apart in its confirmation.
  3. After reboot (milestone 805 (reboot at the prompt: a person restarts the machine without touching its power)), it is running again with no command typed.
  4. The fixture faults on request; it is running again under a new tid, by its policy.
  5. Installing version 2 lists the fixture among services that will restart; afterwards it reports version 2.
  6. jig rollback leaves it running and reporting version 1. jig remove leaves it stopped, and after a reboot it is still stopped.

Open questions

Name: ratified 2026-11-01 (calef, ruling on this block). service_control, with the verbs start, stop and reload. The name is a software name, so the BSD-first rule for hardware register, field and constant names does not apply; it says what the command does and follows the tree's own pattern. jig install --no-start leaves a service stopped and the block named no way to start it later. start goes to the progenitor, which holds the supervision endpoint (§270 keeps spawning out of jig). A stop that falls back to teardown also goes to the progenitor. So the command is a progenitor client in any case, and start adds no new kind of authority. restart is not a verb: restart is the progenitor's teardown and respawn on a crash or an update. enable and disable are not verbs: boot persistence belongs to the installed-programs table under §208.

The 2026-11-01 (UTC) ruling: service_control is nife's own small program, not a port. It holds only the progenitor's service-control endpoint. Its model is s6-svc (ISC) and runit's sv (BSD-3-Clause): a client that sends a request and reports the answer, with exit codes that say whether the service was already in the wanted state. Those clients talk to supervisors built on fork and SIGCHLD, which nife refuses (§264 (fork is declined for good, and spawn is the supported way to start a program)). The client part is a few verbs and one request. A port would wait on the C library's stage 3 and posix_spawn, and a new program holds less authority. Systemd's systemctl (LGPL) and monit (AGPL) did not qualify. This account comes from memory of those projects, and nobody re-checked it. The lane copies no code.

The restart policy's spellings and limits are drafts for the lane to propose.

BUGS. Whether jig install --no-start also clears the enabled flag for boot stays open in this block. The lane that builds 910 asks before choosing: a service that sits stopped now but enabled would start again at the next boot.

Reuse: the policy takes sub_server_supervisor's restart loop, from milestone 22 (trusted init: verify it, and shrink what a broken one can do). The set and its generations are §208's, and the encoding is 849's. systemd units, launchd property lists, s6 and Fuchsia's component manager were the models read for the declaration and the lifecycle; none runs here. The shape taken is Fuchsia's: the manager tears down and restarts, and a component may serve a lifecycle protocol.

Index row

The missing half of a package manager for long-running programs: a package can say "I am a service", and install, boot, crash, update and rollback each start, restart or stop it from the installed-programs table, with no signals.