Skip to content

apply: drop --dry-run; it always validates before publishing - #299

Merged
AarushiShah-db merged 1 commit into
mainfrom
tien/apply-drop-dry-run
Aug 10, 2026
Merged

apply: drop --dry-run; it always validates before publishing#299
AarushiShah-db merged 1 commit into
mainfrom
tien/apply-drop-dry-run

Conversation

@tt-le

@tt-le tt-le commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

ucode apply --dry-run validated and previewed without writing — but apply already validates unconditionally before it publishes, shows the summary, and asks for confirmation. So the flag added a mode with no distinct value.

ucode setup only ever writes a valid manifest; the one case worth guarding is a hand-edited managed-settings.json, and that's caught by the normal validation apply runs regardless.

Changes

  • Remove the --dry-run option from apply_cmd and the is_dry_run() early-out in apply_command.
  • The confirmation prompt still gates every publish, and the manifest is still validated first — ucode apply on an invalid hand-edit fails before anything reaches the workspace.
  • README updated.

Untouched — two unrelated dry-runs that share the name: ucode setup --dry-run (walk the flow without writing) and ucode --dry-run (launch against the last saved config) keep their flags.

Tests

Dropped test_dry_run_validates_without_publishing (behaviour gone); the option-declaration test now asserts --dry-run is absent and --yes present.

This pull request and its description were written by Isaac.

`ucode apply --dry-run` validated and previewed without writing — but `apply`
already validates unconditionally before it publishes, shows the summary, and
confirms, so the flag added a mode with no distinct value. `ucode setup` only ever
writes a valid manifest; the one case worth guarding is a hand-edited
managed-settings.json, and that is caught by the normal validation `apply` runs
regardless.

Removes the `--dry-run` option from `apply_cmd` and the `is_dry_run()` early-out
in `apply_command`. The confirmation prompt still gates every publish, and the
manifest is still validated first (`ucode apply` on an invalid hand-edit fails
before anything reaches the workspace). README updated.

Unrelated dry-run paths are untouched: `ucode setup --dry-run` (walk the flow
without writing) and `ucode --dry-run` (launch against the last saved config) keep
their flags.

Tests: dropped test_dry_run_validates_without_publishing (behaviour gone); the
option-declaration test now asserts `--dry-run` is absent and `--yes` present.

Co-authored-by: Isaac
@tt-le
tt-le requested a review from AarushiShah-db August 7, 2026 23:06
@AarushiShah-db
AarushiShah-db merged commit 1ddefa7 into main Aug 10, 2026
2 checks passed
@AarushiShah-db
AarushiShah-db deleted the tien/apply-drop-dry-run branch August 10, 2026 00:56
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