Skip to content

Make the jq Carriage-Return Test Fail When Its Stub Is Not Reached - #2524

Merged
ptr727 merged 1 commit into
developfrom
fix/jq-cr-test-fixture
Oct 8, 2026
Merged

ptr727 merged 1 commit into
developfrom
fix/jq-cr-test-fixture

Conversation

@ptr727

@ptr727 ptr727 commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Summary

ArchivedRepositoryCase.test_a_trailing_carriage_return_from_jq_is_stripped stubbed jq to print archived followed by a carriage return, while its registry fixture also said archived. Any real jq on PATH gave the same verdict, so the test passed whether or not the stub ran. The fixture now says cataloged, so only the stub can stop the script at the archived exemption.

Part of the Windows lane. The promotion pull request closes #2513.

Verification

  • With the change, the module passes on the Windows host from Git Bash and, run by the local review pass, under Linux with a real jq.
  • With the stub's PATH line removed, the test fails on both, since a real jq now answers cataloged and the script falls through to REACHED_NEXT.
  • With 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

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>
Copilot AI lite review requested due to automatic review settings October 8, 2026 04:04
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 288a4af6-ee1b-4d39-8848-a474546c69ca
📥 Commits

Reviewing files that changed from the base of the PR and between d342d17 and 865d57f.

📒 Files selected for processing (1)
  • tests/test_configure_archived.py
  • Autopilot · 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

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 archived to cataloged.
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

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@d342d17). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #2524   +/-   ##
==========================================
  Coverage           ?   58.43%           
==========================================
  Files              ?       16           
  Lines              ?     8084           
  Branches           ?        0           
==========================================
  Hits               ?     4724           
  Misses             ?     3360           
  Partials           ?        0           
Flag Coverage Δ
python-3.13 58.43% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727

ptr727 commented Oct 8, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ptr727
ptr727 merged commit d4671bb into develop Oct 8, 2026
13 checks passed
@ptr727
ptr727 deleted the fix/jq-cr-test-fixture branch October 8, 2026 04:10
ptr727 added a commit that referenced this pull request Oct 8, 2026
## 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)
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.

2 participants