Skip to content

auto-rebase: verify DIRTY PRs now reach the conflict-sentinel path; retire the redundant stuck-comment escalation #928

Closed

Description

@don-petry

Part of #926 (AC4). Blocked by the eligibility-default-flip issue — this can't be observed until eligibility: all ships.

Confirm that a DIRTY, non-draft PR is now actually attempted by update-branch (since it's no longer skipped for lacking an approval) and therefore reaches the existing <!-- auto-rebase-conflict: --> sentinel → dev-lead agentic-rebase path. If confirmed, retire the weaker one-time <!-- auto-rebase-stuck --> comment escalation (combsmith/.github-private#711) as redundant dead code.

Activity

  1. don-petry commented on Aug 3, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead Implementation Plan

    Issue: #928 — auto-rebase: verify DIRTY PRs now reach the conflict-sentinel path; retire the redundant stuck-comment escalation

    Confirmation (AC4)

    Verified in .github/workflows/auto-rebase-reusable.yml: since #927 flipped the eligibility default to all and removed the approval/review-ready plumbing, a DIRTY, non-draft PR now:

    1. passes the eligibility gate (all never skips),
    2. is detected as behind (behind_by > 0),
    3. is actually attempted by update-branch (no approval precondition remains),
    4. hits the merge conflict (422) branch, and
    5. posts the existing <!-- auto-rebase-conflict: --> sentinel → dev-lead agentic-rebase path.

    No approval or mergeable_state check short-circuits a DIRTY PR. Confirmed.

    Scope

    Codify the AC4 confirmation as a CI-gated bats regression test so the DIRTY → conflict-sentinel path cannot silently regress (e.g. by reintroducing an approval gate before update-branch).

    Implementation Checklist

    • test/workflows/auto-rebase/conflict-sentinel.bats — new regression guards on the reusable workflow

    Tests to Write

    • update-branch is attempted for eligible behind PRs (DIRTY PRs are no longer skipped)
    • no approval / review-decision precondition gates update-branch
    • a merge conflict update failure branches to the conflict path
    • the conflict path posts the <!-- auto-rebase-conflict: --> dev-lead sentinel
    • the weaker <!-- auto-rebase-stuck --> escalation is absent from this repo's reusable (retired)

    Out of Scope (handoff)

    The primary retirement of the one-time <!-- auto-rebase-stuck --> comment escalation lives in combsmith/.github-private#711 (dev-lead-reusable), a separate repo this dev-lead run cannot modify. It must be removed there as a follow-up; this repo only carries the confirmation + regression guard.

    Test Command

    bats --print-output-on-failure test/workflows/auto-rebase/

  2. don-petry commented on Aug 3, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead: Implementation Complete

    Confirmation (AC4) — CONFIRMED

    Traced .github/workflows/auto-rebase-reusable.yml. Since #927 shipped eligibility: all and removed the approval/review-ready plumbing, a DIRTY, non-draft PR is now handled as:

    1. Eligible — auto_rebase_pr_eligible all always returns 0 (no approval gate).
    2. Behind — a conflicting PR has behind_by > 0, so it is not skipped.
    3. Attempted — PUT /pulls/{n}/update-branch is called (line 156).
    4. Conflict branch — the 422 merge conflict path is taken (line 186).
    5. Sentinel — posts <!-- auto-rebase-conflict:<base_sha> --> (lines 196–228) → dev-lead agentic-rebase.

    No approval or mergeable_state check short-circuits a DIRTY PR before update-branch. The DIRTY → conflict-sentinel → dev-lead path is reached.

    Plan Execution

    • Verified AC4 against the reusable workflow
    • Codified the confirmation as CI-gated bats regression guards (test/workflows/auto-rebase/conflict-sentinel.bats)
    • Proved the new guards fail on a simulated regression (approval gate reintroduced / conflict sentinel dropped / stuck sentinel added)
    • Full bats suite green (19/19) + dev-lead-lint.sh clean

    Test Results

    1..19
    ok 5 conflict-sentinel: reusable workflow file exists
    ok 6 conflict-sentinel: every eligible behind PR is attempted via update-branch
    ok 7 conflict-sentinel: update-branch is not gated on an approval / review decision
    ok 8 conflict-sentinel: a merge-conflict update failure branches to the conflict path
    ok 9 conflict-sentinel: the merge-conflict path posts the <!-- auto-rebase-conflict: --> dev-lead sentinel
    ok 10 conflict-sentinel: the weaker one-time <!-- auto-rebase-stuck --> escalation is absent (retired)
    ... (13 pre-existing tests also pass)
    19 tests, 0 failures
    
    dev-lead-lint.sh: shellcheck (29 files) + CODEOWNERS — all checks passed
    

    Files Changed

    • test/workflows/auto-rebase/conflict-sentinel.bats (new): regression guards pinning the DIRTY → conflict-sentinel path (update-branch attempted, no approval gate, merge-conflict branch posts the <!-- auto-rebase-conflict: --> dev-lead sentinel, <!-- auto-rebase-stuck --> absent). Auto-picked up by auto-rebase-tests.yml (runs the whole dir).

    TDD note (Phase 2 exception)

    The confirmed behavior already shipped in #927, so these are regression/verification guards on already-correct code rather than red→green feature tests. To honor the intent, I demonstrated they fail against a deliberately regressed copy of the reusable before landing them.

    Out of scope / required follow-up

    Retiring the actual weaker one-time <!-- auto-rebase-stuck --> comment escalation is a petry-projects/.github-private change (dev-lead-reusable, tracked by combsmith/.github-private#711). That escalation code does not exist in this (petry-projects/.github) repo — grepped the whole tree, no auto-rebase-stuck reference. It must be removed in .github-private as a follow-up; this repo carries only the AC4 confirmation + a guard that the stuck sentinel is never introduced here.

    Notes

    No behavior change to any workflow or script — verification + test only. No unrelated files touched.

  3. added a commit that references this issue on Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions