2.3 KiB
2.3 KiB
Fleet CLI Local Canary Review Fixes
Objective
Fix only the two should-fix code review findings:
- Ensure
@mosaicstack/mosaicdeclaresyamland lockfile state is current. - Validate
mosaic agent status [agent]against the fleet roster before constructing/running the tmux target.
Constraints
- Do not modify
docs/TASKS.md. - Leave changes uncommitted.
- Run requested formatting and quality gates.
Plan
- Inspect manifest/lockfile state for
yaml. - Add failing regression test for
mosaic agent status typo. - Patch
registerFleetAgentCommandsstatus validation. - Format touched files.
- Run requested tests, typecheck, and lint.
- Review final diff.
Progress
- Loaded required repo/global/runtime instructions.
- Confirmed
packages/mosaic/package.jsonalready declaresyaml. - Confirmed
pnpm-lock.yamlalready haspackages/mosaicimporter entry foryaml. - Found
registerFleetAgentCommandsstatus path does not validate agent before building tmux target.
Verification
- TDD red check:
pnpm --filter @mosaicstack/mosaic test -- src/commands/fleet.spec.tsfailed before the production fix becausemosaic agent status typoresolved instead of rejecting. - Focused green check:
pnpm --filter @mosaicstack/mosaic test -- src/commands/fleet.spec.tspassed after adding roster validation. - Formatting:
pnpm exec prettier --write packages/mosaic/src/commands/fleet.ts packages/mosaic/src/commands/fleet.spec.ts docs/scratchpads/fleet-cli-local-canary-review-fixes.mdcompleted with all files unchanged. - Requested tests:
pnpm --filter @mosaicstack/mosaic test -- src/commands/fleet.spec.ts src/cli-smoke.spec.tspassed with 36 tests. - Baseline typecheck:
pnpm typecheckpassed. - Baseline lint:
pnpm lintpassed. - Independent review:
~/.config/mosaic/tools/codex/codex-code-review.sh --uncommittedreturned approve with 0 findings. Note: reviewer reported broader context inspection was limited by its read-only sandbox, so review was based on the supplied diff. docs/TASKS.mdhas no diff.
Risks
docs/TASKS.mdintentionally untouched per user instruction.- Review finding 1 required no file edit:
packages/mosaic/package.jsonalready declaresyaml, and thepackages/mosaicimporter inpnpm-lock.yamlalready includesyaml.