Repository navigation
fix(mcp): honor project constraint in JSON project list - #1937
Conversation
list_memory_projects returned every merged project in JSON output while the text output showed only the constrained project. Filter the JSON project list to the BASIC_MEMORY_MCP_PROJECT constraint. Fixes #1895 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CMYVL1x91B8kJxy7nn2GU8 Signed-off-by: phernandez <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4fd253d963
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| merged = [ | ||
| project | ||
| for project in merged | ||
| if generate_permalink(project["name"]) == constrained_permalink |
There was a problem hiding this comment.
Match qualified constraints before filtering project rows
When BASIC_MEMORY_MCP_PROJECT uses the supported workspace-qualified form such as team/main, cloud routing resolves it correctly, but merged rows store the bare name (main) and the qualified spelling separately in qualified_name. This predicate therefore removes the constrained project—and every other row—so list_memory_projects(output_format="json") returns an empty list; downstream flows such as search_all_projects and the getting-started prompt then behave as though the routed project does not exist. Match the constraint against the row's qualified name (and other supported identifiers) as well as its bare name.
Useful? React with 👍 / 👎.
BASIC_MEMORY_MCP_PROJECT accepts a workspace-qualified name or an external_id, but the JSON filter compared only bare names, so those constraints emptied the project list. Match every spelling routing accepts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CMYVL1x91B8kJxy7nn2GU8 Signed-off-by: phernandez <[email protected]>
## Why `bm cloud api-key save bmc_...` required the key on the command line, which leaves it in shell history and visible to other local users through `ps`. Found by the CodeRabbit deep scan (K23). Fixes #1902. ## What changed - The key argument is optional. When omitted, the command reads it from a prompt that does not echo input. - The positional form still works, so existing scripts are unaffected. - Docs (`docs/cloud-cli.md`, `AGENTS.md`) show the prompt form. ## Verification - New `tests/cli/test_cloud_api_key_save.py`: the two prompt tests fail without the fix; the positional test passes before and after. - `just fast-check`: clean Stacked on #1937. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01CMYVL1x91B8kJxy7nn2GU8 Signed-off-by: phernandez <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Why
With
BASIC_MEMORY_MCP_PROJECTset,list_memory_projectstext output shows only the constrained project, but JSON output returned every merged project and only labeled the constraint. Found by the CodeRabbit deep scan (K12). Fixes #1895.What changed
_format_project_list_jsonfilters projects to the constraint, matched by permalink.Verification
just fast-test tests/mcp/test_tool_project_management.py: 46 passedjust fast-check: cleanFirst of three stacked PRs from the scan triage.
🤖 Generated with Claude Code
https://claude.ai/code/session_01CMYVL1x91B8kJxy7nn2GU8