Skip to content

docker isolation (new) + default agent type (moved) in config wizard#2433

Open
evgunter wants to merge 15 commits into
mainfrom
ev/install-set-isolate
Open

docker isolation (new) + default agent type (moved) in config wizard#2433
evgunter wants to merge 15 commits into
mainfrom
ev/install-set-isolate

Conversation

@evgunter

@evgunter evgunter commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

previously new users would get a warning about legacy docker isolation; now the installer prompts them to write that config setting up front


Summary

Consolidates one-time user-scope config setup under mngr config wizard instead of splitting it across mngr extras.

A fresh install has no [providers.docker] block, so the default docker provider is resolved via the bare-backend fallback (providers/registry.py), instantiating DockerProviderConfig with isolate_host_volumes unset -- emitting the one-shot default-flip deprecation warning the first time the user touches docker.

Rather than a separate command, this adds the docker setting as a step in the existing mngr config wizard (which already prompts for Claude config-dir isolation), and moves the default-agent-type step there too:

  • Docker host-volume isolation (new step): the wizard asks whether each docker host sees only its own host_dir sub-folder (the recommended, forthcoming default; requires Docker Engine >= 25.0) or keeps the legacy shared state volume, writing providers.docker.isolate_host_volumes. Opting in silences the deprecation warning. The recommended "Yes" is the default-highlighted option; users on older Docker can pick "No".

  • Default agent type (moved): the "pick a default agent type for mngr create" step moved out of mngr extras into the wizard. Because the wizard runs as its own installer step (after plugins are installed), it now sees freshly-installed plugin agent types instead of only those registered at startup.

Every prompt also offers an explicit "leave unset for now" choice (which states the default it falls back to), so a decision can be deferred instead of forcing a value or a cancel.

Each step short-circuits when its setting is already configured, checked across every config scope (user, project, and local) so a value set in any of them suppresses the prompt. The two settings whose defaults already mark "unset" (the create default type and docker's isolate_host_volumes) are read off the merged config; Claude's isolate_local_config_dir has a non-None default, so its explicit-presence check reads the raw config files across all scopes instead.

mngr extras loses its config subcommand and default-agent-type step; user-scope config setup lives entirely in mngr config wizard. scripts/install.sh already runs mngr config wizard, so no installer change is needed. Tutorial references and the generated config command docs are updated.

The code default (isolate_host_volumes: bool | None = None) is intentionally not changed here.

Verification

  • Unit tests for all three wizard steps: each step now returns the chosen value or None (returns-picked-value / returns-none-when-already-set / -no-choices / -declined / -non-interactive), and the orchestrator centralizes writing through the same validated path as mngr config set. Added tests for the across-scopes explicit-presence read and the value-render helper. 91 passed in config_test.py, 45 across extras_test.py + docker config_test.py; ruff, ty, and the functools.partial / inline-function ratchets pass.
  • Manually verified end-to-end: mngr config wizard runs all three steps; the interactive path writes providers.docker.isolate_host_volumes = true and commands.create.type (validated, deprecation warning gone) and is idempotent on re-run. A project-scope Claude setting correctly suppresses that prompt, and "leave unset" skips without writing. Non-interactive prints the suggested mngr config set commands without writing.

History

Earlier commits on this branch implemented an extras-based approach; this supersedes them.

🤖 Generated with Claude Code

evgunter and others added 2 commits July 11, 2026 13:27
Fixes issue 4 (installer should pin isolate_host_volumes). When the
default docker provider does not already configure isolate_host_volumes,
`mngr extras config` (and `mngr extras -i`) now writes the recommended
`providers.docker.isolate_host_volumes = true` to the user-scope config,
creating the config file if there is none. This opts fresh installs into
the forthcoming default before it flips and silences the one-shot
deprecation warning that fresh installs otherwise hit via the
bare-backend fallback the first time they use docker.

With -y or without a TTY it prints the suggested `mngr config set`
command instead of writing. `mngr extras` status now reports whether
docker isolation is configured.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
isolate_host_volumes=true requires is_host_volume_created=true, so never
seed the recommended value when the docker block explicitly disables the
host volume -- that would write a config the validator rejects.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Consolidates one-time user-scope config setup under `mngr config wizard`
instead of splitting it across `mngr extras`:

- Add a docker host-volume isolation step: the wizard asks whether each
  docker host sees only its own host_dir sub-folder (the recommended,
  forthcoming default; requires Docker Engine >= 25.0) or keeps the legacy
  shared state volume, writing providers.docker.isolate_host_volumes.
  Opting in silences the one-shot deprecation warning a fresh install
  otherwise hits the first time it uses docker.

- Move the default-agent-type step out of `mngr extras` into the wizard.
  Because the wizard runs as its own installer step (after plugins are
  installed), it now sees freshly-installed plugin agent types rather than
  only those registered at startup.

`mngr extras` loses its `config` subcommand and default-agent-type step;
user-scope config setup lives entirely in `mngr config wizard`. This
supersedes the earlier extras-based approach on this branch. Updates
tutorial references and regenerates the config command docs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@evgunter evgunter changed the title Seed recommended docker isolation in extras config walk-through Move user-config setup into config wizard (+ docker isolation step) Jul 11, 2026
The wizard steps previously wrote directly (load -> set -> save), skipping
the schema validation that `config set` runs before saving, so a bad value
(e.g. isolate_host_volumes=true with is_host_volume_created=false) would be
persisted and only fail on the next load.

Extract the validate-then-save write into a shared `_apply_config_value`
used by both `config set` and the wizard. Each wizard step now writes via
an `apply_fn` bound to the user-scope file and the run's config context, so
every write is validated up front.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
evgunter and others added 2 commits July 11, 2026 15:57
Use functools.partial instead of an inline closure to bind the shared
validated writer, satisfying the PREVENT_INLINE_FUNCTIONS ratchet.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…g it

The default-agent-type step reimplemented list_available_agent_types as
_list_wizard_agent_type_choices, justified by "avoid loading a full
MngrConfig" -- but the wizard already has one (mngr_ctx.config from
setup_command_context), so the reimplementation was pure duplication.
The orchestrator now passes list_available_agent_types(mngr_ctx.config).

The remaining raw user-file reads (for the "already set?" checks) are kept
and their comment corrected: they detect whether the user *explicitly* set
a key, which the loaded merged config can't reveal for fields with non-None
defaults on plugin subclasses (e.g. claude's isolate_local_config_dir) --
not a re-parse for speed.

Also align _get_default_agent_type's leaf handling with the sibling
getters (reject a non-str value instead of coercing via str()).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…copes

Refactor the `mngr config wizard` steps so each one decides what (if
anything) to set and returns the chosen value (or None to leave it unset),
with all writing centralized in the orchestrator through the single
validate-then-save path (`_apply_config_value`). This removes the
`apply_fn` injection seam -- which existed only to let unit tests bypass
validation -- and with it the functools.partial that the ratchet bans.

Add an explicit "leave unset for now" option to every wizard prompt so a
choice can be deferred instead of forcing a value or a cancel.

For the "already configured?" check, read the create default type and
docker isolation off the merged config (their defaults already mark
"unset"), and read Claude's isolate_local_config_dir -- which has a
non-None default -- as explicit presence across every config file scope
(user, project, local) rather than only the user-scope file, so a
project/local setting also suppresses the prompt.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Spell out the effective default in the Claude and Docker 'leave unset'
rows: Claude defaults to isolating each agent's config dir, and Docker
keeps today's shared behavior (with the deprecation warning) until the
default flips to isolation in a future release.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Tighten the Claude and Docker isolate/share/leave-unset rows to one concise
line each, leaning on the picker header for context while keeping the key
details (macOS subscription caveat, Docker Engine version, and the default
each 'leave unset' falls back to).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Scope 'won't touch your default Claude config' to the isolate option (not a
general claim), spell out in the share option that mngr writes to the config
and that it's the credentials that need it for Claude subscriptions on macOS,
and quote 'isolate' in the docker leave-unset row so it reads as the state.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Read docker's isolate_host_volumes off the merged config via an
isinstance(DockerProviderConfig) narrow with direct attribute access,
instead of getattr() (which tripped the PREVENT_GETATTR ratchet), and
apply ruff format.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Spell out the two states where the isinstance is False (no [providers.docker]
block; or an instance named 'docker' with a non-docker backend), so the read
doesn't look like it silently swallows bad config.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@evgunter evgunter changed the title Move user-config setup into config wizard (+ docker isolation step) docker isolation (new) + default agent type (moved) in config wizard Jul 12, 2026
@evgunter evgunter marked this pull request as ready for review July 12, 2026 02:26
@evgunter evgunter requested a review from joshalbrecht July 12, 2026 02:54
# Conflicts:
#	libs/mngr/imbue/mngr/cli/extras_test.py
The default-agent-type prompt moved from 'mngr extras -i' into 'mngr
config wizard'; its old integration test (test_extras_interactive_includes_default_type)
went away with the extras step. The wizard step had only pure-function
coverage, so this adds an end-to-end invocation asserting the step is
actually wired into the 'config wizard' command.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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