Skip to content

fix(mcp): make bm_schema no-schema guidance work without the bm CLI - #1991

Merged
groksrc merged 2 commits into
mainfrom
shipright/BMEM-69
Oct 30, 2026
Merged

groksrc merged 2 commits into
mainfrom
shipright/BMEM-69

Conversation

@groksrc

@groksrc groksrc commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Summary

The "No Schema Found" text that bm_schema returns told users to run bm reindex --search or wait for the file watcher. Cloud users have neither. The guidance now uses only MCP tools. Fixes #1985.

Changes

  • _no_schema_guidance() in src/basic_memory/mcp/tools/note_schemas.py: step 2 creates the schema note with bm_write; the Index step is removed and replaced by one line saying a note saved with bm_write is available to bm_schema at once; Re-run is now step 3 and includes project=....
  • Headings and step 1 are unchanged.

Tests

  • The validate and diff refusal tests now assert bm_write is present and bm reindex / file watcher are absent.
  • New test_schema_note_from_bm_write_found_without_reindex: validate refuses, a schema note is written with bm_write, and validate then returns a report with no index_project() call between.
  • Ran uv run pytest tests/mcp/test_tool_bm_schema.py tests/mcp/test_tool_bm_project.py: 61 passed. In just check, only the typecheck step fails, on unresolved pymilvus imports 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

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

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T04:06:02.614013Z ae1a7a2 PR opened
ℹ️ 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.

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
groksrc merged commit 4d58db0 into main Oct 30, 2026
43 checks passed
@groksrc
groksrc deleted the shipright/BMEM-69 branch October 30, 2026 04:33

@groksrc groksrc left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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-264 names bm_write, removes the CLI and file-watcher step, and includes the required project argument.
  • tests/mcp/test_tool_bm_schema.py:695-786 covers 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.py passed all 61 tests locally.
  • Ruff and formatting passed locally. Local type checking stopped only on four unresolved optional pymilvus imports 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.

@groksrc groksrc added the review:done Automated review found no blocking issues label Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:done Automated review found no blocking issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bm_schema no-schema guidance tells cloud users to run bm reindex --search

1 participant