mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
acdab2ecfc
When build_context is called with project_id for a project in an organization
workspace (e.g. "big-team/main"), the fallback path in resolve_project_and_path
was only prepending the project permalink ("main/tests/*") and ignoring the
workspace slug. Notes in organization workspaces are stored with the full
workspace-prefixed permalink ("big-team/main/tests/test"), so the GLOB query
never matched.
Fix by calling _canonical_memory_path_for_workspace in the fallback when a
workspace context is active. This produces the correct prefix for both
organization workspaces ("big-team/main/tests/*") and personal workspaces
("main/tests/*"), consistent with how the existing workspace_context and
cached_project paths already handle URLs that begin with the qualified prefix.
Add tests for:
- build_context skips URL detection when project_id is provided
- build_context correctly resolves workspace-prefixed paths in org workspaces
Closes #799
Co-authored-by: Paul Hernandez <phernandez@users.noreply.github.com>
Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>