Skip to content

t1437: recover PR #3885 improvements with focused regression guard#4133

Merged
marcusquinn merged 3 commits intomainfrom
bugfix/pr-3885-recovery-replacement
Mar 11, 2026
Merged

t1437: recover PR #3885 improvements with focused regression guard#4133
marcusquinn merged 3 commits intomainfrom
bugfix/pr-3885-recovery-replacement

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Mar 11, 2026

Summary

Verification

  • shellcheck .agents/scripts/tests/test-pr-3885-recovery.sh
  • .agents/scripts/tests/test-pr-3885-recovery.sh

Closes #4132

Audit Trail

Summary by CodeRabbit

  • Tests
    • Added an automated test script to validate presence and content of key scripts and configuration patterns.
    • Verifies quality-check invocation, deduplication keys, remote-branch worktree checks, and required .gitignore patterns.
    • Runs a-suite checks and reports failures with a non-zero exit for CI visibility.

@marcusquinn
Copy link
Owner Author

Audit note: this PR is the focused replacement for closed-unmerged #3885 and tracks issue #4132; prior salvage context exists in #3887.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 11, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 6 minutes and 57 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: bd8d4ef7-c662-434c-bfea-01c640902106

📥 Commits

Reviewing files that changed from the base of the PR and between 88b4b78 and 240ae46.

📒 Files selected for processing (1)
  • .agents/scripts/tests/test-pr-3885-recovery.sh

Walkthrough

Adds a new Bash regression test script that verifies four recovered fixes from PR #3885: qlty dispatcher routing, jq dedup collision-safe key, multi-remote branch detection, and Hostinger gitignore patterns. The script provides helpers and assertions to fail the run on mismatches.

Changes

Cohort / File(s) Summary
Regression Test for PR #3885 Recovery
.agents/scripts/tests/test-pr-3885-recovery.sh
New Bash test harness that sets environment paths, defines helpers (pass, fail, assert_contains), and runs assertions verifying: qlty dispatcher routing and wrapper route, execute_cli_command usage without positional org arg, jq dedup key pattern, multi-remote remote-branch presence check, and Hostinger .gitignore patterns. Reviewers should inspect pattern matching and assertion robustness.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

needs-review

Poem

🔍 A tiny script stands guard in shell,
Checking routes, dedup keys, and patterns as well.
Branches afar and gitignore signs,
Tests hum softly—no regressions this time. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a regression test to recover and lock in improvements from PR #3885, with 'focused regression guard' clearly indicating the test-centric nature.
Linked Issues check ✅ Passed The PR fully meets all acceptance criteria from #4132: the test script verifies all four recovered improvements (qlty dispatcher routing, jq dedup collision fix, multi-remote branch detection, hostinger gitignore patterns), contains audit comments linking prior context, and closes the linked issue.
Out of Scope Changes check ✅ Passed The sole change is the focused regression test script with no unrelated modifications; all assertions directly align with the four scoped improvements from PR #3885 documented in #4132.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/pr-3885-recovery-replacement

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 and usage tips.

@github-actions
Copy link
Contributor

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 397 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Wed Mar 11 08:55:23 UTC 2026: Code review monitoring started
Wed Mar 11 08:55:24 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 397

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 397
  • VULNERABILITIES: 0

Generated on: Wed Mar 11 08:55:26 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

coderabbitai[bot]
coderabbitai bot previously requested changes Mar 11, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.agents/scripts/tests/test-pr-3885-recovery.sh:
- Around line 51-53: The three checks using assert_contains against
$GITIGNORE_FILE are false-positives because assert_contains uses rg -Fq
substring matching; change the standalone 'hostinger' assertion to a line-exact
match so it doesn't match 'hostinger.*' or 'hostinger_*'. Either call rg -Fxq
(or grep -xF) directly for the 'hostinger' check, or add/use an exact-match
helper (e.g., assert_contains_exact) and replace the assert_contains
"$GITIGNORE_FILE" 'hostinger' call with that exact-match invocation while
leaving the 'hostinger.*' and 'hostinger_*' asserts unchanged.
- Around line 31-42: assert_contains currently returns non-zero when the pattern
is missing which causes set -e to abort the whole harness; change
assert_contains so that on a miss it calls fail (the existing fail function) and
then returns 0 so the script continues to run all checks (modify the miss branch
in assert_contains where it calls fail "$message" to ensure it returns 0
afterwards). Also tighten the loose "hostinger" assertion by anchoring the
pattern (e.g., require an exact line match or use ripgrep -x / a regex like
^hostinger$) instead of a substring match so entries like hostinger.* or
hostinger_foo don't satisfy the check.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0e0cf5c4-9bf7-4f1f-9681-9fd88cc107d8

📥 Commits

Reviewing files that changed from the base of the PR and between 4dbac3a and dacf08b.

📒 Files selected for processing (1)
  • .agents/scripts/tests/test-pr-3885-recovery.sh

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request aims to reintroduce and safeguard key improvements from a previously unmerged pull request (#3885). It achieves this by adding a dedicated, deterministic regression test script that specifically validates four critical areas: qlty command routing, jq deduplication logic, multi-remote branch detection, and hostinger patterns in .gitignore. The approach prioritizes a focused scope to ensure stability and ease of review.

Highlights

Changelog
  • .agents/scripts/tests/test-pr-3885-recovery.sh
    • Added a new shell script (test-pr-3885-recovery.sh) to implement a regression test for specific code improvements.
Activity
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new test script. While the script is well-structured, I've identified a logic issue in the assert_contains function related to set -e that could cause premature termination. My feedback clarifies how to ensure all tests run and failures are properly reported, aligning with best practices for exit code propagation rather than masking errors.

fi

fail "$message"
return 1

Choose a reason for hiding this comment

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

high

The current setup with set -e causes the script to exit on the first failed assertion, preventing a full test run. While the intent to run all checks is clear, suggesting return 0 for a failed assertion in assert_contains would mask the actual failure, which contradicts the rule: 'In shell scripts, functions that wrap a command should propagate its exit code to the caller. Avoid masking potential errors with a hardcoded return 0.' Instead, assert_contains should still return a non-zero exit code on failure. To allow the script to continue, consider wrapping calls to assert_contains with || true or temporarily disabling set -e around the test execution (set +e ... set -e). The script can then collect failures and exit with a non-zero status at the very end if any tests failed.

References
  1. In shell scripts, functions that wrap a command should propagate its exit code to the caller. Avoid masking potential errors with a hardcoded return 0. Instead, use return $? or capture the exit code and return it (e.g., local rc=$?; return $rc).

@marcusquinn
Copy link
Owner Author

Dispatching worker to address requested review changes and unblock merge.\n- Model: alternating default via headless runtime helper\n- Branch: bugfix/pr-3885-recovery-replacement\n- Scope: resolve CHANGES_REQUESTED feedback and push fixes\n- Attempt: 1 of 1\n- Direction: prioritize reviewer-blocking items first

@marcusquinn
Copy link
Owner Author

marcusquinn commented Mar 11, 2026

Addressed the review feedback on the regression harness:

  • keep assertion helpers returning non-zero on misses, but run the full sweep under set +e / set -e so failures accumulate instead of aborting early
  • make the hostinger checks line-exact with assert_line_exists

Verification:

  • shellcheck .agents/scripts/tests/test-pr-3885-recovery.sh
  • .agents/scripts/tests/test-pr-3885-recovery.sh

@github-actions
Copy link
Contributor

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 398 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Wed Mar 11 09:32:00 UTC 2026: Code review monitoring started
Wed Mar 11 09:32:01 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 398

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 398
  • VULNERABILITIES: 0

Generated on: Wed Mar 11 09:32:04 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@github-actions
Copy link
Contributor

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 398 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Wed Mar 11 09:51:45 UTC 2026: Code review monitoring started
Wed Mar 11 09:51:45 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 398

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 398
  • VULNERABILITIES: 0

Generated on: Wed Mar 11 09:51:48 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

@marcusquinn
Copy link
Owner Author

Addressed the remaining CHANGES_REQUESTED item: assert misses now stay non-fatal in the harness path while preserving failure accounting via TESTS_FAILED. Confirmed exact hostinger line checks remain in place.\n\nVerification run:\n- shellcheck .agents/scripts/tests/test-pr-3885-recovery.sh\n- .agents/scripts/tests/test-pr-3885-recovery.sh

@marcusquinn
Copy link
Owner Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 11, 2026

✅ Actions performed

Review triggered.

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.

@marcusquinn
Copy link
Owner Author

Supervisor dispatched a worker to address CHANGES_REQUESTED feedback tied to issue #4132.

@marcusquinn
Copy link
Owner Author

Re-verified the CHANGES_REQUESTED items on branch bugfix/pr-3885-recovery-replacement and current head:

  • assertion harness keeps full-sweep behavior (set +e around checks) while preserving failure accounting via TESTS_FAILED
  • hostinger checks are line-exact via assert_line_exists (rg -Fxq)

Fresh verification in this run:

  • shellcheck .agents/scripts/tests/test-pr-3885-recovery.sh
  • .agents/scripts/tests/test-pr-3885-recovery.sh

All checks pass locally and PR checks are currently green. Keeping scope minimal with no additional behavior changes.

@marcusquinn marcusquinn dismissed coderabbitai[bot]’s stale review March 11, 2026 10:58

Dismissing stale bot review: requested items were addressed in follow-up commits and re-verified with passing checks.

@marcusquinn marcusquinn merged commit a0f8f17 into main Mar 11, 2026
12 checks passed
@marcusquinn marcusquinn deleted the bugfix/pr-3885-recovery-replacement branch March 11, 2026 11:17
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.

t1437: Recover PR #3885 improvements with focused traceable replacement

1 participant