Repository navigation
fix(mcp): make bm_schema no-schema guidance work without the bm CLI - #1991
Merged
Merged
Conversation
The "No Schema Found" guidance told users to write a markdown file and run `bm reindex --search` or wait for the file watcher. Cloud users have neither. Step 2 now creates the schema note with `bm_write`. The Index step is gone, replaced by a line saying a note saved with `bm_write` is available to `bm_schema` at once. The re-run step is now step 3 and passes `project=`. Tests assert the validate and diff refusals name `bm_write` and no CLI or file watcher, and that a schema note written with `bm_write` is found by `bm_schema validate` with no reindex in between. Refs #1985 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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. |
I, Drew Cain <groksrc@gmail.com>, hereby add my Signed-off-by to this commit: ae1a7a2 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Drew Cain <groksrc@gmail.com>
groksrc
commented
Oct 30, 2026
groksrc
left a comment
Member
Author
There was a problem hiding this comment.
Review verdict: no blocking findings.
This change replaces local-only schema guidance with MCP tools and proves that bm_write makes a schema available to bm_schema without reindexing. The diff satisfies the issue’s merge-time acceptance criteria.
Evidence:
src/basic_memory/mcp/tools/note_schemas.py:243-264namesbm_write, removes the CLI and file-watcher step, and includes the required project argument.tests/mcp/test_tool_bm_schema.py:695-786covers both refusal paths and the immediate write-then-validate workflow.uv run pytest tests/mcp/test_tool_bm_schema.py tests/mcp/test_tool_bm_project.pypassed all 61 tests locally.- Ruff and formatting passed locally. Local type checking stopped only on four unresolved optional
pymilvusimports in unchanged Milvus files. GitHub’s complete check rollup passed. - The production change is guidance text only. It does not add an execution path, permission boundary, or data-handling risk.
Notes that don’t block:
- The pull request merged before this review was posted, so this comment records the retrospective review result.
Next step: Shipright can accept the review:done verdict and continue the ticket workflow.
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.
Summary
The "No Schema Found" text that
bm_schemareturns told users to runbm reindex --searchor wait for the file watcher. Cloud users have neither. The guidance now uses only MCP tools. Fixes #1985.Changes
_no_schema_guidance()insrc/basic_memory/mcp/tools/note_schemas.py: step 2 creates the schema note withbm_write; the Index step is removed and replaced by one line saying a note saved withbm_writeis available tobm_schemaat once; Re-run is now step 3 and includesproject=....Tests
bm_writeis present andbm reindex/file watcherare absent.test_schema_note_from_bm_write_found_without_reindex: validate refuses, a schema note is written withbm_write, and validate then returns a report with noindex_project()call between.uv run pytest tests/mcp/test_tool_bm_schema.py tests/mcp/test_tool_bm_project.py: 61 passed. Injust check, only the typecheck step fails, on unresolvedpymilvusimports in files this PR does not touch (optional dependency not installed in my environment).Not changed: schema inference ignoring frontmatter (#1973) and the other guidance messages.
Rollback: revert; text and tests only.
🤖 Generated with Claude Code