Skip to content

Flaky test: the word index's progress may not have its total yet - #1268

Merged
benandez merged 2 commits into
mainfrom
fix/flaky-words-index
Nov 13, 2026
Merged

benandez merged 2 commits into
mainfrom
fix/flaky-words-index

Conversation

@benandez

@benandez benandez commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

macOS CI failed at random (#1110, #1155) on the_index_is_built_in_the_background_and_says_how_far_it_has_got: straight after the list is first shown, the background thread may not have counted the messages yet, so the progress reads Building { done: 0, total: 0 }. The check there now takes any progress; the total is still checked once the index is complete.

Human-reviewed, AI-assisted, nobody's mailbox harmed.

Summary by CodeRabbit

  • Tests
    • Updated a background indexing test to allow for indexing to still be in progress when the first row is displayed.

… slow machine

Human-reviewed, AI-assisted, nobody's mailbox harmed.
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

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

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 57b8258 and adbe368.

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 background index test now accepts any total while the build is in progress, or a completed index.

Changes: Background index test

Layer / File(s) Summary
Background index build assertion
crates/engine/src/words_tests.rs
The test no longer requires an in-progress build to report a total of 3,000. It accepts any total while the build is in progress or a completed index.

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other

Merge Risk: Minimal · previous review 57b82

This only changes a flaky test and does not affect production behavior. It is safe to merge.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Description check Inconclusive The description states the problem (macOS CI flakiness, issues #1110 and #1155), the test name, the cause (the background thread may not have counted messages yet, giving Building { done: 0, total: 0 … Add 'Closes #1110' (or the relevant issue number) at the top of the description. Fill in 'What changes for the person using MailCraft', noting that no user-facing behaviour changes if that is the case. Complete 'How it was checked' by stati…
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title names the flaky test and the cause: the word index's progress may not have its total yet. It matches the single change in words_tests.rs, which relaxes the progress check right after the fir…
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 names the flaky test and the cause: the word index's progress may not have its total yet. It matches the single change in words_tests.rs, which relaxes the progress check right after the first row display. The title is specific and describes the main change.

Full details: Description check

Explanation

The description states the problem (macOS CI flakiness, issues #1110 and #1155), the test name, the cause (the background thread may not have counted messages yet, giving Building { done: 0, total: 0 }), and the fix (any progress is accepted early; total is checked once complete). It also says the change is human-reviewed and AI-assisted. It does not fill in the template's 'Closes #' issue link, the 'What changes for the person using MailCraft' section, or the 'How it was checked' checklist (including cargo xtask ci status and maintainer edit permission and CLA signature). Since the change is a test-only fix with no user-facing impact, the missing user-facing section is minor, but the checklist and the issue reference are still absent.

Resolution

Add 'Closes #1110' (or the relevant issue number) at the top of the description. Fill in 'What changes for the person using MailCraft', noting that no user-facing behaviour changes if that is the case. Complete 'How it was checked' by stating that cargo xtask ci passes and by ticking the checklist items that apply, including the maintainer-edits box and the CLA acknowledgement.

Finishing Touches

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

Commits

Reviewing files that changed from the base of the PR and between b5cbc3c and 57b8258.

Files selected for processing: 1

  • crates/engine/src/words_tests.rs

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

@sonarqubecloud

Copy link
Copy Markdown

@benandez
benandez merged commit 7913352 into main Nov 13, 2026
45 checks passed
@benandez
benandez deleted the fix/flaky-words-index branch November 13, 2026 09:44
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.

1 participant