Skip to content

fix(cli): persist auto-scale rules in JSON mode - #997

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

fix(cli): persist auto-scale rules in JSON mode#997
ralyodio merged 1 commit into
profullstack:masterfrom
mhb888248:fix/scale-json-mutation

Conversation

@mhb888248

Copy link
Copy Markdown
Contributor

What

  • keep JSON mode as an output-format choice instead of an implicit dry-run
  • persist auto-scale rules before emitting JSON when --dry-run is absent
  • preserve non-mutating behavior for --json --dry-run
  • add an integration regression test that verifies the config file is written

Why

sh1pt scale auto --json returned the requested rules and exited before saveAutoScaleRules(). Automation saw a successful JSON response even though no configuration file existed, so the requested auto-scale policy was silently discarded.

Reproduction

Before this change, the command printed valid JSON but .sh1pt/auto-scale.json did not exist. After the change, the same command writes the file; adding --dry-run still skips the write.

Testing

  • pnpm exec vitest run packages/cli/src/commands/scale.test.ts (55 passed)
  • isolated CLI reproduction before/after using a temporary home directory
  • pnpm --filter @profullstack/sh1pt... build
  • pnpm --filter @profullstack/sh1pt typecheck

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

6 similar comments
@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@github-actions

Copy link
Copy Markdown

🤖 Auto-rebase: The branch was rebased successfully locally but could not be pushed to the fork. Please enable 'Allow edits from maintainers' in the PR settings, or rebase manually: git fetch upstream master && git rebase upstream/master.

@ralyodio
ralyodio merged commit af4be0b 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