apply: drop --dry-run; it always validates before publishing - #299
Merged
Conversation
`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
AarushiShah-db
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ucode apply --dry-runvalidated and previewed without writing — butapplyalready validates unconditionally before it publishes, shows the summary, and asks for confirmation. So the flag added a mode with no distinct value.ucode setuponly ever writes a valid manifest; the one case worth guarding is a hand-editedmanaged-settings.json, and that's caught by the normal validationapplyruns regardless.Changes
--dry-runoption fromapply_cmdand theis_dry_run()early-out inapply_command.ucode applyon an invalid hand-edit fails before anything reaches the workspace.Untouched — two unrelated dry-runs that share the name:
ucode setup --dry-run(walk the flow without writing) anducode --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-runis absent and--yespresent.This pull request and its description were written by Isaac.