Skip to content

fix(mcp): give a note moved across projects a permalink for its new path - #2229

Merged
phernandez merged 2 commits into
mainfrom
fix/cross-project-move-permalink
Dec 6, 2026
Merged

phernandez merged 2 commits into
mainfrom
fix/cross-project-move-permalink

Conversation

@phernandez

Copy link
Copy Markdown
Member

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, frontmatter permalink included. The moved note kept the source project's permalink, which resolved in neither project:

  • source project: NOT_FOUND: No note matches 'memory://<source>/moves/move-me'
  • destination project: INVALID_ARGUMENTS: path names project '<source>' but project '<dest>' was passed

The note was reachable only by its file path. Directory moves did the same for every note.

Fix

cross_project_move._without_permalink drops the frontmatter permalink before 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 no permalink key is copied unchanged.

Docs

  • bm-move(3), the bm_move description and the v1.1.0 changelog entry say the moved note gets a new permalink, and that the old permalink and memory:// URL do not follow it.
  • New 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 with bm project skills <project> (--off to stop). Nothing documented that before, so a type: skill note was silently not served.

Verification

  • just fast-check: clean
  • just fast-test tests/test_man_pages.py tests/mcp/test_tool_contracts.py tests/mcp/test_tool_bm_move_across_projects.py: 89 passed
  • just fast-test tests/mcp/test_tool_bm_move_across_projects.py test-int/mcp/test_move_note_integration.py: 69 passed
  • New tests: the moved note's permalink differs from the source's, matches its frontmatter, resolves via memory:// 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

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>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-06T17:21:38.009732Z 9965a77 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread skills/memory-onboarding/SKILL.md Resolved
…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>
@phernandez
phernandez force-pushed the fix/cross-project-move-permalink branch from 061ab63 to 9965a77 Compare December 6, 2026 17:19
@phernandez

Copy link
Copy Markdown
Member Author

The fix for the permalink-only frontmatter thread is now 9965a77. 061ab63 accidentally included unrelated staged deletions, so I rewrote it.

@phernandez
phernandez merged commit 94b8f61 into main Dec 6, 2026
52 checks passed
@phernandez
phernandez deleted the fix/cross-project-move-permalink branch December 6, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant