Repository navigation
fix(mcp): give a note moved across projects a permalink for its new path - #2229
Conversation
A cross-project move copied the note's markdown verbatim, frontmatter permalink included. The copy kept the source project's permalink, which resolved in neither project: the source no longer had the note, and the destination refused a memory:// URL naming another project. The note was reachable only by file path. The copy now drops the frontmatter permalink before it is written, so the destination assigns one for the note's new path, as it does for any new note. Only the frontmatter is rewritten; the body keeps its exact bytes. Docs: bm-move(3), the bm_move description and the changelog say the moved note gets a new permalink. A new skills(7) page and the changelog document `bm project skills <project>`, which note skills need: serving them is off by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CMYVKz9DguvH7PfmUPwps2 Signed-off-by: phernandez <paul@basicmachines.co>
Codex Review Summary: ✅ CompletedThis 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: 17df3b225e
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 061ab634ef
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…field Dropping the only frontmatter field left an empty mapping, which dumps as the bare body. The target then read a YAML-shaped block at the top of that body as the copy's frontmatter. The copy now keeps its fences with the note's title. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CMYVKz9DguvH7PfmUPwps2 Signed-off-by: phernandez <paul@basicmachines.co>
061ab63 to
9965a77
Compare
Found in live testing of the v1.1.0 features over the stdio MCP server.
Problem
bm_move(..., destination_project=...)copied the note's markdown verbatim, frontmatterpermalinkincluded. The moved note kept the source project's permalink, which resolved in neither project:NOT_FOUND: No note matches 'memory://<source>/moves/move-me'INVALID_ARGUMENTS: path names project '<source>' but project '<dest>' was passedThe note was reachable only by its file path. Directory moves did the same for every note.
Fix
cross_project_move._without_permalinkdrops the frontmatterpermalinkbefore the copy is written, so the destination assigns one for the note's new path, the same way it does for any new note. Only the frontmatter is rewritten. The body keeps its exact bytes (same approach as #2176). Content with no frontmatter, unparseable YAML, or nopermalinkkey is copied unchanged.Docs
bm-move(3), thebm_movedescription and the v1.1.0 changelog entry say the moved note gets a new permalink, and that the old permalink andmemory://URL do not follow it.skills(7)manual page covering the bundled skills and note skills. The v1.1.0 changelog entry for note skills now says serving is off by default and is turned on per project withbm project skills <project>(--offto stop). Nothing documented that before, so atype: skillnote was silently not served.Verification
just fast-check: cleanjust fast-test tests/test_man_pages.py tests/mcp/test_tool_contracts.py tests/mcp/test_tool_bm_move_across_projects.py: 89 passedjust fast-test tests/mcp/test_tool_bm_move_across_projects.py test-int/mcp/test_move_note_integration.py: 69 passedmemory://in the destination, and the body bytes (indent, trailing spaces, tab) are unchanged; the directory-move test checks each moved note resolves by permalink; the helper's pass-through cases.🤖 Generated with Claude Code
https://claude.ai/code/session_01CMYVKz9DguvH7PfmUPwps2