Skip to content

[ug] Preserve unmanaged Claude family defaults - #928

Merged
lilly-luo merged 6 commits into
mainfrom
lilly/claude-managed-family-defaults-only
Oct 1, 2026
Merged

lilly-luo merged 6 commits into
mainfrom
lilly/claude-managed-family-defaults-only

Conversation

@lilly-luo

@lilly-luo lilly-luo commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • preserve existing ANTHROPIC_DEFAULT_<FAMILY>_MODEL values when no Coding Agent Config is present
  • continue filling family defaults that are absent
  • keep managed-config defaults authoritative
  • cover private and OS-managed Claude settings with unit regressions
  • add a live integration regression against one real workspace verified to have no managed config

Context

PR #444 preserved existing managed-file family defaults, including without a Coding Agent Config. PR #709 later introduced cross-workspace ownership tracking and intentionally re-derived defaults that matched ug's last write. That allowed managed workspace transitions to clear stale defaults, but also caused unmanaged launches to replace preexisting family defaults. This change restores the unmanaged preservation boundary without changing managed-config reconciliation.

The dedicated test_unmanaged_claude_preserves_preexisting_family_defaults live test verifies that its real workspace publishes no CodingAgentConfig, seeds /etc/claude-code/managed-settings.json with all Claude family defaults, runs public ug configure, and requires those exact defaults to remain unchanged. It checks settings reconciliation and makes no inference claim.

Testing

  • uv run --frozen ruff check src/ tests/
  • uv run --frozen ruff format --check src/ tests/
  • uv run --frozen ty check src/
  • uv run --frozen pytest tests/test_integration_contract.py tests/test_agent_claude.py::TestWriteToolConfigManagedSettings::test_unmanaged_preserves_existing_family_defaults tests/test_managed_model_lifecycle.py::test_claude_model_lifecycle -q (39 passed)
  • focused integration collection with the runner dependencies (3 Claude lifecycle tests collected)
  • live unmanaged-workspace regression: CI (this host has machine-wide Claude policy, which the integration runner correctly rejects)

@lilly-luo
lilly-luo merged commit ac32090 into main Oct 1, 2026
25 checks passed
@lilly-luo
lilly-luo deleted the lilly/claude-managed-family-defaults-only branch October 1, 2026 04:36
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.

1 participant