Repository navigation
Make the jq Carriage-Return Test Fail When Its Stub Is Not Reached - #2524
Conversation
The test's registry fixture said archived, so any real jq on PATH gave the same verdict as the stub, and the test passed whether or not the stub ran. The fixture now says cataloged, so only the stub's archived followed by a carriage return can stop the script there, which a run with the stub's PATH line removed confirms by failing. Closes #2513. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 46 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (1)
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 |
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved issues were identified.
0 open findings
What changed in this PR
Strengthens the archived-repository regression test by ensuring it depends on the stubbed jq output.
Changes:
- Changes the registry fixture status from
archivedtocataloged.
| File | Description |
|---|---|
tests/test_configure_archived.py |
Makes the carriage-return test depend on the jq stub. |
🧠 Review effort: Lite
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2524 +/- ##
==========================================
Coverage ? 58.43%
==========================================
Files ? 16
Lines ? 8084
Branches ? 0
==========================================
Hits ? 4724
Misses ? 3360
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
|
## Summary Promotes three changes from `develop`, which together make `python3 -m unittest discover -s tests` pass on a Windows host from Git Bash. - #2521: two Windows defects in `scripts/local_review.py`, and the tests that exercise them. - A write to a closed pipe raises `OSError` with `EINVAL` on Windows rather than `BrokenPipeError`, so `status | head -0` exited 120 outside the 0/1/2 contract. `closed_reader` now recognizes both forms. - `worktree_states` left its throwaway object directory behind on Windows, holding the staged content of every untracked file, because `rmtree(ignore_errors=True)` could not unlink git's read-only loose objects. An `onexc` handler now clears the read-only bit and retries. - #2523: `spec/validate.py` writes its output as UTF-8 on every host, and a cp1252 regression case pins that on Linux CI too. Four Windows-shaped test assertions take the host's path, quoting, and flag forms. `test_release_guards` runs its guard script from a file, since Git Bash's parse of a Windows command line halves each doubled backslash inside a quoted `-c` argument, and `host_capability.bash_path` records that. - #2524: the jq carriage-return test's fixture now says `cataloged`, so the test fails when its stub is not reached. Closes #2488. Closes #2513. ## Verification - On the Windows host from Git Bash, `python3 -m unittest discover -s tests` at `develop`'s head ran 2245 tests and reported `OK`, where the round started from 15 failures and 10 errors. - Each change took a recorded local strict-review pass and a Copilot round on its first head. #2523's fix push is covered by an attested local pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
ArchivedRepositoryCase.test_a_trailing_carriage_return_from_jq_is_strippedstubbedjqto printarchivedfollowed by a carriage return, while its registry fixture also saidarchived. Any realjqon PATH gave the same verdict, so the test passed whether or not the stub ran. The fixture now sayscataloged, so only the stub can stop the script at the archived exemption.Part of the Windows lane. The promotion pull request closes #2513.
Verification
jq.PATHline removed, the test fails on both, since a realjqnow answerscatalogedand the script falls through toREACHED_NEXT.configure.sh's carriage-return strip removed, the test fails under Linux, which is what CI runs. Under Git Bash the strip makes no difference to the outcome, since Git Bash's command substitution already drops a trailing carriage return before the newline, so a Windows run cannot speak for the strip either way.🤖 Generated with Claude Code