Skip to content

Add --skip-install and --skip-validation to ucode configure#142

Closed
dhruv0811 wants to merge 1 commit into
databricks:mainfrom
dhruv0811:dhruv/configure-skip-install-validate
Closed

Add --skip-install and --skip-validation to ucode configure#142
dhruv0811 wants to merge 1 commit into
databricks:mainfrom
dhruv0811:dhruv/configure-skip-install-validate

Conversation

@dhruv0811

Copy link
Copy Markdown

Summary

ucode configure always (1) installs/updates the agent CLIs and (2) runs each one with a test message after configuring. For callers that only need the workspace auth + AI Gateway routing written to ~/.ucode/state.json, and that manage the agent binaries themselves, those two phases are unwanted overhead — they download/update binaries, surface an interactive "update Codex?" prompt, and spend time/tokens validating agents the caller never launches through ucode.

This adds two opt-in flags so a programmatic consumer can run just login + Gateway configuration:

  • --skip-install — don't install or update the agent CLIs.
  • --skip-validation — skip the post-configure check that runs each agent with a test message.

Concretely, this unblocks embedding ucode configure inside another tool: it can wire up Databricks model serving (login → Gateway discovery → state.json) without ucode touching the user's locally-installed agent binaries or running validation prompts.

Behavior

  • Both flags default to False, so existing invocations are unchanged — the install + validation phases still run by default.
  • The login + AI Gateway discovery + save_state happen regardless of the flags, so a consumer passing --skip-install --skip-validation still gets a complete ~/.ucode/state.json (workspace, base URLs, model lists, per-agent config) — only the binary management and test runs are skipped.
  • The flags are threaded from configure into configure_workspace_command and guard every install/validate site, so they apply consistently to the --agent, --agents, and interactive paths.

Example:

# Configure routing for one workspace, no binary installs, no validation runs:
ucode configure --workspaces https://my-workspace.cloud.databricks.com \
  --agents claude,codex,pi --skip-install --skip-validation

Testing

  • uv run pytest --ignore=tests/test_e2e.py --ignore=tests/test_e2e_tracing.py --ignore=tests/test_e2e_user_agent.py673 passed.
  • uv run ruff check . → clean.
  • Added TestConfigureSkipFlags in tests/test_cli.py:
    • the flags are forwarded from the --agents/--workspaces invocation,
    • --skip-install skips the eager single-agent install (--agent path),
    • --help lists both flags,
    • a behavioral test that configure_workspace_command(..., skip_install=True, skip_validation=True) calls neither install_tool_binary nor validate_all_tools while still running configure_selected_tools, and a paired default-path test asserting both do run without the flags (so the guards aren't always-skip).
  • Updated the existing TestConfigureAgentFlag forwarding assertions for the new (default-False) kwargs.

Notes

  • Scoped to the requested behavior; no refactors. Existing Rich UI / helper conventions preserved.
  • README "Other Commands" table documents both flags.

`ucode configure` always installs/updates the agent CLIs and then runs
each one with a test message. For callers that only need workspace auth
+ AI Gateway routing written to `~/.ucode/state.json` — and that manage
the agent binaries themselves (e.g. a tool that embeds ucode to wire up
Databricks model serving) — those phases are unwanted overhead: they
download/update binaries, surface an interactive update prompt, and
spend time/tokens validating agents the caller never launches via ucode.

Add two opt-in flags, threaded through `configure` into
`configure_workspace_command`:

- `--skip-install`: don't install or update the agent CLIs.
- `--skip-validation`: skip the post-configure check that runs each agent
  with a test message.

Both default to the current behavior, so existing invocations are
unchanged. The login + Gateway discovery + state write still run, so a
consumer passing both flags gets a complete `state.json` without any
binary management or test runs.

Co-authored-by: Isaac
Copilot AI review requested due to automatic review settings June 5, 2026 18:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds opt-in flags to ucode configure to skip agent CLI installation/updates and/or post-configure validation runs, enabling programmatic consumers to perform only workspace auth + AI Gateway routing state setup.

Changes:

  • Add --skip-install and --skip-validation flags to the configure CLI and thread them into configure_workspace_command
  • Guard install and validation phases in configure_workspace_command with the new flags
  • Expand CLI tests and README documentation to cover the new flags and default behavior

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/test_cli.py Updates existing forwarding assertions and adds new tests covering skip flags behavior and help output
src/ucode/cli.py Introduces skip_install / skip_validation options and applies them to install + validation execution paths
README.md Documents the new flags in the “Other Commands” table

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ucode/cli.py
Comment on lines +278 to 281
if skip_validation:
return 0
with spinner(f"Validating {spec['display']}..."):
ok, err = validate_tool(tool)
@dhruv0811 dhruv0811 closed this Jun 5, 2026
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