Skip to content

Add completion signal for bm watch indexing #685

@bm-clawd

Description

@bm-clawd

Currently there's no built-in way to detect when bm watch has finished processing a batch of file changes. Users need to poll bm status or use search_notes as a proxy to detect completion.

Use cases:

  • Bulk imports: Writing hundreds of notes and waiting for indexing to complete before querying
  • Benchmarking: Need deterministic timing for when index is fully up-to-date
  • Integration testing: Synchronizing test steps that depend on indexed data

Current workarounds:

  • Poll bm status until files_out_of_sync hits 0
  • Search for a known note from the batch and wait for it to appear
  • Run bm reindex (synchronous but reprocesses everything, slow for large projects)

Potential solutions:

  1. MCP notification: Emit an event when watch completes a batch (e.g., indexing_complete notification)
  2. bm status --wait flag: Block until sync complete, then exit (like git status but waits)
  3. Event stream: Watch emits structured events (indexing_started, indexing_complete) on stdout
  4. Progress indicator: Simple output like "Indexed 71/71 files" when batch completes

Context:

  • @Brennall: bulk importing 400 notes, needs to know when batch is indexed before querying
  • @groksrc: ran into this while working on benchmarks

Prefer option 1 (MCP notification) or option 2 (--wait flag) for cleanest integration with existing tooling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions