Skip to content

fix(cli): persist DNS config in JSON mode - #1000

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

fix(cli): persist DNS config in JSON mode#1000
ralyodio merged 1 commit into
profullstack:masterfrom
mhb888248:fix/scale-dns-json-persistence

Conversation

@mhb888248

Copy link
Copy Markdown
Contributor

Problem

sh1pt scale dns --json printed a successful DNS plan and returned before saving the DNS config. Automation therefore saw valid records even though credentials.json remained unchanged.

Fix

  • keep JSON and human output paths separate from execution
  • save DNS config before returning JSON in normal mode
  • keep --dry-run --json non-mutating
  • add a subprocess regression test that checks persisted DNS state and preserved credentials

Verification

  • reproduced JSON success with no dns field before the fix
  • 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 verification confirmed DNS IPs persist while API key and fleet entries remain unchanged

@ralyodio
ralyodio merged commit 4b1d237 into profullstack:master Aug 30, 2026
6 checks passed
ralyodio added a commit that referenced this pull request Aug 30, 2026
Lockstep bump of every published package. The six packages the cli depends on
had drifted to 0.3.0 while the cli sat at 0.3.1; they are all 0.3.2 now, which
is what the lockstep script exists to guarantee — pnpm rewrites `workspace:` to
a real range at publish time, so anything the cli depends on has to reach the
registry at a version that exists.

Since v0.3.0:

- threatcrush-scan pack pinned to @profullstack/threatcrush@0.11.5 with a
  reproduced SRI hash, pack 2.0.2 so the fleet re-syncs consumers (#1003)
- unique rollout instance IDs (#1002)
- cloud vault passphrase prompt no longer hangs on non-TTY stdin (#1001)
- DNS config persisted in JSON mode (#1000)
- netcup adapter shipped in the command tree (#969)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H3GDps1fD6ccfo93B3ePy1
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