2.4 KiB
2.4 KiB
Fleet release hardening
Objective
Harden the Mosaic local fleet release path for operator sends, tmux/systemd verification, package contents, and dogfood release documentation.
Constraints
- Do not edit
docs/TASKS.md. - Do not change production deployment refs.
- Keep fleet transport generic and named-socket safe.
- Preserve strict roster validation.
- Add tests first or alongside fixes.
Plan
- Add regression tests for deterministic
mosaic agent sendsource labels. - Strengthen fleet status/verify/package/install-systemd coverage.
- Implement focused CLI/source-label changes.
- Update local canary documentation with dogfood preflight.
- Run formatting, targeted tests, typecheck, lint, and package dry-run evidence.
Evidence Log
- Started from existing
docs/PRD.md; durable local fleet canary is in v0.1.0 scope. - Loaded
mosaic-fleet-operationsskill; key constraints are isolated tmux sockets, no default tmux positive tests, andactive (exited)is not liveness. - TDD red:
pnpm --filter @mosaicstack/mosaic test -- src/commands/fleet.spec.tsinitially failed becausenode_moduleswas absent; afterpnpm install, the new source-label tests failed on missing-S, missing helper, and unknown--source-label. - Green implementation:
mosaic agent sendnow passes-S <hostname>:operatorby default and accepts--source-label/--sourceoverrides. - Test coverage added for tmux-based fleet verify liveness, package
filesallowlist containingframework, and explicit operator source-label command construction. - Formatting:
pnpm exec prettier --write packages/mosaic/src/commands/fleet.ts packages/mosaic/src/commands/fleet.spec.ts docs/guides/fleet-local-canary.md docs/scratchpads/2026-06-20-fleet-release-hardening.md. - Targeted tests:
pnpm --filter @mosaicstack/mosaic test -- src/commands/fleet.spec.ts src/cli-smoke.spec.tspassed with 49 tests. - Typecheck:
pnpm typecheckpassed. - Lint:
pnpm lintpassed. - Package dry-run:
npm pack --dry-run --jsonfrompackages/mosaicincludedframework/fleet,framework/systemd/user,framework/tools/fleet/start-agent-session.sh, andframework/tools/tmux/{agent-send.sh,send-message.sh}. - Review:
~/.config/mosaic/tools/codex/codex-code-review.sh --uncommittedapproved the supplied diff with no findings; the review tool noted its read-only sandbox could not inspect files directly.