fix(fleet): boot-survival symmetry — disable-on-remove + add-enable + init-R5 #612
Reference in New Issue
Block a user
Delete Branch "feat/fleet-polish-bundle"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fleet-polish bundle — boot-survival symmetry (closes #611)
The full fleet-polish bundle from your Codex symmetry-gap finding. Three fixes completing add/remove boot-survival symmetry.
1. disable-on-remove (the bug — TDD)
mosaic fleet removestopped + deleted roster/env/heartbeat but neversystemctl --user disable mosaic-agent@NAME.service— so a removed-but-enabled unit could resurrect on reboot pointing at deleted config. AddedbuildSystemdDisableCommand+ a disable step inremove(best-effort, non-fatal, gated on!--keep-filesso keeping config keeps the unit).2. add-enable
mosaic fleet addnow enables the new agent's unit for boot-survival (best-effort, independent of--startso a queued agent still survives a reboot).3. init-R5 guarantee
mosaic fleet init --writenow fails hard when a non-minimal profile lacks exactly one orchestrator (was a soft warning) — a corrupted preset can't silently produce a malformed fleet. The sanctioned no-orchestratorminimalpreset is still allowed.Verification
removeinvokes disable (+ still stops);addinvokes enable;init general→ exactly 1 orchestrator. + 147 existing fleet tests green (151 total). tsc/eslint/prettier clean.Note for the reviewer
disable/enable/init validations are best-effort + non-fatal (warn-and-continue) except init's R5 hard-fail. Ready for the batched release (F3-m3 + fleet-polish + F4).
🤖 Generated with Claude Code