Skip to content

fix: get_indexing_status lastUpdated remains stale after incremental sync#404

Open
linze0721 wants to merge 1 commit into
zilliztech:masterfrom
linze0721:berserk/e3b41593-0b22-40ec-a8a8-9181c1d52479
Open

fix: get_indexing_status lastUpdated remains stale after incremental sync#404
linze0721 wants to merge 1 commit into
zilliztech:masterfrom
linze0721:berserk/e3b41593-0b22-40ec-a8a8-9181c1d52479

Conversation

@linze0721

Copy link
Copy Markdown

Summary

Fixes #395: incremental sync (handleSyncIndexreindexByChange) now updates persisted MCP snapshot metadata so get_indexing_status reflects recent sync activity, not only the last full index.

Root cause

SyncManager.handleSyncIndex() completed vector/Merkle updates but never called SnapshotManager to bump freshness or save ~/.context snapshot JSON. get_indexing_status read indexedInfo.lastUpdated, which was only set on full index / recovery paths.

Changes

Area Change
config.ts CodebaseInfoIndexed: optional lastFullIndexAt, lastIncrementalSyncAt, lastSyncStats
snapshot.ts recordIncrementalSyncSuccess() updates lastUpdated, incremental fields, optional file/chunk counts; setCodebaseIndexed() sets lastFullIndexAt
sync.ts After successful reindexByChange per codebase, record stats and saveCodebaseSnapshot()
handlers.ts Status text: Last full index, Last incremental sync (with stats or “no file changes”), Index freshness (lastUpdated)
Tests snapshot.incremental-sync.test.ts, sync.incremental-metadata.test.ts; extended handlers.get-indexing-status.test.ts

Verification

pnpm install --frozen-lockfile && pnpm --filter @zilliz/claude-context-mcp... run build && pnpm --filter @zilliz/claude-context-mcp test

7/7 tests passed.

Commit

  • SHA: 563063b
  • Branch: berserk/e3b41593-0b22-40ec-a8a8-9181c1d52479 (pushed to origin)

Client impact

Agents can distinguish: stale full-index-only timestamp vs successful incremental sync (including zero-change runs) without forcing index_codebase force=true.

Commit

563063b

Branch

berserk/e3b41593-0b22-40ec-a8a8-9181c1d52479

Fixes #395

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.

get_indexing_status lastUpdated remains stale after incremental sync

1 participant