Skip to content

fix(cli): apply scale down in JSON mode - #998

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
mhb888248:fix/scale-down-json-mutation
Aug 30, 2026
Merged

fix(cli): apply scale down in JSON mode#998
ralyodio merged 1 commit into
profullstack:masterfrom
mhb888248:fix/scale-down-json-mutation

Conversation

@mhb888248

Copy link
Copy Markdown
Contributor

Problem

sh1pt scale down --json printed a successful removal result and returned before mutating fleet state. Automation therefore saw a removed instance even though credentials.json still contained the full fleet.

Fix

  • compute one result payload for both dry-run and executed JSON output
  • persist the filtered fleet before returning JSON in normal mode
  • keep --dry-run --json non-mutating
  • add a subprocess regression test that checks the saved fleet and preserves unrelated credentials

Verification

  • pnpm exec vitest run packages/cli/src/commands/scale.test.ts (59 passed)
  • pnpm --filter @profullstack/sh1pt... build
  • pnpm --filter @profullstack/sh1pt typecheck
  • isolated CLI reproduction confirmed two instances become one while the API key remains unchanged

@mhb888248
mhb888248 force-pushed the fix/scale-down-json-mutation branch from 3d01f09 to d1564db Compare August 30, 2026 12:25
@ralyodio
ralyodio merged commit 9d2787c into profullstack:master Aug 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants