You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incremental repository sync fails when a commit changes files in a disabled language (e.g. YAML) #111
repository sync (incremental) fails with Sync failed: Staged rebuild failed (RuntimeError) whenever the commit range touches a tracked file whose language has no enabled plugin. YAML is disabled-by-default (see docs/SUPPORT_MATRIX.md), so any range that changes a workflow or Compose .yml file breaks incremental sync. The full-index path handles the same files without problems.
Found on the dev0 pilot (#107) while syncing from 85da6e1 to 1a61533. That range changes 12 tracked .yml files. Main at 1a61533 has the same code, so it isn't fixed there.
Root cause
_incremental_index_update calls dispatcher.index_file for each changed file. For an unsupported language, EnhancedDispatcher._match_plugin raises RuntimeError("No plugin for …"), and the result is recorded as a failure (result.failed += 1, in mcp_server/storage/git_index_manager.py).
UpdateResult.clean requires failed == skipped == 0. That makes _rebuild_repository_index_locked raise RuntimeError("Staged full index did not complete cleanly").
The full-index walk (dispatcher_enhanced.py) classifies the same ERROR + "No plugin for " outcome as an ignored file, through _is_non_indexable_result. So the two paths disagree about the same file.
Secondary: the error message is lost
The except in _rebuild_repository_index_locked keeps only type(exc).__name__ ("Staged rebuild failed (RuntimeError)"). It drops both the message and the per-file UpdateResult.errors, and the CLI logs neither, so this took an isolated reproduction to diagnose.
Reproduction
Index a repository at commit A. Commit a change to a .yml file (plus any Python change) to get commit B. Then run repository sync --repo-id <id> without --force-full: it fails as above. With --force-full the same sync succeeds.
Suggested fix
In the incremental mutation-result path, treat _is_non_indexable_result outcomes as ignored, the same way the full walk does. An in-process patch doing exactly that made the incremental sync succeed: 21 files, and the same file and symbol set as a full rebuild.
Include the exception message (and a bounded summary of UpdateResult.errors) in the stored sync error and the CLI output.
Add a regression test: an incremental sync whose diff includes a file in a disabled language.
Activity
fix(storage): prune only recorded generations; keep failures that are…
docs: describe recorded-only generation pruning and drift retries (#114…
fix(watcher): sweep only what the indexer stores; ignore non-indexabl…
release: 1.6.0 (#136)
Per-language degradation when a tree-sitter grammar is unavailable (#117