Repository navigation
fix(mcp): document that bm_write overwrite keeps frontmatter keys - #2111
Merged
Merged
Conversation
bm_write overwrite replaces the body and merges the frontmatter, as the service intends (note_preparation keeps the merge for partial writers). The tool said content was saved as given and overwrite replaced the note. Say what it does in the tool schema and bm-write(3), and pin the merge and key removal with a test. Fixes #1653 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CMYVL1rjJwNnrvxniz1dDD 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1653.
What #1653 reported, checked on main
#1653 was filed against
write_notein 0.23.0. On main, throughbm_write:custom_keycustom_keyis kepttags=INVALID_ARGUMENTS; nothing writtenNo case loses keys silently anymore. What remains is the first point of the issue: the merge is intentional (
note_preparation.py: "Partial writers such as write_note overwrite keep the merge"; only whole-document saves replace the frontmatter, #1768), but the tool said content was "Saved as given" and overwrite would "Replace a note".Change
bm_write's description,contentandoverwritefields now say that overwrite replaces the body and keeps frontmatter keys the new content or arguments don't set.bm-write(3)DESCRIPTION says the same and explains how to remove a key: edit the frontmatter text with bm_edit. The PARAMETERS block was regenerated withjust man-regen.test_overwrite_replaces_the_body_and_keeps_frontmatter_it_does_not_setpins the merge: a left-out key is kept, keys set by the content,tagsandmetadatatake their new values, and afind_replaceon the frontmatter removes a key.Verification
tests/mcp/test_tool_bm_write.py,tests/test_man_pages.pyandtests/test_bm_tool_manual_parameters.pypass (119 tests).just fast-checkpasses.🤖 Generated with Claude Code
https://claude.ai/code/session_01CMYVL1rjJwNnrvxniz1dDD