Skip to content

fix(test): ci_covers_monoio must read the workflow through a CRLF-normalizing reader - #468

Merged
TinDang97 merged 2 commits into
mainfrom
fix/ci-covers-monoio-crlf
Aug 10, 2026
Merged

fix(test): ci_covers_monoio must read the workflow through a CRLF-normalizing reader#468
TinDang97 merged 2 commits into
mainfrom
fix/ci-covers-monoio-crlf

Conversation

@TinDang97

Copy link
Copy Markdown
Collaborator

Fixes the Windows failure on main at 32f09bfe.

All 5 tests in tests/ci_covers_monoio.rs failed on the Windows job of the first main
push after #464. Not a Windows runtime problem — the suite is a repo-config test that
parses .github/workflows/ci.yml with the needle "\n <job>:\n". A Windows checkout
(core.autocrlf=true) ends every line \r\n, so the needle never matches, job_block
returns None, and each caller's .expect() panics. Same for workflow_env_block.

Mechanism confirmed against the real file rather than assumed:

needle found
LF content True
CRLF content False ← the panic
CRLF after normalize True

workflow() now normalizes through normalize_newlines, and a new test —
the_parsers_survive_a_windows_crlf_checkout — feeds a synthetic CRLF fixture through
both parsers. It runs on every platform, which is the point: Windows is skipped on
all PRs ([[gotcha_pr_ci_platform_blind_spots]]), so this class is invisible until a main
push. Verified non-vacuous by neutering the normalizer — that reddens exactly this test
with its own message — then restoring it (6/6 green).

Because Windows does not run on PRs, this branch was also validated via
workflow_dispatch rather than merged on PR-green alone.

Unrelated failure in the same main run

The Crash Matrix failure alongside this one is not from #464: it lives in
integration-tests.yml, which #464 never touched and which sets its own workflow-level
MOON_NO_URING. It failed with moon did not start within 8s on port 46668 — the known
hosted-runner startup-timeout flake. Reported, not bundled into this fix.

…malizing reader

All 5 tests in `tests/ci_covers_monoio.rs` failed on the Windows job of the
first main push after #464. Not a Windows runtime problem — the suite is a
repo-config test that parses `.github/workflows/ci.yml` with the needle
`"\n  <job>:\n"`. A Windows checkout (`core.autocrlf=true`) ends every line
`\r\n`, so the needle never matches, `job_block` returns `None`, and each
caller's `.expect()` panics. Same for `workflow_env_block`.

Mechanism confirmed against the real file rather than assumed:

  LF   content, needle found: True
  CRLF content, needle found: False   <- the panic
  CRLF after normalize     : True

`workflow()` now normalizes through `normalize_newlines`, and a new test —
`the_parsers_survive_a_windows_crlf_checkout` — feeds a synthetic CRLF fixture
through both parsers. It runs on every platform, which matters: Windows is
skipped on all PRs, so this class is invisible until a main push. Verified
non-vacuous by neutering the normalizer, which reddens exactly that test with
its own message, then restoring it (6/6 green).

Note for whoever reads the same main run: the Crash Matrix failure alongside
this one is unrelated — it lives in `integration-tests.yml`, which #464 never
touched and which sets its own workflow-level MOON_NO_URING. That failure is
the known 8s-startup timeout on a hosted runner.

author: Tin Dang
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@TinDang97, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 22 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: badb1d6b-7094-4048-8da7-8dc05face5da

📥 Commits

Reviewing files that changed from the base of the PR and between 32f09bf and 4501888.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • tests/ci_covers_monoio.rs

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

Comment @coderabbitai help to get the list of available commands.

… for

`the_parsers_survive_a_windows_crlf_checkout` built its fixture as
`read_to_string(..).replace('\n', "\r\n")`. On a Windows checkout the bytes on
disk are ALREADY CRLF, so that yields `\r\r\n` — a fixture no correct
normalizer can rescue — and the test failed on its own first Windows run while
correctly clearing the five failures it was written to fix.

Assuming the file is LF is precisely the bug under test. Normalize first, then
synthesize CRLF, and assert the fixture is well-formed (`\r\n` present, `\r\r`
absent) so a malformed fixture reddens loudly instead of passing vacuously.

Simulated both checkout styles against the real file:

  LF checkout    fixture_ok=True parse_ok=True   (previous version: True)
  CRLF checkout  fixture_ok=True parse_ok=True   (previous version: False)

author: Tin Dang
@TinDang97
TinDang97 merged commit 8b1153b into main Aug 10, 2026
19 checks passed
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