Repository navigation
feat(mcp): bm_man and manual pages for the 1.0 tools - #1844
Merged
Merged
Conversation
- bm_man reads the bundled manual: the index, one page by any spelling (bm-search(3), bm_search), or the pages that mention every word of a query. It never reads a manual project, so it works in every workspace. `topic`, `name`, `command` and `tool` are accepted for `page`. - Section 3 gets a page for each bm_* tool, with examples verified against an isolated local project. Section 1 pages cross-reference their bm_* counterparts. - scripts/update_man_pages.py --new TOOL scaffolds a section-3 page from the registry; regeneration now sees the project-delete tools, which refreshed delete-project(3). - The legacy man tool, bm man <topic> and bm man apropos read only the bundled pages. Falling back to a "manual" project caused about 90% of man's production errors (2026-10): hosted workspaces have no such project. - "man" is a reserved project name, since memory://man/ is the manual; the manual resource no longer falls back to a note in a project named man. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018CoZ3jWnMJsyQsik4tPySk Signed-off-by: phernandez <paul@basicmachines.co>
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. |
phernandez
added a commit
that referenced
this pull request
Nov 6, 2026
…urrently (#2072) ## Why A version prune deletes old object versions, and Tigris sends one `OBJECT_DELETED` notification per version. In production on 2026-11-06 the webhook batches during a prune averaged **30.3 events for 10.3 distinct paths**. `run_runtime_storage_event_operations` handled every event one after another (entity lookup plus a current-object HEAD, about 0.33 s each), so a batch took about 10 s and the cloud webhook queue fell 30+ minutes behind. That delay hits every workspace's sync and external edits, because they share the queue. ## What - **One check per path per batch.** Operations are grouped by path in arrival order, and consecutive deletes of one path collapse into a single step that stands for all the events it covers. A delete only asks whether the object is still there, so one check answers them all. Counts stay per event: a collapsed step adds its event count to processed or failed. - **Paths run concurrently, opt in.** `run_runtime_storage_event_operations(..., max_concurrent_paths=1)`. The default keeps today's behavior. Above 1, different paths run concurrently while one path's steps stay in order (a create between two deletes still runs between them). A failure the processor chooses to raise cancels the other paths and fails the batch as that exception, as it stopped the sequential loop before. - `StorageEventIndexRuntime.max_concurrent_paths` passes the setting through project routing. - `StorageEventOperationProcessor` creates its lazy delete resources under a lock, so concurrent paths share one set. Local Basic Memory keeps the default (one path at a time). Cloud will pass the webhook job's share of the worker's tenant database connection budget, so the fan-out never exceeds connections the job can hold (the cloud #1844 rule). ## Tests New tests in `tests/test_runtime_storage_events.py` and `tests/index/test_storage_event_operation_processor.py`: - repeated deletes of one path run one check and count every event; - a create between deletes keeps each step in order; - a failed collapsed check counts every event it covers as failed; - paths run concurrently up to the limit and never overlap themselves; the default runs one at a time; - a raised failure fails a concurrent batch as itself, not as an `ExceptionGroup`; - concurrent deletes create delete resources once. Each guard was checked by breaking it: no collapse fails 2 tests, never concurrent fails the cap test, no lock fails the shared-resources test. `tests/test_runtime_storage_events.py` plus `tests/index/` pass (252). Ruff clean; `just typecheck` reports only the existing `pymilvus` optional-dependency imports. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016N9c6ouiT4Wid3arGR41Dv Signed-off-by: phernandez <paul@basicmachines.co> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes the
bm_manpart of #1832 (SPEC-35.2, #1827).What changed
bm_mantoolbm_man()returns the index.bm_man(page=...)reads one page, under any spelling:bm-search(3),bm_searchor3/bm-search.bm_man(query=...)lists the pages that mention every word, likeman -k.manualproject, so it works in any workspace with no network.topic,name,commandandtoolas spellings ofpage. Productionmancalls failed validation on each of those names.NOT_FOUND,INVALID_ARGUMENTS) in the requestedoutput_format.Manual pages
bm_*tool (13 pages).bm_*counterparts:cat(1)andhead(1)→bm-read(3)grep(1)→bm-search(3)ls(1)→bm-list(3)find(1)→bm-find(3)tail(1)→bm-project(3)apropos(1)→bm-man(3)scripts/update_man_pages.py --new TOOL ...scaffolds a page from the registry. It never overwrites an existing page.delete-project(3), which was missing theoutput_formatparameter added in feat(mcp): add bm_project, bm_project_delete and bm_schema #1839.Bundled-only manual everywhere
mantool,bm man <topic>andbm man aproposnow read only the bundled pages.manerrors wereProject 'manual' was not found: hosted workspaces have no such project.Reserved project name
manis now a reserved project name, becausememory://man/is the manual.man.Not in this PR
bm_*issues found while verifying the examples (stale write counts, one-note no-match output, hybrid hits without lines, pattern context rows, tinymax_tokens, legacy names in schema guidance).Verification
just fast-checkjust test-unit-sqlite: 8800 passed. That run was before the reserved-name commit;just fast-testcovered that change afterwards.just man-regenreports no drift.fastmcp.Client(mcp)with temporaryHOME,BASIC_MEMORY_HOMEand config directories.🤖 Generated with Claude Code
https://claude.ai/code/session_018CoZ3jWnMJsyQsik4tPySk