Context
During a dogfooding session (2026-02-06), the MCP server was running with an index from 2/5. After merging PR #136 (changes to response-budget.ts), the index remained stale:
get_files_context on response-budget.ts returned old line numbers (pre-refactor)
pendingFileCount: 0 reported — the server didn't detect the changes
lastReindexDurationMs and msSinceLastReindex were null in every tool response
Expected Behavior
Lien has two automatic change detection mechanisms:
- Git change detection — polls for git state changes (branch switches, new commits)
- File watching — watches for filesystem changes via chokidar
After pulling/merging new code on main, one of these should trigger a reindex of changed files, and indexInfo should reflect accurate reindex metadata.
Observed Behavior
Neither mechanism triggered. The index stayed on the 2/5 version despite new commits being pulled. lastReindexDurationMs and msSinceLastReindex remain null, suggesting no automatic reindex has ever fired during this server session.
Investigation Areas
- Is the git change handler (
createGitChangeHandler) actually firing on git pull?
- Is the file watcher (
FileWatcher) picking up changes to files modified by merge?
- Are
lastReindexDurationMs / msSinceLastReindex being populated correctly in indexInfo?
- Could there be a race condition where the MCP server starts before the watcher is ready?
Found During
Dogfooding session — .wip/dogfood-report.md has full details.
Context
During a dogfooding session (2026-02-06), the MCP server was running with an index from 2/5. After merging PR #136 (changes to
response-budget.ts), the index remained stale:get_files_contextonresponse-budget.tsreturned old line numbers (pre-refactor)pendingFileCount: 0reported — the server didn't detect the changeslastReindexDurationMsandmsSinceLastReindexwerenullin every tool responseExpected Behavior
Lien has two automatic change detection mechanisms:
After pulling/merging new code on
main, one of these should trigger a reindex of changed files, andindexInfoshould reflect accurate reindex metadata.Observed Behavior
Neither mechanism triggered. The index stayed on the 2/5 version despite new commits being pulled.
lastReindexDurationMsandmsSinceLastReindexremainnull, suggesting no automatic reindex has ever fired during this server session.Investigation Areas
createGitChangeHandler) actually firing ongit pull?FileWatcher) picking up changes to files modified by merge?lastReindexDurationMs/msSinceLastReindexbeing populated correctly inindexInfo?Found During
Dogfooding session —
.wip/dogfood-report.mdhas full details.