diff --git a/amplifier_app_cli/lib/bundle_loader/resolvers.py b/amplifier_app_cli/lib/bundle_loader/resolvers.py index 0bbd7b26..df4679b4 100644 --- a/amplifier_app_cli/lib/bundle_loader/resolvers.py +++ b/amplifier_app_cli/lib/bundle_loader/resolvers.py @@ -192,7 +192,7 @@ def get_module_sources(self) -> dict[str, str]: class FoundationSettingsResolver: """Settings-based resolver using foundation's source handling. - Uses the same 6-layer resolution strategy as StandardModuleSourceResolver, + Uses the same resolution strategy as StandardModuleSourceResolver, but returns Source objects that use foundation's GitSourceHandler for git operations. This ensures the NEW cache format is used: {repo-name}-{hash}/ instead of legacy {hash}/{ref}/ format. @@ -201,8 +201,8 @@ class FoundationSettingsResolver: 1. Environment variable (AMPLIFIER_MODULE_) 2. Workspace convention (workspace_dir//) 3. Settings provider (merges project + user settings) - 4. Legacy module pattern (removed) - 6. Installed package + 4. Source hint (from bundle config) + 5. Installed package (fallback) """ def __init__( diff --git a/tests/test_provider_commands.py b/tests/test_provider_commands.py index 925ed784..ac506f11 100644 --- a/tests/test_provider_commands.py +++ b/tests/test_provider_commands.py @@ -152,7 +152,14 @@ def test_provider_add_assigns_priority(self, tmp_path, monkeypatch): ] MockPM.return_value = mock_pm - result = runner.invoke(provider, ["add", "openai"]) + # `provider add` now detects that the env var this instance would + # use is already claimed by another instance and prompts for a + # distinct one. Left unanswered it reads EOF and cancels, so the + # provider is never written and the priority assertion below has + # nothing to inspect. Supply the per-instance var name. + result = runner.invoke( + provider, ["add", "openai"], input="OPENAI_PROVIDER_OPENAI_API_KEY\n" + ) assert result.exit_code == 0, f"Output: {result.output}" providers = settings.get_provider_overrides() diff --git a/tests/test_session_spawner_subprocess.py b/tests/test_session_spawner_subprocess.py index cd69462a..38198919 100644 --- a/tests/test_session_spawner_subprocess.py +++ b/tests/test_session_spawner_subprocess.py @@ -101,6 +101,13 @@ async def test_subprocess_param_routes_to_subprocess(self, monkeypatch): # Verify subprocess runner was called fake_module.run_session_in_subprocess.assert_called_once() call_kwargs = fake_module.run_session_in_subprocess.call_args + # Exact-equality is intentional here: this parent's coordinator.config + # carries no "agents" key (see _make_parent_session), so the issue + # #233 live-registry propagation in spawn_sub_session has nothing to + # add and the forwarded config is exactly the merge_configs() stub's + # return value, unchanged. See + # test_live_registry_agents_propagate_to_subprocess_config below for + # the case where an "agents" key legitimately appears. assert call_kwargs.kwargs["config"] == {"session": {}} assert call_kwargs.kwargs["prompt"] == "Do something" assert call_kwargs.kwargs["parent_id"] == "parent-session-id"