{{ message }}
Repository navigation
Conversation
Add a read-only, project-scoped integrity report for duplicate search
rows, orphaned rows, entities missing their search projection, and
informational inverted timestamps. `bm doctor` inspects existing
projects before its disposable smoke test and reports anomalies after
it, while `--project` limits the inspection to one project. The same
report is available at GET /v2/projects/{project_id}/integrity and
through ProjectClient.get_integrity().
Inverted timestamps stay informational because file-time fallbacks can
legitimately put updated_at before created_at. Drive the cloud client
through the named project so multi-workspace routing stays correct.
Co-Authored-By: Claude Code <noreply@anthropic.com>
Signed-off-by: TPSJASPER <592827953@qq.com>
Contributor
Author
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Member
phernandez
added a commit
that referenced
this pull request
Oct 23, 2026
bm doctor now reports problems in the user's real projects and, for each
one it can repair, the command that repairs it. It only reads; it never
changes a project, the config, or the database.
- GET /v2/projects/{id}/doctor returns a typed ProjectDoctorReport. Checks:
project path, index readiness, search index integrity (duplicate,
orphaned and missing rows) and note materialization (failed saves,
external-change holds).
- Findings carry a typed action (index_project, reindex_search[full]);
the CLI renders it as a quoted command. The API never hardcodes CLI
strings, because a cloud project cannot run a local command.
- Severity follows the consistency model: missing and orphaned rows are
info while file indexing has work owed, and errors once it settles.
Duplicates are always errors. Exit 1 only on errors.
- --json prints the whole report for agents and scripts.
- The write/index/search self-test runs in a child process with its own
temporary home, config, database and temp dir and no BASIC_MEMORY_*
variables. The disposable-project endpoint, its service method and the
allow_nested escape hatch existed only for the old in-place self-test
and are removed.
- --cloud is refused for now; cloud projects are listed as skipped.
The search index check builds on TPSJASPER's read-only integrity report
from #1792 (the previous commit), reshaped to keep separate examples per
anomaly and to count notes missing their search row directly.
Refs #1798
Refs #1773
Co-authored-by: TPSJASPER <592827953@qq.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KjsDUcHANBa17M84sKxFG3
Signed-off-by: phernandez <paul@basicmachines.co>
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
GET /v2/projects/{project_id}/integrityandProjectClient.get_integrity().bm doctornow inspects existing projects before its disposable smoke test and reports duplicate search rows, orphaned rows, entities missing their search projection, and informational inverted timestamps.--projectlimits the integrity inspection to one project; cloud routing follows the named project's workspace.updated_atbeforecreated_at; they never mark the index as damaged.Tests
ruff check,ruff format --check, andty checkpass.Fixes #1773
🤖 Generated with Claude Code