Skip to content

feat: implement issue #927 — auto-rebase: default eligibility to all; remove dead review-ready code; lock merge-method invariant - #931

Merged
don-petry merged 2 commits into
mainfrom
dev-lead/issue-927-20260803-0059
Aug 3, 2026
Merged

feat: implement issue #927 — auto-rebase: default eligibility to all; remove dead review-ready code; lock merge-method invariant#931
don-petry merged 2 commits into
mainfrom
dev-lead/issue-927-20260803-0059

Conversation

@don-petry

@don-petry don-petry commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

User description

Closes #927

Implemented by dev-lead agent. Please review.


CodeAnt-AI Description

Auto-update every behind pull request while preserving commits and approvals

What Changed

  • Auto-rebase now updates every behind same-repository pull request by default, including drafts, instead of requiring an approval or ready label.
  • Removed the review and label checks, along with the related ready-label configuration and stuck-conflict notices.
  • Branch updates always use merge mode, avoiding rewritten commits and invalidated approvals.
  • Invalid eligibility modes, including the removed review-ready mode, now fail clearly.

Impact

✅ Fewer pull requests left behind after merges
✅ Preserved commit history and approvals during branch updates
✅ Clearer configuration errors

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • New Features

    • Auto-rebase now updates all behind pull requests by default, including drafts.
    • Added support for the simplified all eligibility mode.
  • Bug Fixes

    • Unknown or unsupported eligibility modes now fail clearly instead of being processed.
  • Tests

    • Added coverage confirming merge-based branch updates and the updated eligibility behavior.
  • Documentation

    • Updated auto-rebase guidance to reflect the new default and simplified configuration.

… remove dead review-ready code; lock merge-method invariant
@don-petry
don-petry requested a review from a team as a code owner August 3, 2026 01:08
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@codeant-ai

codeant-ai Bot commented Aug 3, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 0e635d2 Aug 03, 2026 · 01:08 01:10

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 51 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e5ce0b1f-b527-4f64-9fba-39ac4d331694

📥 Commits

Reviewing files that changed from the base of the PR and between 0e635d2 and 8f70e32.

📒 Files selected for processing (5)
  • .github/scripts/auto-rebase/lib/eligibility.sh
  • .github/workflows/auto-rebase-reusable.yml
  • docs/initiatives/pull-request-limits-adr.md
  • test/workflows/auto-rebase/eligibility.bats
  • test/workflows/auto-rebase/merge-method.bats
📝 Walkthrough

Walkthrough

The auto-rebase workflow now defaults to all eligibility, including drafts. Review approval and ready-label checks were removed. Unknown modes remain errors, and tests verify the required merge method.

Changes

Auto-rebase eligibility

Layer / File(s) Summary
All-only eligibility contract
.github/scripts/auto-rebase/lib/eligibility.sh, .github/scripts/auto-rebase/README.md, test/workflows/auto-rebase/eligibility.bats
The predicate now accepts only MODE and supports all. Approval and label helpers, review-ready, and related tests were removed.
Reusable workflow integration
.github/workflows/auto-rebase-reusable.yml, standards/ci-standards.md, standards/workflows/auto-rebase.yml
The workflow defaults to all, removes ready_label and review-state checks, and documents updates for every behind PR.
Merge-method regression coverage
test/workflows/auto-rebase/merge-method.bats
Tests verify that update-branch uses update_method=merge and not rebase.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related issues

  • petry-projects/.github#926 — Covers the same default eligibility, removal of review-ready gating, and merge-method regression requirements.
  • petry-projects/.github#928 — Covers all-mode eligibility for additional PR states and removal of stuck-PR escalation logic.

Possibly related PRs

Suggested labels: needs-human-review

🚥 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 clearly summarizes the default change, removal of obsolete eligibility logic, and merge-method invariant.
Linked Issues check ✅ Passed The changes satisfy issue #927 by defaulting eligibility to all, removing review-ready plumbing, and testing the merge method invariant.
Out of Scope Changes check ✅ Passed All workflow, library, documentation, and test changes directly support the objectives in issue #927.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-lead/issue-927-20260803-0059

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.

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Aug 3, 2026
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Auto-rebase: default eligibility to all; remove review-ready plumbing; add merge invariant test

✨ Enhancement ⚙️ Configuration changes 🧪 Tests 📝 Documentation 🕐 40+ Minutes

Grey Divider

AI Description

• Default auto-rebase eligibility to all (update every behind PR, including drafts).
• Remove review-ready/ready-label/approval gating and related dead workflow plumbing.
• Add regression tests to lock update_method=merge and reject rebase.
Diagram

graph TD
A["Repo caller workflow"] --> B["auto-rebase-reusable.yml"] --> C["eligibility.sh"] --> D["Eligible? (mode)"]
B --> E["GitHub API via gh"] --> F["update-branch (merge)"]
T["Bats tests"] --> C
T --> B
Docs["Docs/Standards"] --> B
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Keep `review-ready` mode but change default to `all`
  • ➕ Preserves the prior fan-out reduction option for large repos/org-wide scale
  • ➕ Avoids breaking callers that may still pass review-ready
  • ➖ Retains complexity and extra GitHub API calls for approvals/labels
  • ➖ Conflicts with the PR goal of removing dead/unused code paths
2. Replace eligibility modes with a rate/limit-based gate (e.g., update top N behind PRs)
  • ➕ Controls CI fan-out without needing review-state plumbing
  • ➕ Can prioritize PRs without approvals/labels coupling
  • ➖ More complex logic and fairness decisions (ordering, ties, starvation)
  • ➖ Harder to explain and test than a simple mode switch
3. Retain the removed “skipped but conflicting” escalation logic as a standalone guard
  • ➕ Provides visibility for PRs that will never progress under restricted modes
  • ➕ Keeps a safety net if future non-all modes are reintroduced
  • ➖ Adds comment-management complexity and more API calls
  • ➖ Less relevant when default mode updates everything

Recommendation: Given issue #927’s intent, the PR’s approach is the right simplification: make all the default, remove the review/label plumbing, and keep a mode-dispatch hook for future eligibility strategies. The main tradeoff is potentially higher CI fan-out; if that becomes a concern again, reintroducing a constrained mode (or a limit-based strategy) can be done later without changing the reusable workflow’s call site.

Files changed (7) +85 / -268

Enhancement (1) +13 / -49
eligibility.shSimplify eligibility predicate to 'all' mode only +13/-49

Simplify eligibility predicate to 'all' mode only

• Removes the approval and ready-label helper predicates and collapses eligibility to a single 'auto_rebase_pr_eligible MODE' dispatcher supporting only 'all'. Unknown/empty modes now consistently return exit code 2.

.github/scripts/auto-rebase/lib/eligibility.sh

Tests (2) +45 / -119
eligibility.batsRewrite bats coverage for 'all' mode and removed functions +20/-119

Rewrite bats coverage for 'all' mode and removed functions

• Deletes tests for approval/label predicates and the 'review-ready' mode. Adds tests asserting only 'all' is accepted and that removed helper functions are no longer defined.

test/workflows/auto-rebase/eligibility.bats

merge-method.batsAdd regression test enforcing merge-only update-branch +25/-0

Add regression test enforcing merge-only update-branch

• Introduces a bats test suite that asserts the reusable workflow uses 'update_method=merge' and never uses the rebase method, protecting the no-SHA-rewrite invariant.

test/workflows/auto-rebase/merge-method.bats

Documentation (3) +15 / -32
README.mdDocument eligibility as 'all'-only and remove approval/label semantics +3/-14

Document eligibility as 'all'-only and remove approval/label semantics

• Updates the auto-rebase tooling README to describe a single eligibility predicate and removes documentation for approval/label-based gating. Reframes 'all' as the default mode and drops the prior 'review-ready' explanation.

.github/scripts/auto-rebase/README.md

ci-standards.mdUpdate CI standards to reflect 'all' default eligibility +8/-12

Update CI standards to reflect 'all' default eligibility

• Updates the auto-rebase standards section to describe eligibility as an 'all'-default input and removes the approval/label semantics. Keeps the guidance about merge-only update-branch behavior and points to the predicate implementation.

standards/ci-standards.md

auto-rebase.ymlRevise template comments to 'eligibility: all' default +4/-6

Revise template comments to 'eligibility: all' default

• Updates the copy/paste workflow template commentary to reflect that the reusable now defaults to updating every behind PR. Removes mention of the ready-label opt-in path and the prior review-ready default.

standards/workflows/auto-rebase.yml

Other (1) +12 / -68
auto-rebase-reusable.ymlDefault eligibility to 'all' and remove review-ready plumbing +12/-68

Default eligibility to 'all' and remove review-ready plumbing

• Changes the reusable workflow input default to 'all' and deletes the 'ready_label' input. Removes PR metadata/review/label API calls and the prior review-ready/conflicting escalation path, leaving a simpler eligibility check before update-branch.

.github/workflows/auto-rebase-reusable.yml

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request simplifies the auto-rebase workflow by removing the review-ready eligibility mode and its associated helper functions, making all the default mode that updates every behind PR. It also updates documentation and tests accordingly, and introduces a new regression guard test to ensure the workflow always uses the merge update method. Feedback on the new test points out that asserting a non-zero exit status to verify the absence of a pattern is fragile and could lead to false positives; asserting an exit status of exactly 1 is recommended instead.

Comment thread test/workflows/auto-rebase/merge-method.bats
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #931
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-08-03T01:40:36Z

@don-petry

Copy link
Copy Markdown
Contributor Author

Note

@don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically.
Next attempt after: 2026-08-03T01:40:36Z

@don-petry
don-petry enabled auto-merge (squash) August 3, 2026 01:10
@qodo-code-review

qodo-code-review Bot commented Aug 3, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 87 rules

Grey Divider


Remediation recommended

1. Breaking reusable workflow contract ✓ Resolved 🐞 Bug ☼ Reliability
Description
The reusable workflow removes the ready_label workflow_call input and the eligibility predicate
now rejects the previously-supported review-ready mode; any existing caller still passing
ready_label and/or eligibility: review-ready will fail (dispatch validation or exit on unknown
mode), disabling auto-rebase for that repo.
Code

.github/workflows/auto-rebase-reusable.yml[L60-63]

-      ready_label:
-        description: 'Label that opts a non-draft PR into auto-rebase even without an approval.'
-        required: false
-        default: 'auto-rebase:ready'
+        default: 'all'
Relevance

●●● Strong

Team treats reusable workflow contracts as reliability-critical; prior fixes avoided
setup/validation breakages (PR #615) and established inputs in PR #468.

PR-#615
PR-#468

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The reusable workflow’s declared inputs no longer include ready_label, so callers providing it
will be rejected. Separately, the eligibility predicate now only accepts all and treats
review-ready as an unknown mode (exit 2), which the workflow treats as a hard error; the tests
explicitly lock in that rejection.

.github/workflows/auto-rebase-reusable.yml[43-54]
.github/scripts/auto-rebase/lib/eligibility.sh[20-30]
test/workflows/auto-rebase/eligibility.bats[22-35]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
This PR removes the `ready_label` input from the reusable workflow’s `workflow_call` interface and removes support for the `review-ready` eligibility mode. Any repo still calling the reusable workflow with `ready_label` (or `eligibility: review-ready`) will break.

### Issue Context
- `workflow_call` inputs are validated by GitHub Actions; unknown inputs cause the calling workflow to fail.
- The new predicate only accepts `all` and returns exit code `2` for any other mode, and the reusable workflow exits on that.

### Fix Focus Areas
- Re-introduce `ready_label` as a deprecated/ignored input (so old callers don’t fail), or bump to a new channel/major version and ensure all callers migrate.
- Consider accepting `review-ready` as an alias for `all` (optionally logging a deprecation warning), again to avoid hard breaks.

- .github/workflows/auto-rebase-reusable.yml[43-67]
- .github/scripts/auto-rebase/lib/eligibility.sh[10-30]
- test/workflows/auto-rebase/eligibility.bats[15-35]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Informational

2. Stale eligibility default doc ✓ Resolved 🐞 Bug ⚙ Maintainability
Description
An internal ADR still claims auto-rebase eligibility is already review-ready, but this PR changes
the default eligibility to all, which can mislead future operational decisions about CI load
control.
Code

.github/workflows/auto-rebase-reusable.yml[R49-50]

+            all (default) — every behind PR, including drafts.
          New modes can be added to lib/eligibility.sh and selected here without
Relevance

●●● Strong

Team historically fixes stale/misleading docs/ADRs when behavior changes (e.g., ADR sync accepted in
PR #624).

PR-#624
PR-#379
PR-#11

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The ADR explicitly says the eligibility lever is already review-ready, but the reusable workflow
now documents all (default) under workflow_call inputs.

docs/initiatives/pull-request-limits-adr.md[80-87]
.github/workflows/auto-rebase-reusable.yml[46-54]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`docs/initiatives/pull-request-limits-adr.md` still states the auto-rebase lever (`eligibility`) is “already `review-ready`”, but the reusable workflow now defaults to `all`.

### Issue Context
This ADR is used to reason about CI-load amplification levers; leaving the old default/mode documented will cause confusion and incorrect conclusions.

### Fix Focus Areas
- Update the ADR statement to reflect `eligibility: all` as the default.
- Optionally note that `review-ready` mode/`ready_label` plumbing has been removed (or deprecated), to prevent readers from looking for it.

- docs/initiatives/pull-request-limits-adr.md[80-87]
- .github/workflows/auto-rebase-reusable.yml[46-54]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

Comment thread .github/workflows/auto-rebase-reusable.yml
Comment thread .github/workflows/auto-rebase-reusable.yml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/workflows/auto-rebase-reusable.yml (2)

111-112: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Fold base.ref into the initial PR listing instead of a per-PR API call.

The initial gh api "repos/$REPO/pulls?state=open&per_page=100" call already returns each pull request's base.ref. Line 120 adds a second gh api call per PR solely to re-fetch that value. This adds an unnecessary API call per PR on a hot path (every push to main), and it re-introduces the set -e fragility this file otherwise guards against: if the per-PR fetch transiently fails, BASE_BRANCH=$(...) fails the step under the default bash -e shell, aborting the whole run and leaving remaining PRs in $PRS unprocessed — the exact starvation scenario the file's issue #594 comment (lines 216-218) says must be avoided.

Extract base.ref in the initial listing and drop the per-PR fetch.

🛠️ Proposed fix
           PRS=$(gh api "repos/$REPO/pulls?state=open&per_page=100" \
-            --jq '.[] | select(.user.login != "dependabot[bot]") | select(.head.repo != null) | select(.head.repo.full_name == .base.repo.full_name) | "\(.number) \(.head.ref)"')
+            --jq '.[] | select(.user.login != "dependabot[bot]") | select(.head.repo != null) | select(.head.repo.full_name == .base.repo.full_name) | "\(.number) \(.head.ref) \(.base.ref)"')

           if [[ -z "$PRS" ]]; then
             echo "No open non-Dependabot same-repo PRs"
             exit 0
           fi

-          while IFS=' ' read -r PR_NUMBER HEAD_REF; do
-            BASE_BRANCH=$(gh api "repos/$REPO/pulls/$PR_NUMBER" --jq '.base.ref')
-
+          while IFS=' ' read -r PR_NUMBER HEAD_REF BASE_BRANCH; do

Also applies to: 119-121

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/auto-rebase-reusable.yml around lines 111 - 112, Update
the initial PR listing assigned to PRS to extract both the PR number, head ref,
and base.ref, then pass the base branch through the per-PR loop. Remove the
per-PR gh api call and derive BASE_BRANCH from the listing data while preserving
processing of remaining PRs when individual operations fail.

114-117: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Validate the eligibility mode before the "no PRs" early exit.

auto_rebase_pr_eligible now depends only on $ELIGIBILITY, not on any per-PR data. As written, the unknown-mode check at lines 126-129 only runs once the while loop processes at least one PR. If $PRS is empty, the script exits 0 at line 116 before ever calling auto_rebase_pr_eligible, so an invalid eligibility input silently produces no error on runs with no open PRs — for example when testing via workflow_dispatch. Validate the mode once, before the -z "$PRS" check, so an unknown mode always surfaces as ::error::, regardless of whether any PRs are open.

🛠️ Proposed fix
           if [[ -z "$PRS" ]]; then
+            auto_rebase_pr_eligible "$ELIGIBILITY" > /dev/null || {
+              [[ $? -eq 2 ]] && { echo "::error::Unknown eligibility mode '$ELIGIBILITY'"; exit 1; }
+            }
             echo "No open non-Dependabot same-repo PRs"
             exit 0
           fi

Also applies to: 122-133

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/auto-rebase-reusable.yml around lines 114 - 117, Validate
the eligibility mode before the no-PR early exit in the workflow, using the
existing auto_rebase_pr_eligible logic or its mode validation to ensure unknown
$ELIGIBILITY values emit ::error::. Keep the empty-$PRS success path unchanged
for valid modes, and avoid relying on the PR-processing loop to perform this
validation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.github/workflows/auto-rebase-reusable.yml:
- Around line 111-112: Update the initial PR listing assigned to PRS to extract
both the PR number, head ref, and base.ref, then pass the base branch through
the per-PR loop. Remove the per-PR gh api call and derive BASE_BRANCH from the
listing data while preserving processing of remaining PRs when individual
operations fail.
- Around line 114-117: Validate the eligibility mode before the no-PR early exit
in the workflow, using the existing auto_rebase_pr_eligible logic or its mode
validation to ensure unknown $ELIGIBILITY values emit ::error::. Keep the
empty-$PRS success path unchanged for valid modes, and avoid relying on the
PR-processing loop to perform this validation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 21c08983-9a18-493a-b606-474b302075bb

📥 Commits

Reviewing files that changed from the base of the PR and between 837cee9 and 0e635d2.

📒 Files selected for processing (7)
  • .github/scripts/auto-rebase/README.md
  • .github/scripts/auto-rebase/lib/eligibility.sh
  • .github/workflows/auto-rebase-reusable.yml
  • standards/ci-standards.md
  • standards/workflows/auto-rebase.yml
  • test/workflows/auto-rebase/eligibility.bats
  • test/workflows/auto-rebase/merge-method.bats

coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 3, 2026
@don-petry
don-petry disabled auto-merge August 3, 2026 01:13
@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

@donpetry-bot

Copy link
Copy Markdown
Contributor

CI checks on this PR are still running. Once they complete, re-mention @donpetry-bot to trigger a fresh review.

Posted by the donpetry-bot PR-review cascade.

@don-petry
don-petry disabled auto-merge August 3, 2026 01:16
@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

@donpetry-bot

Copy link
Copy Markdown
Contributor

CI checks on this PR are still running. Once they complete, re-mention @donpetry-bot to trigger a fresh review.

Posted by the donpetry-bot PR-review cascade.

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) August 3, 2026 01:24
donpetry-bot
donpetry-bot previously approved these changes Aug 3, 2026

@donpetry-bot donpetry-bot 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.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: 8f70e3265b22718096539d0974539552d68f80d4
Review mode: triage-approved (single reviewer)

Summary

Removes the review-ready eligibility gate from the auto-rebase reusable workflow, defaulting to updating every behind PR (eligibility: all), and locks in the merge-method invariant with a new regression test. Fully implements issue #927 with clean backward compatibility: review-ready is a deprecated alias treated as all (with a stderr warning), and ready_label is accepted-but-ignored so existing callers do not break.

Linked issue analysis

Issue #927 (part of #926) required: (1) flip the eligibility default from review-ready to all — done in auto-rebase-reusable.yml; (2) remove dead review-ready mode and ready_label plumbing from lib/eligibility.sh and the reusable — done, including the stuck-conflict notice block that only made sense under gated eligibility; (3) a regression test asserting update-branch always uses update_method=merge, never rebase — added in test/workflows/auto-rebase/merge-method.bats. Docs (README, ci-standards.md, ADR, standards template) updated consistently. Substantively addressed.

Findings

No blocking findings.

  • Backward compatibility handled correctly: review-ready is a deprecated alias returning eligible (with stderr deprecation warning) and the ready_label input is retained but ignored, so existing callers dispatch without validation errors. This resolved the qodo breaking-contract review thread.
  • auto_rebase_post_comment_best_effort remains defined in lib/comments.sh and is still used by the blocked/conflict notice paths at head SHA — no dead code left behind.
  • Tests updated to pin the new contract, including guards that the removed predicates are no longer defined.
  • Minor (non-blocking): auto_rebase_pr_eligible is still invoked per-PR inside the loop though it now depends only on the mode; acceptable as it preserves the extension point for future per-PR modes.
  • Secret-scanning MCP tool unavailable in this run; gitleaks CI check passed (SUCCESS).

CI status

All checks green at head SHA 8f70e32: ShellCheck, bats (x2), Lint, CodeQL, Analyze (actions), agent-shield, Agent Security Scan, Secret scan (gitleaks), SonarCloud quality gate, npm audit, Graphite AI Reviews — all SUCCESS. Ecosystem audits (pip/pnpm/cargo/govulncheck) skipped as not applicable. Two cancelled dev-lead dispatch/ci-relay entries are superseded orchestration runs; their latest runs are success/skipped.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

donpetry-bot
donpetry-bot previously approved these changes Aug 3, 2026

@donpetry-bot donpetry-bot 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.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: 8f70e3265b22718096539d0974539552d68f80d4
Cascade: triage → deep (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5)

Summary

PR #931 implements issue #927: flips auto-rebase-reusable.yml eligibility default from 'review-ready' to 'all', removes the now-dead approval/ready_label predicate plumbing, and adds a regression test locking update_method=merge. Change is backward-compatible — 'review-ready' and 'ready_label' are still accepted as deprecated no-ops, so none of the 8 pinned downstream consumers (.github, .github-private, ContentTwin, TalkTerm, bmad-bgreat-suite, broodly, google-app-scripts, markets) break; only the default fan-out behavior shifts, an explicitly accepted/documented CI-cost tradeoff. No security-sensitive surface touched; CI green and PR already APPROVED.

Downstream impact

This change is consumed by 8 downstream repo(s) that pin the affected reusable workflow / lib / prompt. Impacted consumers:

Impacted shared surfaces:
  - .github/workflows/auto-rebase-reusable.yml

Impacted consumers (8, fetching up to 10):
  - petry-projects/.github (pins .github/workflows/auto-rebase-reusable.yml)
      .github/workflows/auto-rebase.yml
  - petry-projects/.github-private (pins .github/workflows/auto-rebase-reusable.yml)
      .github/workflows/auto-rebase.yml
  - petry-projects/ContentTwin (pins .github/workflows/auto-rebase-reusable.yml)
      .github/workflows/auto-rebase.yml
  - petry-projects/TalkTerm (pins .github/workflows/auto-rebase-reusable.yml)
      .github/workflows/auto-rebase.yml
  - petry-projects/bmad-bgreat-suite (pins .github/workflows/auto-rebase-reusable.yml)
      .github/workflows/auto-rebase.yml
  - petry-projects/broodly (pins .github/workflows/auto-rebase-reusable.yml)
      .github/workflows/auto-rebase.yml
  - petry-projects/google-app-scripts (pins .github/workflows/auto-rebase-reusable.yml)
      .github/workflows/auto-rebase.yml
  - petry-projects/markets (pins .github/workflows/auto-rebase-reusable.yml)
      .github/workflows/auto-rebase.yml

Findings

  • info: Default eligibility change affects 8 consumers pinning auto-rebase-reusable.yml (petry-projects: .github, .github-private, ContentTwin, TalkTerm, bmad-bgreat-suite, broodly, google-app-scripts, markets). Informational only: change is backward-compatible (review-ready and ready_label still accepted as deprecated no-ops), so no consumer errors; they receive broader branch-update fan-out by default, which the linked issue documents as an accepted CI-cost tradeoff.
  • info: merge_method=merge invariant preserved (line ~157) and now guarded by new test/workflows/auto-rebase/merge-method.bats; BASE_BRANCH remains used in the compare call after the stuck-notice block removal, so no dead variable. ShellCheck and bats CI pass.
  • info: Gemini Code Assist's low-priority note on merge-method.bats:25 (prefer exit-status 1 over -ne 0) is already satisfied — the final assertion uses [ "$status" -eq 1 ]. SonarCloud quality gate passed; Codex review skipped due to usage limits (no finding). No unresolved actionable advisory findings.
  • info: MCP run_secret_scanning tool not exposed in this environment; skipped per instructions (not treated as a block). No secrets, credentials, or tokens present in the diff on manual review; gitleaks CI check passed.

Reviewed by the PR-review cascade (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5). Reply if you need a human review.

@donpetry-bot
donpetry-bot dismissed their stale review August 3, 2026 01:33

Superseded by automated re-review at 8f70e32.

donpetry-bot
donpetry-bot previously approved these changes Aug 3, 2026

@donpetry-bot donpetry-bot 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.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: 8f70e3265b22718096539d0974539552d68f80d4
Review mode: triage-approved (single reviewer)

Summary

Flips the auto-rebase reusable's eligibility default from review-ready to all, removes the now-dead approval/label plumbing (auto_rebase_has_current_approval, auto_rebase_has_ready_label, the ready_label gate, and the issue-#711 stuck-conflict notice that only fired on ineligible PRs), updates docs/standards accordingly, and adds a merge-method regression test locking update_method=merge. Triage's low-risk assessment is confirmed: the change is a removal-heavy simplification (95+/263-) with backwards-compatible handling for existing callers.

Linked issue analysis

Closes #927 (part of #926 AC1/AC3/AC5). All three asks are substantively addressed: (1) eligibility default flipped to all in auto-rebase-reusable.yml; (2) review-ready plumbing removed from lib/eligibility.sh and the workflow; (3) merge-method invariant locked via test/workflows/auto-rebase/merge-method.bats. One deliberate deviation: rather than making review-ready an unknown mode, it is kept as a deprecated alias for all (with a stderr warning), and ready_label is accepted-but-ignored — added in the fix-reviews commit in response to a reviewer flagging that existing reusable callers would otherwise break. This is a safer choice than the literal issue text and is covered by tests.

Findings

No blocking findings.

  • Security: no new secret/token usage; the change removes per-PR API calls and removes the READY_LABEL interpolation into comment bodies. Inputs still flow through env vars into quoted shell — no injection surface added. Gitleaks, CodeQL (actions), agent-shield, and the Agent Security Scan are all green. (The run_secret_scanning MCP tool was unavailable in this environment; gitleaks CI covers the secret scan.)
  • Correctness: eligibility.sh remains a pure predicate; unknown/empty modes still exit 2 and the workflow fails clearly on them. auto_rebase_post_comment_best_effort is still used by the blocked/conflict paths, so no dead code is left behind. Bats suites updated to pin the new behavior, including tests asserting the removed functions no longer exist.
  • Minor (non-blocking): the README/ci-standards mode tables no longer mention the deprecated review-ready alias, so its aliasing behavior is only discoverable in eligibility.sh and the bats test. Fine to leave, since the alias is slated for removal.
  • All 3 bot review threads (gemini, qodo x2) are resolved; the qodo breaking-callers concern was addressed by the deprecated alias + no-op ready_label input.

CI status

All latest check runs on 8f70e3265b22718096539d0974539552d68f80d4 are green: ShellCheck, Lint, bats (x2), CodeQL, Analyze (actions), agent-shield, Agent Security Scan, Secret scan (gitleaks), SonarCloud, npm audit, Graphite AI review — success; ecosystem audits (cargo/pip/pnpm/govulncheck) skipped as not applicable. Earlier CANCELLED dev-lead dispatch/ci-relay entries in the rollup are superseded runs. mergeable=MERGEABLE; mergeStateStatus=BLOCKED pending this review.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@donpetry-bot
donpetry-bot dismissed their stale review August 3, 2026 01:38

Superseded by automated re-review at 8f70e32.

donpetry-bot
donpetry-bot previously approved these changes Aug 3, 2026

@donpetry-bot donpetry-bot 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.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: 8f70e3265b22718096539d0974539552d68f80d4
Review mode: triage-approved (single reviewer)

Summary

PR #931 implements issue #927 fully: flips the auto-rebase reusable's eligibility default from review-ready to all, removes the dead approval/label predicate plumbing, adds a regression test locking the update_method=merge invariant, and updates all four documentation surfaces consistently. Backward compatibility is handled thoughtfully (review-ready kept as a deprecated alias, ready_label kept as an ignored input so existing callers don't hit Actions validation errors). All CI green, all review threads resolved, human+bot approvals in place.

Linked issue analysis

Closes #927 (part of #926, AC1 + AC3 + reusable-side AC5 cleanup). All three requirements verified in the diff: (1) eligibility input default flipped to 'all' in auto-rebase-reusable.yml; (2) auto_rebase_has_current_approval and auto_rebase_has_ready_label removed from lib/eligibility.sh with bats tests asserting they are no longer defined, and the per-PR review/label API calls removed from the workflow loop; (3) new merge-method.bats asserts update_method=merge is present and the rebase method is never used. Docs (README, ci-standards.md, pull-request-limits ADR, standards workflow stub) all updated to match.

Findings

No blocking findings.

  • Backward compat handled well: review-ready is retained as a deprecated alias (stderr warning, treated as all) and ready_label is retained as an accepted-but-ignored input — existing callers will not break or hit workflow-call validation errors. Note the auto-generated PR description claims removed modes "fail clearly", but the actual (better) behavior is the deprecated alias; only truly unknown modes fail with exit 2.
  • Dead-code removal is consistent: the issue-#711 stuck-conflict notice only fired on eligibility-skipped PRs; under the new all default no PR is skipped, so removing it is correct. If a restrictive mode is added later, that escalation path may need reintroduction.
  • Tests are sound: empty/unknown modes exit 2 (workflow surfaces ::error and exits 1); merge-method invariant is pinned by grep-based regression tests.
  • Secret scanning MCP tool unavailable in this environment; gitleaks CI check passed (SUCCESS).

CI status

All code checks green at 8f70e32: ShellCheck, Lint, bats (x2), Lint and bats, CodeQL, Analyze (actions), Secret scan (gitleaks), Agent Security Scan, agent-shield, npm audit, SonarCloud (quality gate passed), Graphite AI Reviews. Two cancelled dev-lead dispatch/ci-relay runs at 01:16:37Z were concurrency-superseded by later successful runs (01:28–01:38Z). Ecosystem audits not applicable were skipped.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@donpetry-bot
donpetry-bot dismissed their stale review August 3, 2026 01:42

Superseded by automated re-review at 8f70e32.

donpetry-bot
donpetry-bot previously approved these changes Aug 3, 2026

@donpetry-bot donpetry-bot 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.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: 8f70e3265b22718096539d0974539552d68f80d4
Review mode: triage-approved (single reviewer)

Summary

Flips auto-rebase default eligibility to 'all', removes the dead review-ready/approval/ready-label plumbing, and adds a bats regression guard locking the update_method=merge invariant. Implements issue #927 faithfully, with a pragmatic deviation: 'review-ready' is kept as a deprecated alias for 'all' (stderr warning) and 'ready_label' remains an accepted-but-ignored input so existing workflow_call callers do not break on input validation. Net -168 lines; tests and all four docs updated consistently.

Linked issue analysis

Closes #927 (part of initiative #926). All three acceptance items are substantively addressed: (1) eligibility default flipped from review-ready to all in auto-rebase-reusable.yml; (2) dead review-ready mode, approval predicate, ready-label predicate, and per-PR review/label API calls removed from lib/eligibility.sh and the reusable — the issue-#711 stuck-conflict notice block was also removed, correctly, since no valid mode can skip a PR anymore, making that path unreachable; (3) new test/workflows/auto-rebase/merge-method.bats asserts update_method=merge is present and the rebase method never appears. The deprecated-alias approach is a reasonable safety-preserving deviation from a literal removal, and is pinned by a test.

Findings

No blocking findings.

  • Security: no new permissions, secrets, or injection surfaces; the change removes gh api calls and comment-posting logic. ELIGIBILITY is passed via env and quoted. Secret-scan MCP tool unavailable in this run; the gitleaks CI check passed.
  • Behavior note (intentional per #926/#927 decision): existing callers still passing eligibility: review-ready now update every behind PR including drafts — the alias logs a deprecation warning to stderr and is covered by a bats test.
  • Minor (non-blocking): the deprecated review-ready alias and ignored ready_label input are documented in the workflow input description but not in the README mode table; acceptable since they are deliberately being phased out.
  • Tests coherently updated: dead functions asserted undefined via type -t, unknown/empty modes exit 2, alias exits 0.

CI status

All checks green: Lint/ShellCheck, bats (incl. new merge-method suite), CodeQL, SonarCloud quality gate, gitleaks secret scan, npm audit, AgentShield, CodeRabbit, Graphite AI — all SUCCESS. Two CANCELLED dev-lead dispatch/ci-relay entries are agent-automation runs superseded by later successful runs, not correctness checks. Zero unresolved review threads; reviewDecision is APPROVED (CodeRabbit + prior cascade).


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@donpetry-bot
donpetry-bot dismissed their stale review August 3, 2026 01:46

Superseded by automated re-review at 8f70e32.

donpetry-bot
donpetry-bot previously approved these changes Aug 3, 2026

@donpetry-bot donpetry-bot 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.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: 8f70e3265b22718096539d0974539552d68f80d4
Review mode: triage-approved (single reviewer)

Summary

Flips the auto-rebase reusable's eligibility default from review-ready to all, deletes the now-dead approval/label predicates and the issue-#711 stuck-conflict notice (whose trigger path — skipped PRs — no longer exists), and adds a merge-method regression guard. Net -168 lines. The triage tier's low-risk assessment is confirmed; classified MEDIUM here only because it changes workflow automation behavior, with no security-relevant surface touched.

Linked issue analysis

Closes #927 and substantively addresses all three asks: (1) eligibility default flipped to 'all' in auto-rebase-reusable.yml; (2) review-ready predicates (auto_rebase_has_current_approval, auto_rebase_has_ready_label) and ready_label plumbing removed from lib/eligibility.sh and the workflow, with docs (README, ci-standards.md, ADR, standards stub) updated to match; (3) new test/workflows/auto-rebase/merge-method.bats pins the update_method=merge invariant. Deliberate soft-landing beyond the issue's letter: 'review-ready' is kept as a deprecated alias for 'all' (stderr warning) and ready_label is accepted-but-ignored, so existing callers don't break on dispatch — a reasonable compat choice that arose from review feedback (resolved qodo thread) and is covered by tests.

Findings

No blocking findings.

  • Security: no secrets, no new permissions, no injection surface; the change removes two GitHub API calls per PR. Secret scan: run_secret_scanning MCP tool unavailable in this environment; gitleaks CI check is green and the diff contains no credential-like content.
  • Correctness: auto_rebase_post_comment_best_effort remains used elsewhere in the reusable (blocked/conflict notices at head), so no dead code; conflicting PRs still surface a conflict notice via the retained path. Bats tests updated to cover all/unknown/empty/deprecated modes and assert the old predicates are gone.
  • Minor (non-blocking): the deprecated review-ready alias is documented in code and tests but omitted from the README modes table; the auto-generated CodeAnt PR description claims review-ready 'now fails clearly', which contradicts the actual alias behavior — the code and tests are authoritative.

CI status

All substantive checks green at 8f70e32: Lint, ShellCheck, bats (x2), CodeQL, AgentShield, Agent Security Scan, gitleaks, SonarCloud, npm audit. Remaining CANCELLED/SKIPPED entries are dev-lead dispatch/ci-relay orchestration runs, not required checks. All 3 review threads resolved; reviewDecision is APPROVED; human-account comments are automated dev-lead status notes with no open questions.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@donpetry-bot
donpetry-bot dismissed their stale review August 3, 2026 01:51

Superseded by automated re-review at 8f70e32.

donpetry-bot
donpetry-bot previously approved these changes Aug 3, 2026

@donpetry-bot donpetry-bot 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.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: 8f70e3265b22718096539d0974539552d68f80d4
Review mode: triage-approved (single reviewer)

Summary

Confirms the triage assessment. The PR flips the auto-rebase eligibility default to all, removes the dead review-ready gating (approval/label predicates, per-PR review+label API calls, the issue-#711 stuck-conflict notice), and locks the update_method=merge invariant with a new bats regression test. Docs (README, ci-standards, ADR, caller stub) are updated consistently. Net −168 lines; the change reduces API surface and comment-posting code paths rather than adding any.

Linked issue analysis

Closes #927 (part of #926, AC1+AC3+AC5 reusable-side cleanup). All three asks are substantively addressed: (1) default flipped from review-ready to all; (2) review-ready plumbing removed from lib/eligibility.sh and the reusable; (3) merge-method regression test added (test/workflows/auto-rebase/merge-method.bats) asserting update_method=merge and never rebase. One deliberate deviation: review-ready is kept as a deprecated alias for all (stderr warning) and ready_label is accepted-but-ignored, rather than hard-removed — a reasonable backward-compat choice for existing callers; the gate itself is gone as intended.

Findings

No blocking findings.

Informational:

  • The deprecated review-ready alias now silently behaves as all — any caller explicitly passing review-ready expecting gating will fan out to every behind PR with only a stderr warning. Intentional per #927 (the gate is removed), but worth knowing.
  • With the stuck-conflict notice removed, conflicting PRs will now surface via a failed update-branch attempt instead of a one-time comment; acceptable since under all no PR is skipped-and-silent anymore.
  • Unknown/empty eligibility modes correctly fail with exit 2 (::error + exit 1 in the workflow), covered by tests.
  • The run_secret_scanning MCP tool is not available in this environment; relied on the green gitleaks CI check. No secret-like content in the diff.

Risk rationale (MEDIUM, not LOW): non-trivial behavior change to org-wide CI automation (fan-out semantics for every adopting repo), though it removes code and reduces surface. No security anti-patterns, no new secret usage, shell variables properly quoted.

CI status

All substantive checks green at 8f70e3265b22718096539d0974539552d68f80d4: Lint, ShellCheck, bats, CodeQL, SonarCloud (quality gate passed, 0 new issues), gitleaks secret scan, npm audit, AgentShield, Agent Security Scan, CodeRabbit, Graphite AI review. Cancelled/skipped entries (dev-lead / dispatch, dev-lead / ci-relay, ecosystem-specific audits) are agent-orchestration or not-applicable jobs; later runs of the same checks succeeded. No unresolved review threads; latest reviews from coderabbitai and donpetry-bot are APPROVED.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@donpetry-bot
donpetry-bot dismissed their stale review August 3, 2026 01:55

Superseded by automated re-review at 8f70e32.

donpetry-bot
donpetry-bot previously approved these changes Aug 3, 2026

@donpetry-bot donpetry-bot 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.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: 8f70e3265b22718096539d0974539552d68f80d4
Review mode: triage-approved (single reviewer)

Summary

Flips the auto-rebase reusable's eligibility default from review-ready to all, removes the now-dead approval/ready-label predicates and stuck-conflict notice, keeps review-ready as a deprecated alias (and ready_label as an accepted-but-ignored input) for caller compatibility, updates README/standards/ADR docs, and adds a merge-method.bats regression guard pinning update_method=merge. Confirms the triage tier's low-risk assessment; risk rated MEDIUM only because it is a non-trivial CI workflow logic change.

Linked issue analysis

Closes #927 (part of #926, AC1+AC3+AC5 reusable-side cleanup). All three asks are substantively addressed: (1) eligibility default flipped to 'all' in auto-rebase-reusable.yml; (2) dead review-ready mode and ready_label plumbing removed from lib/eligibility.sh and the reusable — review-ready survives only as a deprecated warn-and-pass alias, a deliberate compatibility choice made during the fix-reviews cycle so existing callers do not break, covered by a unit test; (3) merge-method invariant locked by the new test/workflows/auto-rebase/merge-method.bats asserting update_method=merge is present and rebase is never used.

Findings

No blocking findings.

  • Non-blocking: the auto-generated CodeAnt PR description claims the removed review-ready mode now "fails clearly" — the code actually treats it as a deprecated alias for 'all' (warns on stderr, returns 0). The code and tests are consistent; only the generated description is inaccurate.
  • Non-blocking: the deprecated review-ready alias is documented in code comments but not in the README mode table. Fine to leave until the alias is removed.
  • Security: no new GitHub Actions smells — inputs reach the shell via the env: block (no untrusted ${{ }} interpolation in run:), the change removes two API calls and the comment-posting path, reducing attack surface. Secret-scanning MCP tool unavailable in this run; gitleaks CI check passed.
  • All 3 bot review threads (gemini, qodo x2) are resolved; qodo's 'breaking reusable workflow contract' finding was addressed by the deprecated alias + ignored ready_label input.

CI status

All checks green: Lint, ShellCheck, bats (incl. new merge-method.bats), CodeQL, SonarCloud quality gate, gitleaks secret scan, agent-shield, npm audit. The CANCELLED dev-lead dispatch/ci-relay entries are superseded agent-orchestration runs, not test failures. reviewDecision: APPROVED; no pending review requests.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@donpetry-bot
donpetry-bot dismissed their stale review August 3, 2026 01:59

Superseded by automated re-review at 8f70e32.

donpetry-bot
donpetry-bot previously approved these changes Aug 3, 2026

@donpetry-bot donpetry-bot 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.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: 8f70e3265b22718096539d0974539552d68f80d4
Review mode: triage-approved (single reviewer)

Summary

Confirms the triage assessment: this PR correctly implements issue #927. It flips the auto-rebase reusable's eligibility default from review-ready to all, deletes the dead approval/ready-label plumbing (auto_rebase_has_current_approval, auto_rebase_has_ready_label, the stuck-conflict notice from issue #711 that only applied to skipped PRs), updates docs/standards, and adds a bats regression guard locking the update_method=merge invariant. Net -168 lines; the change removes logic rather than adding it, with no new dependencies or security-sensitive surface.

Linked issue analysis

Issue #927 (part of #926, AC1 + AC3 + AC5 reusable-side cleanup) asks for: (1) default eligibility flipped to all — done in auto-rebase-reusable.yml; (2) removal of the dead review-ready mode and ready_label plumbing — done, with a pragmatic deviation: review-ready is kept as a deprecated alias that warns and behaves as all, and ready_label is accepted-but-ignored so existing callers don't hit Actions validation errors (a backward-compat choice made during the fix-reviews cycle, covered by tests); (3) a regression test locking update_method=merge — added in test/workflows/auto-rebase/merge-method.bats. The issue is substantively addressed.

Findings

No blocking findings.

Non-blocking notes:

  • The auto-generated PR description (CodeAnt) is stale: it claims the removed review-ready mode "now fails clearly", but the current head treats it as a deprecated alias of all (warns to stderr, returns 0). The code and tests are consistent; only the description lags.
  • README.md and ci-standards.md document only the all mode and omit the deprecated review-ready alias. Acceptable for a deprecated path, but worth a line if the alias lives long.
  • Removing the issue #711 stuck-conflict notice is coherent: with all as default no behind PR is silently skipped, so the skip-deadlock the notice addressed can no longer occur.
  • Secret scan: the run_secret_scanning MCP tool was not available in this run; the gitleaks CI check passed and the diff adds no secret-like content.

CI status

All checks green at 8f70e32: Lint, ShellCheck, bats (eligibility + merge-method), CodeQL (actions), Secret scan (gitleaks), npm audit, Agent Security Scan, AgentShield, SonarCloud, CodeRabbit, Graphite AI all SUCCESS. The CANCELLED/SKIPPED entries are dev-lead dispatch/ci-relay orchestration jobs from earlier commits, not test checks. No unresolved review threads; CodeRabbit and donpetry-bot both approved.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@donpetry-bot
donpetry-bot dismissed their stale review August 3, 2026 02:03

Superseded by automated re-review at 8f70e32.

@donpetry-bot donpetry-bot 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.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: 8f70e3265b22718096539d0974539552d68f80d4
Review mode: triage-approved (single reviewer)

Summary

Confirms the triage assessment: PR #931 correctly implements issue #927. It flips the auto-rebase reusable's eligibility default from review-ready to all, removes the dead approval/ready-label plumbing (auto_rebase_has_current_approval, auto_rebase_has_ready_label, and the issue-#711 stuck-conflict notice that only applied to skipped PRs), updates the README/standards/ADR docs to match, and adds a bats regression guard locking the update_method=merge invariant. Net -168 lines; the change removes logic and API calls rather than adding surface.

Linked issue analysis

Issue #927 (part of #926: AC1 + AC3 + reusable-side AC5 cleanup) asks for: (1) flip the eligibility default to all — done in auto-rebase-reusable.yml; (2) remove the dead review-ready mode and ready_label plumbing — done, with one deliberate deviation: review-ready is kept as a deprecated alias that warns to stderr and behaves as all, and ready_label is accepted-but-silently-ignored so existing callers do not hit Actions dispatch validation errors. This backward-compat softening was made in response to a qodo-code-review finding, is documented in the input description, and is pinned by bats tests; (3) a regression test asserting update-branch always uses update_method=merge and never rebase — added in test/workflows/auto-rebase/merge-method.bats, including a grep-status-eq-1 assertion hardened after a gemini finding to avoid false positives from grep errors.

Findings

No blocking findings.

  • Security: the change reduces attack surface (removes two gh api calls per behind PR and the comment-posting stuck-notice path). ELIGIBILITY is passed via env, not interpolated into the script — no injection risk. No secrets, auth, or permissions changes.
  • All 3 review threads (gemini x1, qodo x2) are resolved with verified fixes in the head commit: grep exit-status hardening in merge-method.bats, the deprecated review-ready/ready_label compat shims, and the ADR table correction.
  • Minor note (non-blocking): the auto-generated CodeAnt PR description claims the removed review-ready mode now 'fails clearly', but the code intentionally treats it as a deprecated alias for all — the code and tests are the source of truth here.
  • Secret scan: the run_secret_scanning MCP tool is unavailable in this environment; the gitleaks CI check passed, and the diff contains no credential-like content.

CI status

All required checks green: Lint, ShellCheck, bats, CodeQL, SonarCloud, AgentShield, Agent Security Scan, Secret scan (gitleaks), npm audit, CodeRabbit, Graphite AI Reviews. A couple of dev-lead dispatch/ci-relay runs show CANCELLED/SKIPPED — these are superseded agent-orchestration dispatches, not test failures. mergeStateStatus is BLOCKED pending branch-protection requirements, which this approval addresses.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@donpetry-bot
donpetry-bot dismissed their stale review August 3, 2026 02:07

Superseded by automated re-review at 8f70e32.

@don-petry
don-petry merged commit cff381f into main Aug 3, 2026
66 of 68 checks passed
@don-petry
don-petry deleted the dev-lead/issue-927-20260803-0059 branch August 3, 2026 02:10

@donpetry-bot donpetry-bot 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.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: 8f70e3265b22718096539d0974539552d68f80d4
Review mode: triage-approved (single reviewer)

Summary

Implements issue #927 faithfully: flips the auto-rebase eligibility default to 'all', removes the dead review-ready/approval/label plumbing from eligibility.sh and the reusable workflow, and adds a bats regression guard locking the update_method=merge invariant. Backward compatibility is handled thoughtfully (review-ready kept as a warning deprecated alias; ready_label kept as an ignored input so existing callers don't hit workflow validation errors). All CI validation checks green, all review threads resolved.

Linked issue analysis

Closes #927 (part of initiative #926). All three acceptance points are addressed: (1) eligibility default flipped from review-ready to all in auto-rebase-reusable.yml; (2) dead review-ready mode and ready_label plumbing removed from lib/eligibility.sh and the workflow (with deliberate deprecation shims for existing callers — a defensible superset of the issue's ask); (3) new test/workflows/auto-rebase/merge-method.bats asserts update-branch is always called with update_method=merge and never rebase — verified update_method=merge is present at the head SHA. Docs (README, ci-standards.md, ADR, standards caller stub) updated consistently.

Findings

No blocking findings.

  • No security concerns. The change removes API calls and shell interpolation (the issue #711 stuck-conflict comment block); no new secrets usage, permissions, or untrusted-input interpolation. auto_rebase_post_comment_best_effort remains in use elsewhere (workflow lines 184, 228), so no dead code is left.
  • Minor (informational): the auto-generated PR description says the removed review-ready mode "now fails clearly", but the code treats it as a deprecated alias for all (warns on stderr, returns 0). The code matches the issue intent and is tested; only the description is imprecise.
  • Secret scan: the run_secret_scanning MCP tool is not available in this environment; the gitleaks CI check passed and the diff contains no credential-like content.
  • Triage assessment confirmed: this is a low-risk cleanup/behavior-flip explicitly decided in #926; classified MEDIUM here only because it is a non-trivial workflow logic change.

CI status

All validation checks green: Lint, ShellCheck, bats (including the new merge-method.bats), CodeQL, SonarCloud, agent-shield, Secret scan (gitleaks), npm audit, Graphite AI review. The CANCELLED/SKIPPED entries (dev-lead dispatch / ci-relay) are agent-orchestration runs, not validation checks; later dispatch runs succeeded.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@donpetry-bot donpetry-bot 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.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: 8f70e3265b22718096539d0974539552d68f80d4
Review mode: triage-approved (single reviewer)

Summary

Confirmation review (triage-approved mode) of PR #931, which implements issue #927: flips the auto-rebase eligibility default from review-ready to all, removes the dead review-ready/approval/ready-label plumbing from lib/eligibility.sh and the reusable workflow, and adds a regression test locking the update_method=merge invariant. The triage assessment holds — the change is a net simplification (removes per-PR API calls and the stuck-conflict comment path; adds no secrets, permissions, or dependencies). I rate it MEDIUM rather than LOW because it changes reusable-workflow logic, but all decision gates pass.

Linked issue analysis

Issue #927 (closed via this PR) had three asks, all substantively addressed:

  1. Default flipped to allauto-rebase-reusable.yml input default changed; docs (README, ci-standards.md, ADR, standards/workflows/auto-rebase.yml) updated consistently.
  2. Dead review-ready code removedauto_rebase_has_current_approval and auto_rebase_has_ready_label deleted (with bats guards asserting they are no longer defined). Deliberate back-compat deviations: review-ready is kept as a deprecated alias for all (stderr warning), and ready_label is kept as an accepted-but-ignored input so existing callers do not hit GitHub Actions validation errors. Both are documented in the workflow header — a reasonable choice for an org-wide reusable.
  3. Merge-method invariant locked — new test/workflows/auto-rebase/merge-method.bats asserts update_method=merge is present and the rebase method is never used.

Findings

No blocking findings.

  • Secret scan: the run_secret_scanning MCP tool is not available in this environment; the gitleaks CI check passed. No credentials, tokens, or .env content in the diff.
  • Security: no GitHub Actions security smells — the change removes gh api calls and a comment-posting path; no new permissions or secret usage. Unknown eligibility modes fail loudly (exit 2::error → job failure), covered by tests including the empty-mode case.
  • Nit (non-blocking): the eligibility check now depends only on the mode but still runs inside the per-PR loop; hoisting it would be marginally cleaner.
  • Nit (non-blocking): the auto-generated PR description claims review-ready "now fails clearly", which is stale — the final code treats it as a deprecated alias for all.
  • All 3 inline review threads (gemini, qodo ×2) are resolved; CodeRabbit approved; no unanswered human-reviewer questions (don-petry's review comments were addressed in the fix-reviews cycle that produced the current head SHA).

CI status

All quality gates green on 8f70e3265b22718096539d0974539552d68f80d4: Lint, ShellCheck, bats (×2), CodeQL, Analyze (actions), agent-shield, Agent Security Scan, Secret scan (gitleaks), npm audit, SonarCloud quality gate, CodeRabbit, Graphite AI Reviews. Two cancelled dev-lead orchestration runs from 01:16 UTC were superseded by later runs of the same checks (latest: dispatch=success, ci-relay=skipped); they are agent-dispatch jobs, not code-quality gates.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

auto-rebase: default eligibility to all; remove dead review-ready code; lock merge-method invariant

2 participants