cli: remove the ucode (launch) and ucode setup --dry-run flags - #314
Merged
Conversation
`ucode --dry-run` launched the managed agent from the last saved managed-state.json without fetching, and wrote no config files. In practice it was a confusing third meaning of --dry-run (distinct from `ucode configure --dry-run` and `ucode setup --dry-run`) and let a launch run off a stale local copy of the managed config. Drop it: bare `ucode` always refreshes the managed config from the workspace before launching, which is the only source of truth. `ucode configure --dry-run` (preview config files) and `ucode setup --dry-run` (walk the authoring flow without writing) are unchanged. - Remove the flag and its `set_dry_run`/threading from the top-level callback and `_launch_managed_default` (which now always refreshes). - Drop the launch-path `is_dry_run()` guards that can no longer be true, and the now-unused `is_dry_run` import in cli.py. - Revert the #309 docs/next-steps that pointed at `ucode --dry-run` as the local try-out step (setup Next steps, README, managed_config/managed_wizard docstrings). - Remove the launch dry-run test; configure/setup dry-run tests stay. Co-authored-by: Isaac
lilly-luo
reviewed
Aug 11, 2026
lilly-luo
reviewed
Aug 11, 2026
Following the launch `--dry-run` removal, drop `ucode setup --dry-run` too. It "walked the flow without writing any files", but the authoring flow's only writes are the local manifest (which `ucode setup show` / `--from-file` already cover) and a confirmed delete of an existing published config — so a dedicated dry-run added little over the existing review paths. - Remove the flag and its `set_dry_run` from the `setup` callback (`set_dry_run` stays for `ucode configure --dry-run`). - Drop the now-dead `is_dry_run()` branches in the setup flow (setup_command, setup_from_file, and the delete-confirmation path) and the unused import. - Update tests and the README. `save_managed_state` keeps respecting the global dry-run flag like the other config writers (still exercised by its unit test and `ucode configure --dry-run`). Co-authored-by: Isaac
ucode --dry-run flagucode (launch) and ucode setup --dry-run flags
AarushiShah-db
approved these changes
Aug 13, 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.
What
Removes two
--dry-runflags:ucode --dry-run(the launch flag). It launched the managed agent from the last savedmanaged-state.jsonwithout fetching and wrote no config files — a third, confusing meaning of--dry-runthat could run a launch off a stale local copy. Bareucodenow always refreshes the managed config from the workspace (the source of truth) before launching.ucode setup --dry-run. It "walked the flow without writing any files", but the authoring flow's only writes are the local manifest (already covered byucode setup show/--from-file) and a confirmed delete of an existing published config — so a dedicated dry-run added little.ucode configure --dry-run(preview config files) is unchanged and still the one dry-run that remains.Changes
set_dry_run+dry_runthreading from the top-level callback and_launch_managed_default(now alwaysrefresh_managed_config); remove the now-dead launch-pathis_dry_run()guards and the unusedis_dry_runimport incli.py.set_dry_runfrom thesetupcallback; remove the now-deadis_dry_run()branches insetup_command,setup_from_file, and the delete-confirmation path inmanaged_wizard.py, plus that module's now-unusedis_dry_runimport.ucode --dry-runas the local try-out step (setup Next steps, README,managed_config/managed_wizarddocstrings), and drop theucode setup --dry-runREADME example.set_dry_runstays (used byconfigure), andsave_managed_statekeeps respecting the global dry-run flag like the other config writers (still exercised by its unit test andconfigure --dry-run).Behavior
ucode --dry-runanducode setup --dry-run→ unknown option; not listed in their--help.ucode configure --dry-runstill works.Testing
ruff check/ruff formatclean.Off current
main(includes #309).This pull request and its description were written by Isaac.