Skip to content

Fix branch-switch index convergence - #5067

Merged
Widthdom merged 6 commits into
mainfrom
fix-issue5054
Aug 10, 2026
Merged

Fix branch-switch index convergence#5067
Widthdom merged 6 commits into
mainfrom
fix-issue5054

Conversation

@Widthdom

@Widthdom Widthdom commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Reconcile current-HEAD Git-scoped refreshes from the persisted whole-workspace baseline, including paths touched by earlier scoped writes when a later commit range has no net diff.
  • Separate latest-write provenance, whole-workspace verification, and the legacy full-scan baseline across status, map, query/inspect, and MCP responses.
  • Publish verification only after successful full or baseline-reconciled scoped runs; partial, cancelled, sparse, unresolvable, or incomplete pending-path coverage stays fail-closed.
  • Read status, map, and symbol-analysis provenance with their response bodies from one SQLite snapshot, and expose the same analyze provenance in MCP default, compact, and count formats.
  • Preserve project-local workspace metadata for explicit --db <project>/.cdidx/codeindex.db inspect queries while retaining the one-snapshot provenance contract.

Validation

  • Merged latest origin/main at af83296abef48ccbf1e2569a6244c1d066c99b26.
  • dotnet build CodeIndex.sln -c Release --no-restore — passed with 0 warnings and 0 errors.
  • Focused Recompute trust and completeness metadata for filtered portable archives #5053/Make branch-switch refresh converge and keep indexed HEAD provenance consistent #5054 integration matrix — 32 passed on net8.0 and 32 passed on net9.0.
  • Focused workspace-metadata and explicit-DB inspect matrix — 16 passed on net8.0 and 16 passed on net9.0.
  • The previously failing CI test RunInspect_WithJsonUsesProjectLocalCdidxPathForExplicitProjectDb passes locally.
  • Focused Issue Make branch-switch refresh converge and keep indexed HEAD provenance consistent #5054 and map snapshot matrix — 24 passed on net8.0 and 24 passed on net9.0.
  • dotnet format CodeIndex.sln --verify-no-changes --no-restore — passed.
  • Changelog fragment validation — validated all 4 current fragments.
  • Debug-binary dogfood full index — 1,276 files, 47,609 symbols, 477,917 references, 0 warnings/errors.
  • Debug-binary current-HEAD scoped refresh — passed with 0 warnings/errors; final status --check --json reports index_matches_workspace: true, complete reference graph, and a clean worktree.
  • An exploratory full-solution run exposed a map projectRoot snapshot regression; the run was stopped after diagnosis, the root cause was fixed, and the targeted matrix above passed on both TFMs.

Adversarial review

Two Codex adversarial-review rounds were completed, which is the workflow maximum. All actionable findings were addressed, including net-zero Git ranges after scoped writes, one-snapshot analysis provenance, consistent MCP analyze formats, sparse/full-scan fail-closed behavior, and map project-root snapshot consistency.

Documentation and changelog

  • Updated the bilingual README, User Guide, Developer Guide, Testing Guide, and AGENT_GUIDE.md.
  • Added/updated changelog.d/unreleased/5054.fixed.md.
  • AGENTS.md, AGENT.md, and CLAUDE.md were not changed.

Related regressions

Follow-up candidates

  • None.

Fixes #5054

@Widthdom
Widthdom marked this pull request as ready for review August 10, 2026 04:34
@Widthdom
Widthdom merged commit 18401fa into main Aug 10, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue5054 branch August 10, 2026 04:34
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.

Make branch-switch refresh converge and keep indexed HEAD provenance consistent

1 participant