Skip to content

fix(core): fall back to full git status when the config cannot be read - #971

Open
dmtrKovalenko wants to merge 1 commit into
mainfrom
fix/review-followups
Open

dmtrKovalenko wants to merge 1 commit into
mainfrom
fix/review-followups

Conversation

@dmtrKovalenko

@dmtrKovalenko dmtrKovalenko commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Use the full status refresh when the Git config fails to load, instead of returning no status. Break grep ranking ties by address in every sort path, so full and partial ranking give the same order. Use the project's parking_lot mutex for bigram column allocation.


PR Problem Change
#961 repo.config()? returned an error, so the picker had no git status Config error → existing full refresh
#960 Full sort kept input order for ties, partial sort used address order Both sorts use rank_with_ties
#962 std::sync::Mutex with expect on poison parking_lot::Mutex

Summary by CodeRabbit

  • Bug Fixes
    • Repository status scanning now falls back to a full scan when repository settings cannot be read, improving reliability for large repositories on Linux.
    • Search results with equal relevance scores now use consistent ordering, including when the app switches between ranking methods. This makes tied results less dependent on the order in which files were provided.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 49a127ab-1141-4605-959f-57402159c835
Commits

Reviewing files that changed from the base of the PR and between 40eb573 and 1564482.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The PR changes Git status fallback behavior, makes grep ranking ties consistent, and switches the bigram column counter to parking_lot::Mutex.

Changes: Git status fallback

Layer / File(s) Summary
Configuration fallback
crates/fff-core/src/git.rs
When reading core.ignorecase fails, read_full_status uses the full status scan.

Grep ranking ties

Layer / File(s) Summary
Consistent tie ordering
crates/fff-core/src/grep/prefilter.rs
rank_with_ties compares file addresses for equal scores. The full-sort fallback now uses the same comparator.

Bigram column locking

Layer / File(s) Summary
Column counter locking
crates/fff-core/src/index/bigram_filter.rs
The column counter uses parking_lot::Mutex. Column allocation and counting no longer unwrap a mutex lock result.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

Suggested reviewers: gustav-fff

Merge Risk: Minimal · previous review 5f778

The change makes Git status fall back to the full scan when the config cannot be loaded, makes grep ranking ties consistent, and removes a poisoned-mutex panic. No concrete merge-blocking risk remains.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the Git status fallback change, which is a primary objective of the pull request. It does not mention the two smaller related fixes, but the title need not co…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title clearly and concisely describes the Git status fallback change, which is a primary objective of the pull request. It does not mention the two smaller related fixes, but the title need not cover every change.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 83e8ddd4-374f-47a9-9dad-cb97b846c594
Commits

Reviewing files that changed from the base of the PR and between d1c7dd4 and 5f77857.

Files selected for processing: 3

  • crates/fff-core/src/git.rs
  • crates/fff-core/src/grep/prefilter.rs
  • crates/fff-core/src/index/bigram_filter.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@dmtrKovalenko dmtrKovalenko added the code-reviewed Review completed; does not imply approval label Oct 27, 2026
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🥼 FFF core performance

✅ FFF core performance passed

Base 06d5e3f, PR 1564482

🔴 0 slower, 🟢 0 faster, ⚪ 73 within ±10%

PR time against base for every benchmark

🔬 All 73 Criterion timings
Benchmark Base PR Change
⚪ ext4/fff/fuzzy_search/fuzzy_search_repo/empty/no_current_file 7.20 µs 7.07 µs -1.72%
⚪ ext4/fff/fuzzy_search/fuzzy_search_repo/short/current_file 105.39 µs 107.03 µs +1.56%
⚪ ext4/fff/fuzzy_search/fuzzy_search_repo/path/no_current_file 513.86 µs 509.07 µs -0.93%
⚪ ext4/fff/fuzzy_search/fuzzy_search_repo/multipart/current_file 36.56 µs 36.35 µs -0.59%
⚪ ext4/fff/fuzzy_search/fuzzy_search_repo/extension/no_current_file 9.37 µs 9.52 µs +1.54%
⚪ ext4/fff/grep/grep_repo/plain_sensitive 11.50 ms 11.27 ms -1.97%
⚪ ext4/fff/grep/grep_repo/plain_insensitive 7.55 ms 7.83 ms +3.73%
⚪ ext4/fff/grep/grep_repo/plain_no_matches 10.92 ms 11.15 ms +2.14%
⚪ ext4/fff/grep/grep_repo/regex 11.52 ms 11.39 ms -1.11%
⚪ ext4/fff/grep/grep_repo/fuzzy_exact 6.21 ms 6.20 ms -0.14%
⚪ ext4/fff/grep/grep_repo/fuzzy_typo 6.27 ms 6.35 ms +1.27%
⚪ ext4/vscode/fuzzy_search/fuzzy_search_repo/empty/no_current_file 388.40 µs 387.52 µs -0.23%
⚪ ext4/vscode/fuzzy_search/fuzzy_search_repo/short/current_file 3.10 ms 3.15 ms +1.82%
⚪ ext4/vscode/fuzzy_search/fuzzy_search_repo/path/no_current_file 5.94 ms 6.03 ms +1.52%
⚪ ext4/vscode/fuzzy_search/fuzzy_search_repo/multipart/current_file 6.18 ms 6.04 ms -2.20%
⚪ ext4/vscode/fuzzy_search/fuzzy_search_repo/extension/no_current_file 124.39 µs 127.15 µs +2.22%
⚪ ext4/vscode/grep/grep_repo/plain_sensitive 8.47 ms 8.30 ms -2.02%
⚪ ext4/vscode/grep/grep_repo/plain_insensitive 8.70 ms 8.22 ms -5.48%
⚪ ext4/vscode/grep/grep_repo/plain_no_matches 105.32 ms 106.53 ms +1.15%
⚪ ext4/vscode/grep/grep_repo/regex 8.70 ms 8.38 ms -3.72%
⚪ ext4/vscode/grep/grep_repo/fuzzy_exact 8.35 ms 8.47 ms +1.50%
⚪ ext4/vscode/grep/grep_repo/fuzzy_typo 13.84 ms 13.85 ms +0.12%
⚪ btrfs/fff/fuzzy_search/fuzzy_search_repo/empty/no_current_file 7.07 µs 7.16 µs +1.22%
⚪ btrfs/fff/fuzzy_search/fuzzy_search_repo/short/current_file 105.59 µs 106.56 µs +0.92%
⚪ btrfs/fff/fuzzy_search/fuzzy_search_repo/path/no_current_file 518.03 µs 516.89 µs -0.22%
⚪ btrfs/fff/fuzzy_search/fuzzy_search_repo/multipart/current_file 36.98 µs 36.27 µs -1.94%
⚪ btrfs/fff/fuzzy_search/fuzzy_search_repo/extension/no_current_file 9.46 µs 9.46 µs +0.01%
⚪ btrfs/fff/grep/grep_repo/plain_sensitive 11.40 ms 11.65 ms +2.23%
⚪ btrfs/fff/grep/grep_repo/plain_insensitive 7.55 ms 7.77 ms +2.96%
⚪ btrfs/fff/grep/grep_repo/plain_no_matches 11.11 ms 11.13 ms +0.14%
⚪ btrfs/fff/grep/grep_repo/regex 11.19 ms 11.29 ms +0.94%
⚪ btrfs/fff/grep/grep_repo/fuzzy_exact 6.20 ms 6.13 ms -1.19%
⚪ btrfs/fff/grep/grep_repo/fuzzy_typo 6.31 ms 6.37 ms +0.90%
⚪ btrfs/vscode/fuzzy_search/fuzzy_search_repo/empty/no_current_file 395.26 µs 391.69 µs -0.90%
⚪ btrfs/vscode/fuzzy_search/fuzzy_search_repo/short/current_file 3.10 ms 3.11 ms +0.40%
⚪ btrfs/vscode/fuzzy_search/fuzzy_search_repo/path/no_current_file 5.99 ms 6.03 ms +0.67%
⚪ btrfs/vscode/fuzzy_search/fuzzy_search_repo/multipart/current_file 6.07 ms 6.00 ms -1.23%
⚪ btrfs/vscode/fuzzy_search/fuzzy_search_repo/extension/no_current_file 127.20 µs 126.79 µs -0.32%
⚪ btrfs/vscode/grep/grep_repo/plain_sensitive 18.22 ms 18.40 ms +0.97%
⚪ btrfs/vscode/grep/grep_repo/plain_insensitive 8.65 ms 8.56 ms -1.11%
⚪ btrfs/vscode/grep/grep_repo/plain_no_matches 105.20 ms 107.13 ms +1.83%
⚪ btrfs/vscode/grep/grep_repo/regex 18.20 ms 19.40 ms +6.61%
⚪ btrfs/vscode/grep/grep_repo/fuzzy_exact 11.71 ms 12.04 ms +2.79%
⚪ btrfs/vscode/grep/grep_repo/fuzzy_typo 12.01 ms 11.99 ms -0.14%
⚪ core/parse/realistic_queries/file 57 ns 56 ns -1.75%
⚪ core/parse/realistic_queries/test 56 ns 56 ns +0.00%
⚪ core/parse/realistic_queries/mod.rs 68 ns 68 ns +0.00%
⚪ core/parse/realistic_queries/src/*.rs 86 ns 84 ns -2.33%
⚪ core/parse/realistic_queries/lib_test 131 ns 132 ns +0.76%
⚪ core/parse/realistic_queries/*.rs_!test 149 ns 149 ns +0.00%
⚪ core/parse/realistic_queries/src/lib/*.rs 99 ns 97 ns -2.02%
⚪ core/parse/realistic_queries//src/_name 131 ns 132 ns +0.76%
⚪ core/parse/realistic_queries/status:modified_*.rs 174 ns 177 ns +1.72%
⚪ core/parse/realistic_queries/type:rust_test_!node_modules 286 ns 292 ns +2.10%
⚪ core/definition/definition/rust/mixed_256 7.39 µs 7.46 µs +0.97%
⚪ core/definition/definition/javascript/mixed_256 14.45 µs 14.42 µs -0.19%
⚪ core/definition/definition/python/mixed_256 5.48 µs 5.53 µs +0.86%
⚪ core/glob/glob_reuse_10k/recompile_each_time 97.64 µs 99.25 µs +1.65%
⚪ core/glob/glob_reuse_10k/reuse_compiled 96.70 µs 94.11 µs -2.67%
⚪ core/glob/glob_mixed_100k/prepass_bitmap/ext_1of10 1.23 ms 1.23 ms +0.08%
⚪ core/glob/glob_mixed_100k/inline_compiled/ext_1of10 295.85 µs 297.19 µs +0.45%
⚪ core/glob/glob_mixed_100k/prepass_bitmap/ext_4of10 1.60 ms 1.60 ms -0.06%
⚪ core/glob/glob_mixed_100k/inline_compiled/ext_4of10 844.35 µs 846.90 µs +0.30%
⚪ core/glob/glob_mixed_100k/prepass_bitmap/ext_8of10 1.90 ms 1.89 ms -0.46%
⚪ core/glob/glob_mixed_100k/inline_compiled/ext_8of10 1.42 ms 1.41 ms -0.35%
⚪ core/glob/glob_mixed_100k/prepass_bitmap/ext_all 1.97 ms 1.97 ms +0.19%
⚪ core/glob/glob_mixed_100k/inline_compiled/ext_all 1.63 ms 1.62 ms -0.42%
⚪ core/bigram/bigram_query_100000/medium_6char 540 ns 540 ns +0.00%
⚪ core/bigram/bigram_query_100000/long_14char 582 ns 583 ns +0.17%
⚪ core/bigram/bigram_query_100000/multi_word 562 ns 560 ns -0.36%
⚪ core/bigram/bigram_build/short_content/10000 9.60 ms 9.03 ms -5.95%
⚪ core/memmem/simd_string_utils_memmem/find/file_picker.rs/53KB/medium/miss 4.06 µs 4.07 µs +0.15%
⚪ core/memmem/simd_string_utils_memmem/find/file_picker.rs/53KB/long/miss 3.61 µs 3.62 µs +0.44%

🔗 Workflow run

Use the full status refresh when Git config fails to load. Break grep ranking ties by address in every sort path. Use the parking_lot mutex for bigram column allocation.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-reviewed Review completed; does not imply approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant