mosaic fleet init writes nothing without --write, exits 0, and says so nowhere #1250

Open
opened 2026-08-16 06:06:00 +00:00 by fred · 0 comments
Collaborator

Summary

mosaic fleet init with no flags prints a 27-line roster to stdout, exits 0, and writes
nothing to disk. Nothing in the output says it was a preview.

An operator following the tool's own guidance therefore gets stuck in a closed loop.

Reproduction (greenfield Debian 13)

$ mosaic fleet init
<27 lines of YAML>
$ echo $?
0

$ mosaic fleet start
No fleet roster found at /home/mosaic/.config/mosaic/fleet/roster.json.
Run 'mosaic fleet init' to create one.
$ echo $?
1

fleet start tells you to run fleet init. fleet init exits 0 and appears to succeed. Running
it again changes nothing. There is no indication that --write exists or is required.

Two distinct defects

1. Silent preview. A command whose stated purpose is to initialize defaults to a dry run
and does not label itself as one. Either:

  • write by default and put the preview behind --dry-run (matches the verb, and matches what
    the error message from fleet start promises), or
  • keep --write opt-in but print a trailing line such as
    Preview only — nothing written. Re-run with --write to create the roster.

The first is preferable: init is a creating verb, and the only reason an operator runs it is
because fleet start just told them to.

2. Path mismatch in the error message. fleet start names roster.json. fleet init --write
actually writes roster.yaml:

$ mosaic fleet init --write
Initialized general fleet: 1 orchestrator + 1 enhancer(s) + 1 worker(s). Next: mosaic fleet install
$ ls ~/.config/mosaic/fleet/
roster.yaml  roster.schema.json  roles/  services/

An operator who goes looking for roster.json after the failure will not find it, and will not
find it after a successful init either. Whichever filename is canonical, the message should name
the one the tool writes.

Environment

Measured on a snapshot-reverted Debian 13.6 VM, installed from source at a composite of the
current open installer/fleet PRs. Both behaviours reproduce before and after those fixes — they
are independent of the permissions and transport work.

## Summary `mosaic fleet init` with no flags prints a 27-line roster to stdout, exits **0**, and writes nothing to disk. Nothing in the output says it was a preview. An operator following the tool's own guidance therefore gets stuck in a closed loop. ## Reproduction (greenfield Debian 13) ``` $ mosaic fleet init <27 lines of YAML> $ echo $? 0 $ mosaic fleet start No fleet roster found at /home/mosaic/.config/mosaic/fleet/roster.json. Run 'mosaic fleet init' to create one. $ echo $? 1 ``` `fleet start` tells you to run `fleet init`. `fleet init` exits 0 and appears to succeed. Running it again changes nothing. There is no indication that `--write` exists or is required. ## Two distinct defects **1. Silent preview.** A command whose stated purpose is to *initialize* defaults to a dry run and does not label itself as one. Either: - write by default and put the preview behind `--dry-run` (matches the verb, and matches what the error message from `fleet start` promises), or - keep `--write` opt-in but print a trailing line such as `Preview only — nothing written. Re-run with --write to create the roster.` The first is preferable: `init` is a creating verb, and the only reason an operator runs it is because `fleet start` just told them to. **2. Path mismatch in the error message.** `fleet start` names `roster.json`. `fleet init --write` actually writes `roster.yaml`: ``` $ mosaic fleet init --write Initialized general fleet: 1 orchestrator + 1 enhancer(s) + 1 worker(s). Next: mosaic fleet install $ ls ~/.config/mosaic/fleet/ roster.yaml roster.schema.json roles/ services/ ``` An operator who goes looking for `roster.json` after the failure will not find it, and will not find it after a successful init either. Whichever filename is canonical, the message should name the one the tool writes. ## Environment Measured on a snapshot-reverted Debian 13.6 VM, installed from source at a composite of the current open installer/fleet PRs. Both behaviours reproduce before and after those fixes — they are independent of the permissions and transport work.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#1250