Skip to content

fix: sync gaps - source columns in index, rebuild after sync, freshness on ingest#29

Merged
vraspar merged 1 commit intomainfrom
fix/sync-gaps
Mar 26, 2026
Merged

fix: sync gaps - source columns in index, rebuild after sync, freshness on ingest#29
vraspar merged 1 commit intomainfrom
fix/sync-gaps

Conversation

@vraspar
Copy link
Owner

@vraspar vraspar commented Mar 26, 2026

Fixes 3 sync gaps from QA v2:

  1. rebuildIndex loses source tracking — INSERT now includes source_repo, source_path, source_content_hash. Previously these were dropped on every rebuild, breaking findEntryBySourcePath used by sync's M/D detection.

  2. No rebuildIndex after sync — brain sources sync now calls rebuildIndex + updateFreshnessScores. New/updated/deleted entries appear in search/list immediately.

  3. No freshness on ingest — brain ingest now calls updateFreshnessScores. list --fresh/--stale works right after import.

Build clean.

…ss on ingest

1. rebuildIndex now includes source_repo, source_path, source_content_hash
   in INSERT statement. Previously these were lost on every rebuild,
   breaking findEntryBySourcePath used by sync M/D detection.

2. brain sources sync now calls rebuildIndex + updateFreshnessScores
   after sync completes. New/updated/deleted entries appear in search.

3. brain ingest now calls updateFreshnessScores after import.
   list --fresh/--stale works immediately after ingest.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vraspar vraspar merged commit a8a5378 into main Mar 26, 2026
4 checks passed
@vraspar vraspar deleted the fix/sync-gaps branch March 26, 2026 19:07
vraspar added a commit that referenced this pull request Mar 26, 2026
README.md:
- Added restore, serve, sources to usage section (was 17, now 20)
- All 20 user-facing commands now documented

CHANGELOG.md:
- Added PR references (#10, #13, #18, #20, #26, #27, #28, #29)
- Added grouped help (#26) and source-tag custom value (#27)
- Added sync fixes (#29)

Docs consistency check passes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
vraspar added a commit that referenced this pull request Mar 26, 2026
)

README.md:
- Added restore, serve, sources to usage section (was 17, now 20)
- All 20 user-facing commands now documented

CHANGELOG.md:
- Added PR references (#10, #13, #18, #20, #26, #27, #28, #29)
- Added grouped help (#26) and source-tag custom value (#27)
- Added sync fixes (#29)

Docs consistency check passes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
vraspar added a commit that referenced this pull request Mar 26, 2026
README.md:
- Added restore, serve, sources to usage section (was 17, now 20)
- All 20 user-facing commands now documented

CHANGELOG.md:
- Added PR references (#10, #13, #18, #20, #26, #27, #28, #29)
- Added grouped help (#26) and source-tag custom value (#27)
- Added sync fixes (#29)

Docs consistency check passes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
vraspar added a commit that referenced this pull request Mar 26, 2026
* docs: add missing commands to README, update CHANGELOG with PR refs

README.md:
- Added restore, serve, sources to usage section (was 17, now 20)
- All 20 user-facing commands now documented

CHANGELOG.md:
- Added PR references (#10, #13, #18, #20, #26, #27, #28, #29)
- Added grouped help (#26) and source-tag custom value (#27)
- Added sync fixes (#29)

Docs consistency check passes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: serve startup message and table title truncation

serve: prints startup message to stderr ('Brain MCP server running
on stdio...') so users know it started. Uses stderr to avoid
interfering with MCP stdio transport on stdout.

tables: truncates titles to 40 chars with '...' suffix in all table
outputs (list, search, digest, stats). Prevents long titles from
breaking table formatting. JSON output retains full titles.

7 new tests for truncation behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant