Repository navigation
[AIGTWY] Add ug configure --global/--user scope - #1207
Conversation
83a2206 to
c7fbec3
Compare
|
/ug-review |
Polly AI ReviewBlocking issues
Security vulnerabilitiesNone identified in the reviewed changes. Non-blocking notes
ApproachReusing SummaryDiff size (computed): 14 files; +299 / -8 lines (307 changed text lines); 0 binary files.
Shares use additions + deletions, including generated text and lockfiles. Binary files have no line count. Tests include fixtures/helpers under test paths and colocated test/spec files; categories are path-based, not coverage measurements. ChangesAdds configure-scope flags, persists the selected scope, skips OS-managed settings in user mode, and rejects conflicting managed files. Supporting changes cover state isolation, adapter behavior, CLI handling, and documentation. No dependencies or generated files change. The implementation is proportional to the stated outcome. Concrete reductions are limited to overlapping opt-out test setup; no broad scaffolding or unrelated cleanup was found. TestsTest-by-test assessmentThe frozen diff and relevant existing tests were inspected. An isolated offline control-flow reproduction confirmed that per-agent refusals are swallowed; it was not an exact-head test-suite run. The reported full-suite failures and clean lint/type checks remain author-reported, not independently verified.
Existing opt-out writer tests, Codex launch-override tests, and MCP fallback tests provide useful baseline coverage. They do not establish the new configure-refusal-to-persistence contract or saved-scope launch refusal. Those gaps can be covered offline at the component layer; a live E2E is not needed for these assertions. ScopeAll changed files support the stated user/global configuration outcome. No clearly unrelated changes were found. The scope-persistence failure is an implementation defect within that outcome, not unrelated work. Automated review by Polly · workflow run |
--user skips the OS-managed Claude Code and Codex settings like UG_SKIP_OS_SETTINGS, so no sudo is needed and ug relies on the per-user files it already passes at launch. It fails while an OS-managed file for the agent exists, and the choice is saved after a successful configure. Co-authored-by: Isaac <no-reply@databricks.com>
… present files Co-authored-by: Isaac <no-reply@databricks.com>
c7fbec3 to
9aa9698
Compare
Adds
ug configure --global/--userso Claude Code and Codex can be configured without sudo.What
--globalis the default and behaves exactly as today: ug writes the machine-wide managed settings with sudo.--userskips the machine-wide managed files, the same wayUG_SKIP_OS_SETTINGSdoes, so it needs no sudo. ug relies on what it already passes at launch:--settings ~/.claude/ucode-settings.json-coverrides from~/.codex/ucode.config.tomlModel lists still update without sudo. Managed MCP servers register in user scope. Only
ug claudeandug codexlaunches reach the gateway in this mode.Refusal.
ug configure --userrefuses, before configuring any agent, while a selected agent's machine-wide managed file exists, whoever wrote it, because managed settings override--settingsand-c. The message points toug revert, the administrator, or--global. On Windows, the Codex check covers the machine-widerequirements.toml. Launches don't check: a managed file added later simply takes precedence.Saved choice. The scope is saved as
config_scopein~/.ucode/state.jsonafter a successful configure and applies to later launches.ug configurewithout--userandug revertreset it to global. Passing both flags is an error.Testing
TestConfigureScopeFlagsintests/test_cli.pyTestConfigureToolUserScopeintests/test_agents_init.pytests/test_agent_claude.pyandtests/test_agent_codex.pytests/test_managed_files.pymain:TestInstallToolBinaryrequired_update ×4,TestDetachedReporter×2, andtest_skill_toggles_with_launch_installation_despite_shadowed_path×2.ruffandtyare clean.--globalis the default. A follow-up PR will add a--userintegration test.