Skip to content

[bug] dismiss-stale-bot-reviews is missing from this repo — a stale bot CHANGES_REQUESTED blocks PRs forever (blocking #1094) #1115

Open

Description

@don-petry

The gap

petry-projects/.github-private carries .github/workflows/dismiss-stale-bot-reviews.yml. This repo does not. So in petry-projects/.github, a bot's CHANGES_REQUESTED review survives every subsequent push and blocks reviewDecision indefinitely, with no automated recovery.

That workflow's own header states the mechanism:

Agent-PR merge friction (#617, blocker 3): a bot's CHANGES_REQUESTED review is NOT cleared by GitHub's dismiss_stale_reviews_on_push (that only dismisses stale approvals), so it persists on a superseded commit and blocks reviewDecision even with 0 unresolved threads — until the bot re-APPROVEs or a human dismisses it by hand.

Live instance right now — PR #1094

#1094 — feat: implement issue #1091 — Cut a standards release channel is stuck in exactly this state:

reviewDecision   CHANGES_REQUESTED
mergeStateStatus BLOCKED
statusCheckRollup SUCCESS        (CI green)
unresolved threads  0            (nothing outstanding)

blocking review: coderabbitai[bot] CHANGES_REQUESTED
                 submitted 2026-09-08T03:30:38Z on sha aca48dc4
current head:    8e5bc8db, committed 2026-09-10T12:12:03Z

Two days and several commits newer than the review that blocks it, with nothing left to address. It cannot merge and nothing in this repo will ever clear it.

This is not a cosmetic stall. #1094 is the prerequisite for combsmith/.github-private#1707 — validate-personas fetches the org schema from main unpinned, which is itself the fix for the 2026-09-07 outage where an org-repo merge red-lined every open PR in .github-private in 21 seconds. So a missing workflow in this repo is currently blocking the remediation of a cross-repo outage.

Acceptance criteria

  1. .github/workflows/dismiss-stale-bot-reviews.yml exists in this repo and dismisses an allow-listed bot's CHANGES_REQUESTED review once a newer commit has been pushed (the review sits on a non-head SHA).
  2. It is deployed by the standard mechanism, not hand-copied. If this workflow belongs in the org-standard stub set, add it to scripts/deploy-standard-workflows.sh / the standards/workflows/ tree so every repo gets it, rather than fixing one repo by hand. State which path was chosen and why.
  3. The allow-list and the superseded-commit condition match .github-private's implementation — it must only ever touch reviews left by allow-listed bots, and only ones on a commit that is no longer head. A still-valid finding returns as a fresh CHANGES_REQUESTED on the new SHA.
  4. PR feat: implement issue #1091 — Cut a standards release channel (standards/v1-stable) — consumers pin to it today but it has never existed #1094 unblocks. After the workflow lands (or as an explicit one-off operator step recorded in the PR), feat: implement issue #1091 — Cut a standards release channel (standards/v1-stable) — consumers pin to it today but it has never existed #1094's stale review is dismissed and it can merge on its own merits.
  5. A test covers the decision — dismiss when the review is on a superseded commit, do not dismiss when it is on the current head.

Out of scope

  • Changing what any bot reviews or how it decides.
  • Dismissing human reviews. This is bot-only, deliberately.

Dev Notes


Observed 2026-09-12. A manual dismissal of #1094's stale review was attempted and is pending maintainer action; the durable fix is this workflow.

Activity

  1. added
    bugBug reports
    dev-leadFor dev-lead agent pickup
    in-progressAn agent is actively working this issue
    on Sep 12, 2026
  2. don-petry commented on Sep 12, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead Implementation Plan

    Issue: #1115 — [bug] dismiss-stale-bot-reviews is missing from this repo — a stale bot CHANGES_REQUESTED blocks PRs forever (blocking #1094)

    Scope

    Add an org-standard dismiss-stale-bot-reviews workflow that dismisses an allow-listed bot's CHANGES_REQUESTED review once a newer commit has been pushed (review sits on a non-head SHA), deployed through the standard stub mechanism, with the dismiss/keep decision extracted into a pure, bats-tested script.

    Architecture decision (AC #2 — "state which path and why")

    This lands as a self-contained (VERBATIM-class) standard template, not a thin-caller-stub backed by a new reusable channel. Reason: a reusable-backed stub must pin <agent>/v<M>-stable (vform-pins.bats), and that channel tag can only be cut after the reusable merges (cut-release.sh), which is impossible in a single PR and is exactly the channel-skew footgun the repo guards against (#1052). The verbatim class (like initiative-driver.yml) is the only single-PR-viable path. To still honour AGENTS.md "decision logic lives in a pure, tested script", the decision is a pure sourceable function in scripts/; the workflow fetches it at runtime from petry-projects/.github@v1 — mirroring how initiative-driver fetches agent-rate-limit-gate.sh.

    Implementation Checklist

    • scripts/lib/dismiss-stale-bot-reviews.sh — pure, side-effect-free decision core (dsbr_is_allowlisted_bot, dsbr_should_dismiss): dismiss iff CHANGES_REQUESTED + allow-listed bot + review commit ≠ current head.
    • scripts/dismiss-stale-bot-reviews.sh — thin I/O glue: gather reviews via gh api graphql, call the pure core, dismiss via dismissPullRequestReview.
    • standards/workflows/dismiss-stale-bot-reviews.yml — canonical self-contained template; pull_request:[synchronize] + pull_request_review:[submitted] triggers; pull-requests: write; fetches decision tooling from .github@v1; fail-closed (never dismiss if tooling/facts unavailable).
    • .github/workflows/dismiss-stale-bot-reviews.yml — self-hosted copy for this repo (this repo is a deploy SKIP_REPO / self-manager), byte-identical to the template.
    • scripts/deploy-standard-workflows.sh — add to DEPLOYABLE_WORKFLOWS (so the sweep deploys it fleet-wide) and SKIP_SELF_MANAGED for .github / .github-private.
    • test/scripts/standards-templates/vform-pins.bats — add the new template to the VERBATIM classification (it carries no first-party reusable channel-ref line).
    • .github/workflows/dismiss-stale-bot-reviews-tests.yml — CI gate running the bats decision suite on PRs touching these paths.
    • scripts/dismiss-stale-bot-reviews/README.md (or header docs) — decision contract + allow-list override.

    Tests to Write

    PR #1094 (AC #4)

    Once the workflow lands, #1094's stale review is superseded (head 8e5bc8db ≠ review sha aca48dc4) and will be dismissed on the next synchronize; a one-off operator dismissal is already pending per the issue. Recorded in the PR.

    Test Command

    bats --print-output-on-failure test/workflows/dismiss-stale-bot-reviews/ test/scripts/standards-templates/ test/scripts/deploy-standard-workflows/ and bash .dev-lead/scripts/dev-lead-lint.sh

  3. don-petry commented on Sep 12, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead: Progress (in progress — not yet durable)

    Provisional. Nothing is pushed yet; the automation posts the authoritative
    completion record (with PR number + head SHA) after the push. Treat the notes
    below as intent, not delivered results.

    Architecture decision (AC #2 — "state which path and why")

    Landed as a self-contained VERBATIM-class standard template (the
    initiative-driver.yml class), not a thin-caller stub backed by a new
    reusable channel. A reusable-backed stub must pin <agent>/v<M>-stable
    (vform-pins.bats), and that channel tag can only be cut after the reusable
    merges (cut-release.sh) — impossible in one PR and exactly the channel-skew
    footgun the repo guards against. The verbatim class is the only single-PR-viable
    path. To still honour AGENTS.md "decision logic lives in a pure, tested script",
    the dismiss/keep decision is a pure sourceable core; the workflow fetches it from
    petry-projects/.github@v1 at runtime — the same tooling-checkout pattern
    initiative-driver uses for the rate-limit gate. It is bot-only and only ever
    dismisses a review on a non-head commit.

    Files touched (this workspace, not yet pushed)

    • scripts/lib/dismiss-stale-bot-reviews.sh — pure decision core (dsbr_should_dismiss, dsbr_is_allowlisted_bot); side-effect/network-free.
    • scripts/dismiss-stale-bot-reviews.sh — thin glue: GraphQL read of effective reviews → core → dismissPullRequestReview.
    • standards/workflows/dismiss-stale-bot-reviews.yml — canonical template; pull_request:[synchronize] + pull_request_review:[submitted]; pull-requests: write; fork-guarded; fail-closed.
    • .github/workflows/dismiss-stale-bot-reviews.yml — byte-identical self-hosted copy for this repo (a deploy SKIP_REPO / self-manager).
    • .github/workflows/dismiss-stale-bot-reviews-tests.yml — bats CI gate.
    • scripts/deploy-standard-workflows.sh — added to DEPLOYABLE_WORKFLOWS (fleet sweep distributes it).
    • test/scripts/standards-templates/vform-pins.bats — classified the new template as verbatim.
    • test/workflows/dismiss-stale-bot-reviews/{decision,orchestrator}.bats — decision matrix + mocked-gh end-to-end.

    Local check output (provisional — NOT the pushed run)

    Intent only; these were run in this throwaway workspace and are not evidence of
    the landed state: the decision/orchestrator bats, the standards-templates and
    deploy guard suites, shellcheck -x, dev-lead-lint.sh, yamllint (repo
    config) and actionlint were exercised locally while iterating.

    Notes on AC #4 (PR #1094)

    I do not push or mutate PRs. Once this lands, #1094's stale review (on aca48dc4,
    head now 8e5bc8db) is dismissed on its next synchronize. For an immediate
    unblock an operator can run, as a one-off:
    GH_TOKEN=… bash scripts/dismiss-stale-bot-reviews.sh --owner petry-projects --name .github --pr 1094
    (a manual dismissal was already recorded as pending on the issue).

  4. don-petry commented on Sep 12, 2026

    @don-petry
    ContributorAuthor

    Dev-Lead: Implementation Complete — PR #1116

    The implementation for issue #1115 is durable: commits are pushed and a pull request is open. This record is backed by verifiable artifacts you can confirm in one click.

    Review happens on the PR. Acceptance criteria and test results are evidenced by the PR's diff and CI checks — not asserted here. If a later stage fails, this claim is retracted in place.

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

    bugBug reportsdev-leadFor dev-lead agent pickupin-progressAn agent is actively working this issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions