fix(test): ci_covers_monoio must read the workflow through a CRLF-normalizing reader - #468
Conversation
…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 reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
|
Warning Review limit reached
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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
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 |
… 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
Fixes the Windows failure on main at
32f09bfe.All 5 tests in
tests/ci_covers_monoio.rsfailed on the Windows job of the first mainpush after #464. Not a Windows runtime problem — the suite is a repo-config test that
parses
.github/workflows/ci.ymlwith the needle"\n <job>:\n". A Windows checkout(
core.autocrlf=true) ends every line\r\n, so the needle never matches,job_blockreturns
None, and each caller's.expect()panics. Same forworkflow_env_block.Mechanism confirmed against the real file rather than assumed:
workflow()now normalizes throughnormalize_newlines, and a new test —the_parsers_survive_a_windows_crlf_checkout— feeds a synthetic CRLF fixture throughboth 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_dispatchrather 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-levelMOON_NO_URING. It failed withmoon did not start within 8s on port 46668— the knownhosted-runner startup-timeout flake. Reported, not bundled into this fix.