-
Notifications
You must be signed in to change notification settings - Fork 0
feat: implement issue #928 — auto-rebase: verify DIRTY PRs now reach the conflict-sentinel path; retire the redundant stuck-comment escalation #932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
fe0e676
feat: implement issue #928 — auto-rebase: verify DIRTY PRs now reach …
donpetry-bot 1102d5a
fix(reviews): address review comments [skip ci-relay]
donpetry-bot 9191925
chore: dev-lead update (review-changes) [skip ci-relay]
donpetry-bot bbe1060
chore: dev-lead update (review-changes) [skip ci-relay]
donpetry-bot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| #!/usr/bin/env bats | ||
| # Confirms AC4 of issue #926 (tracked by #928): a DIRTY (merge-conflict), | ||
| # non-draft PR is now actually ATTEMPTED by update-branch — it is no longer | ||
| # skipped for lacking an approval — and therefore reaches the existing | ||
| # <!-- auto-rebase-conflict: --> sentinel → dev-lead agentic-rebase path. | ||
| # | ||
| # Since #927 the eligibility default is `all` and the approval / review-ready | ||
| # plumbing is gone (see eligibility.bats). These grep-based regression guards | ||
| # pin the reusable workflow so the DIRTY → conflict-sentinel path cannot | ||
| # silently regress by reintroducing an approval precondition before | ||
| # update-branch. They mirror the file-scanning style of merge-method.bats. | ||
|
|
||
| load 'helpers/setup' | ||
|
|
||
| REUSABLE="${TT_REPO_ROOT}/.github/workflows/auto-rebase-reusable.yml" | ||
|
|
||
| @test "conflict-sentinel: reusable workflow file exists" { | ||
| [ -f "$REUSABLE" ] | ||
| } | ||
|
|
||
| @test "conflict-sentinel: every eligible behind PR is attempted via update-branch" { | ||
| # The DIRTY PR must actually be attempted — the update-branch call is present. | ||
| run grep -E 'pulls/\$\{?PR_NUMBER\}?/update-branch' "$REUSABLE" | ||
| [ "$status" -eq 0 ] | ||
| } | ||
|
|
||
| @test "conflict-sentinel: update-branch is not gated on an approval / review decision" { | ||
| # A DIRTY PR must not be skipped for lacking an approval (#927 removed this). | ||
| # Guard against reintroducing any review-decision precondition in the reusable. | ||
| # Patterns are scoped to the specific identifiers removed in #927 — broad tokens | ||
| # like /reviews are omitted because they can appear in unrelated comments or API | ||
| # calls and would cause false positives on legitimate refactors. | ||
| run grep -Ei 'reviewDecision|has_current_approval|has_ready_label' "$REUSABLE" | ||
| [ "$status" -eq 1 ] | ||
| } | ||
|
|
||
| @test "conflict-sentinel: a merge-conflict update failure branches to the conflict path" { | ||
| run grep -i 'merge conflict' "$REUSABLE" | ||
| [ "$status" -eq 0 ] | ||
| } | ||
|
|
||
| @test "conflict-sentinel: the merge-conflict path posts the <!-- auto-rebase-conflict: --> dev-lead sentinel" { | ||
| run grep -F '<!-- auto-rebase-conflict:' "$REUSABLE" | ||
| [ "$status" -eq 0 ] | ||
| } | ||
|
|
||
| @test "conflict-sentinel: the weaker one-time <!-- auto-rebase-stuck --> escalation is absent (retired)" { | ||
| # AC4 retires the redundant stuck-comment escalation as dead code. The primary | ||
| # retirement lives in petry-projects/.github-private#711; this guard ensures the | ||
| # weaker sentinel is never (re)introduced into this repo's auto-rebase reusable. | ||
| run grep -F 'auto-rebase-stuck' "$REUSABLE" | ||
| [ "$status" -eq 1 ] | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.