Skip to content

Estimate index dry-run mutations - #4997

Merged
Widthdom merged 3 commits into
mainfrom
fix-issue4893
Jul 30, 2026
Merged

Estimate index dry-run mutations#4997
Widthdom merged 3 commits into
mainfrom
fix-issue4893

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Replaces misleading all-zero index --dry-run mutation counts with bounded parse-only estimates for changed/new parsable sources.
  • Emits per-metric source, confidence, and explicit unknown reasons whenever a trustworthy value cannot be produced.
  • Projects updates, skips, policy skips, deletes, stale-row purges, cap hits, and bounded-estimation truncation without mutating the database or source tree.

Implementation impact

  • Reuses production invalidation contracts when deciding whether an indexed file can be projected as unchanged.
  • Limits parse estimation to 100 update candidates and marks affected child metrics unknown when the limit, path cap, parse failure, partial schema, snapshot failure, or cross-file C# augmentation prevents a reliable estimate.
  • Covers JSON and human output while preserving dry-run's non-mutating behavior.

Validation

  • Release build: net8.0/net9.0, 0 warnings and 0 errors.
  • Full net8.0 suite: 10,925 passed, 7 skipped, 0 failed (10,932 total).
  • Full net9.0 suite: 10,451 passed, 420 skipped, 0 failed (10,871 total).
  • Focused Issue Return useful or explicit-unknown mutation estimates from index dry-run #4893 tests: 11/11 passed on net8.0 and net9.0.
  • Dry-run regression group: 44/44 passed on net8.0; 42 passed, 2 skipped, 0 failed on net9.0.
  • dotnet format CodeIndex.sln --verify-no-changes --no-restore passed.
  • Changelog fragment validation passed.
  • git diff --check passed.

Adversarial review

Two required Codex adversarial-review rounds were completed. Round 1 findings around persisted caps, production reuse contracts, and unchanged binary projections were fixed. Round 2 findings around forced extractor invalidation, defensive symbols-only handling, C# workspace augmentation, hotspot marker trust, and unavailable snapshot reporting were fixed. (--symbols-only --dry-run is already rejected by command validation; the reuse helper also handles it defensively.)

Documentation

Updated the English and Japanese README/developer-guide sections and added changelog.d/unreleased/4893.changed.md.

Fixes #4893

@Widthdom
Widthdom marked this pull request as ready for review July 30, 2026 13:23
@Widthdom
Widthdom merged commit 576feac into main Jul 30, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue4893 branch July 30, 2026 13:23
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.

Return useful or explicit-unknown mutation estimates from index dry-run

1 participant