Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions amplifier_app_cli/lib/bundle_loader/resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -201,8 +201,8 @@ class FoundationSettingsResolver:
1. Environment variable (AMPLIFIER_MODULE_<ID>)
2. Workspace convention (workspace_dir/<id>/)
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__(
Expand Down
9 changes: 8 additions & 1 deletion tests/test_provider_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
7 changes: 7 additions & 0 deletions tests/test_session_spawner_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading