fix: filter false-positive "changed" files in incremental detection#17
Conversation
getChangedFiles unions git-diff with git-status, but uncommitted files reported by `git status --porcelain` reappear on every run even when their content hash already matches the index. This caused misleading "Incremental: 1 changed" logs and unnecessary read+hash work inside indexFiles on every invocation. Compare content hashes in getChangedFiles itself so only truly modified files enter the changed list.
🦋 Changeset detectedLatest commit: 39ef64f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis change fixes incremental change detection in the indexing engine by modifying Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
getChangedFiles) reported uncommitted files as "changed" on every run, even when their content hash already matched the index — caused bygit status --porcelainalways including dirty working-tree filesIncremental: 1 changedlogs and unnecessary read+hash work inindexFilesTest plan
bun run check(format, lint, typecheck, tests) all greenmerchant-dashboard-v2, 1859 files, dirty working tree) — second consecutive run correctly shows0 changed, 0 deleted/Index is up to dateSummary by CodeRabbit
Bug Fixes