mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
21d49023e7
The previous revision gated project_id forwarding on the `cloud_available` composite (factory_mode OR explicit_cloud OR has_cloud_credentials), mirroring get_project_client. But `has_cloud_credentials` returns True any time OAuth tokens linger from a past `bm cloud login`, even when the user is back to working purely locally. So on a typical dev box the fan-out still forwarded project_id, hit get_project_client's UUID branch (which treats unknown identifiers as cloud since local config doesn't key by UUID), and 401d silently — leaving merged results empty. Route by name only: project_refs already carry the workspace/project qualified_name, which is just as unambiguous as the external_id for both backends. project_id stays in the call signature purely as a fallback for refs that unexpectedly have no name. Confirmed live in a restarted MCP — the previous fix did not actually deliver multi-project results when the dev environment had any cloud credentials at all. Tests now drop the routing-mode stubs; the cloud-style tests just key their MockSearchClient on the workspace-qualified name passed via the project parameter. Signed-off-by: phernandez <paul@basicmachines.co>