Co-authored-by: Jason Woltje <jason@diversecanvas.com> Co-committed-by: Jason Woltje <jason@diversecanvas.com>
3.0 KiB
3.0 KiB
#633 — comms-block emitter + FLEET-LAUNCH runbook
Branch: feat/633-comms-block-runbook (off bf2a6745, post-#632 merge)
Issue: #633 · Follow-up filed: #636 (PATH B)
Goal
PATH A of the orchestrator-launch fix: give every launch path the Fleet-Comms onboarding, and document the canonical roster-driven launcher so the orchestrator stops being a bespoke snowflake.
Deliverables
mosaic fleet comms-block <role> [--host <h>]— explicit-arg, comms-block-only emitter.- Backed by new
resolveCommsBlock(mosaicHome, role, fleetHost?)infleet/comms-onboarding.tsreturning{ ok, output, error }. - Unlike
readFleetCommsBlock(returns''on any miss socomposeContractcan no-op silently during launch), the emitter fails loud: unknown role / missing roster →ok:false→ CLI prints to stderr + setsprocess.exitCode = 1. A typo is never a silent no-op. - Distinct from
mosaic compose-contract <runtime>(whole prompt, env-coupled viaMOSAIC_AGENT_NAME); comms-block is the targeted, explicit-arg, comms-only view.
- Backed by new
docs/fleet/FLEET-LAUNCH.md— worker path + orchestrator.envfold + 3 launch gotchas + #632 preserve note + North-Star 4-field arc.
Key findings (drove the design)
mosaic yolo claudealready forwards--channels/--permission-modeto the binary (launch.tsclaude casecliArgs.push(...args)) AND injects the comms block viacomposeContract→readFleetCommsBlock(home, env.MOSAIC_AGENT_NAME). So nolaunch.tschange was needed — PATH A is.env+ doc only.start-agent-session.shline ~41[ -z "$MOSAIC_AGENT_COMMAND" ]short-circuits the line-44 default, so an.envMOSAIC_AGENT_COMMANDoverride bypasses the hardcodedyoloentirely — the yolo-conditional is therefore a PATH B (default-path) concern, not PATH A.generateAgentEnv(fleet.ts~202-207) emits NAME/RUNTIME/MODEL but notMOSAIC_AGENT_COMMAND— the seam PATH B (#636) closes.
A → B → webUI arc (North Star)
- A =
.envMOSAIC_AGENT_COMMANDhatch (manual, ships now, #632-safe). - B (#636) = roster-native launch-config: harness ✅ + model ✅ already there; add yolo (line-44
conditional
MOSAIC_AGENT_YOLO) + command/channels (generateAgentEnvemission). - webUI binds dropdowns/toggles to those four roster fields. One launcher, no new launch path.
Results
- TDD: spec first (
comms-onboarding.spec.ts, 6 newresolveCommsBlockcases) → red → implement → green. fleet.spec.tssubcommand-list assertion extended withcomms-block.- 177 fleet+comms tests green; typecheck clean; eslint clean; prettier clean.
Risks / notes
- Pre-existing local-only failure
uninstall.spec.ts > removeFramework > handles missing mosaicHome gracefully(EACCES on/nonexistentas non-root) — unrelated to #633, passes in CI as root. - Did NOT run
mosaic update/ anything auto-reseed: installed CLI still 0.0.40 (roster-wipe live until mos-claude-0 ships 0.0.41). All work is in-repo + vitest, never touches the live mosaic home.