Skip to content

cli: remove the ucode (launch) and ucode setup --dry-run flags - #314

Merged
tt-le merged 3 commits into
mainfrom
tien/remove-ucode-dry-run
Aug 13, 2026
Merged

cli: remove the ucode (launch) and ucode setup --dry-run flags#314
tt-le merged 3 commits into
mainfrom
tien/remove-ucode-dry-run

Conversation

@tt-le

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

Copy link
Copy Markdown
Collaborator

What

Removes two --dry-run flags:

  1. ucode --dry-run (the launch flag). It launched the managed agent from the last saved managed-state.json without fetching and wrote no config files — a third, confusing meaning of --dry-run that could run a launch off a stale local copy. Bare ucode now always refreshes the managed config from the workspace (the source of truth) before launching.
  2. 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 by ucode 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

  • Launch: drop the flag + set_dry_run + dry_run threading from the top-level callback and _launch_managed_default (now always refresh_managed_config); remove the now-dead launch-path is_dry_run() guards and the unused is_dry_run import in cli.py.
  • Setup: drop the flag + set_dry_run from the setup callback; remove the now-dead is_dry_run() branches in setup_command, setup_from_file, and the delete-confirmation path in managed_wizard.py, plus that module's now-unused is_dry_run import.
  • Revert the setup: consolidate managed-settings.json into managed-state.json #309 docs that pointed at ucode --dry-run as the local try-out step (setup Next steps, README, managed_config/managed_wizard docstrings), and drop the ucode setup --dry-run README example.
  • Update/remove the affected tests. set_dry_run stays (used by configure), and save_managed_state keeps respecting the global dry-run flag like the other config writers (still exercised by its unit test and configure --dry-run).

Behavior

  • ucode --dry-run and ucode setup --dry-run → unknown option; not listed in their --help.
  • ucode configure --dry-run still works.

Testing

  • Full non-e2e suite green (1732); ruff check / ruff format clean.

Off current main (includes #309).

This pull request and its description were written by Isaac.

`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
@tt-le
tt-le requested a review from AarushiShah-db August 11, 2026 21:46
Comment thread src/ucode/cli.py
Comment thread README.md Outdated
@tt-le
tt-le requested a review from lilly-luo August 12, 2026 16:00
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
@tt-le tt-le changed the title launch: remove the ucode --dry-run flag cli: remove the ucode (launch) and ucode setup --dry-run flags Aug 13, 2026
@tt-le
tt-le enabled auto-merge (squash) August 13, 2026 17:44
@tt-le
tt-le merged commit ef26bad into main Aug 13, 2026
2 checks passed
@tt-le
tt-le deleted the tien/remove-ucode-dry-run branch August 13, 2026 18:34
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.

3 participants