Add --skip-install and --skip-validation to ucode configure#142
Closed
dhruv0811 wants to merge 1 commit into
Closed
Add --skip-install and --skip-validation to ucode configure#142dhruv0811 wants to merge 1 commit into
--skip-install and --skip-validation to ucode configure#142dhruv0811 wants to merge 1 commit into
Conversation
`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
There was a problem hiding this comment.
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-installand--skip-validationflags to theconfigureCLI and thread them intoconfigure_workspace_command - Guard install and validation phases in
configure_workspace_commandwith 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 on lines
+278
to
281
| if skip_validation: | ||
| return 0 | ||
| with spinner(f"Validating {spec['display']}..."): | ||
| ok, err = validate_tool(tool) |
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.
Summary
ucode configurealways (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 configureinside 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
False, so existing invocations are unchanged — the install + validation phases still run by default.save_statehappen regardless of the flags, so a consumer passing--skip-install --skip-validationstill gets a complete~/.ucode/state.json(workspace, base URLs, model lists, per-agent config) — only the binary management and test runs are skipped.configureintoconfigure_workspace_commandand 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-validationTesting
uv run pytest --ignore=tests/test_e2e.py --ignore=tests/test_e2e_tracing.py --ignore=tests/test_e2e_user_agent.py→ 673 passed.uv run ruff check .→ clean.TestConfigureSkipFlagsintests/test_cli.py:--agents/--workspacesinvocation,--skip-installskips the eager single-agent install (--agentpath),--helplists both flags,configure_workspace_command(..., skip_install=True, skip_validation=True)calls neitherinstall_tool_binarynorvalidate_all_toolswhile still runningconfigure_selected_tools, and a paired default-path test asserting both do run without the flags (so the guards aren't always-skip).TestConfigureAgentFlagforwarding assertions for the new (default-False) kwargs.Notes