Skip to content

pr-queue-hygiene: stale conflict marker never cleared on deconflict; comment lookup unpaginated #432

Closed

Description

@mrbobbytables

Follow-up to #427 / #429, from the code review of #240. Two pre-existing defects remain in scripts/pr-queue-hygiene.mjs:

  1. Stale marker never cleared on deconflict (main(), ~line 195): when a PR stops conflicting, the loop continues without removing the first-conflict marker comment or the needs-rebase-or-close label. If the PR later reconflicts, hoursSince() is computed from the old marker's timestamp, so the PR is flagged as >48h stale immediately instead of getting a fresh 48-hour window.

  2. Comment lookup reads a single unpaginated page (main(), ~line 181): issues/{n}/comments?per_page=100 with no page loop. Issue comments sort ascending, so on a PR with more than 100 comments the marker at the end is never seen — every run posts a duplicate marker and the 48h gate never fires.

Blast radius is labels/comments only (the script never closes PRs), but both defects defeat the 48h grace-period semantics.

Suggested fix: on the non-conflicting path, delete or neutralize the marker (or append a resolved marker and use the latest observation), and paginate the comment listing.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions