Skip to content

chore(pr-pipeline): pr-merge dispatch and read-token review follow-ups #9355

Description

@kyle-sexton

Refs: #9297

Summary

Optional review suggestions from Automation Lanes on #9350 and #9354, deferred so the reviewed heads could merge.

Fix

  1. plugins/source-control/skills/babysit-prs/scripts/tests/test_babysit_gh.py (about lines 599-605): replace the hand-written gh stderr strings for rate-limit detection with text captured from real gh runs, and name the run each came from.
  2. .github/workflows/pr-merge.yml (about lines 250 and 1305): also resend on Go's net/http: TLS handshake timeout; it fails before the request is sent, so it is a safe retry.
  3. .github/workflows/pr-merge.yml: reword the exhausted-retry warning. The scheduled pickup re-dispatches only lane merges; a merge from outside the lane waits for the next push or pr-require-checks' own schedule.
  4. The rerun-failed-jobs POST and the post-merge-demotion-alert dispatch POST still have no Q677 retry (noted on fix(pr-pipeline): retry pr-merge's full-run dispatch on a rate limit #9346).

Verification

  • node --test .github/scripts/pr-merge/*.test.mjs and the babysit-prs unittest suite pass; a test covers the TLS handshake timeout resend.

Related

#9346, #9350, #9354, #9205

🤖 Generated with Claude Code

Activity

  1. added
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    on Oct 23, 2026
  2. added theissue type on Oct 23, 2026
  3. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 23, 2026
  4. github-actions commented on Oct 23, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Medium
    Complexity: Medium
    Uncertainty: Knowable
    Flags: none
    Blocked by: none

    Understood: this is a bundle of four follow-ups to the pr-merge workflow and the babysit-prs tests. (1) Replace the hand-written gh rate-limit stderr strings in the tests with captured real output. (2) Also resend on Go's net/http: TLS handshake timeout, with a test. (3) Reword the exhausted-retry warning. (4) Add Q677 retry to the rerun-failed-jobs POST and the post-merge-demotion-alert dispatch POST.

    Item 1 depends on finding real gh output and naming the run it came from. That could take some searching, but it doesn't need a decision. The issue doesn't list the - [ ] task list that issue-lane admission needs, which an earlier lane comment already noted. No likely duplicates found among the open issues.

    Automated triage, applied by the lanes App.

  5. added and removed
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Oct 23, 2026
  6. melodic-automation-lanes commented on Oct 23, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: no trusted-human acceptance criteria: a listed human must put the confirmed - [ ] criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  7. kyle-sexton commented on Oct 26, 2026

    @kyle-sexton
    MemberAuthor

    Released for re-triage under the owner's 2026-10-24 rule: an issue stops for a person only for an intent or vision question, a security call, a host or attended run, or spend outside prepaid credit. The hold label came off and intake triage runs again now; it re-applies a hold, with a numbered question, when one of those applies.

    To hold this issue again, add needs-human (or status: needs-decision) and say why in a comment.

  8. added
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    needs-owner-decisionAwaiting a human or maintainer judgment call.
    and removed
    status: readyTriaged, unblocked, and fully specified; eligible to pick up.
    on Oct 26, 2026
  9. melodic-automation-lanes commented on Oct 26, 2026

    @melodic-automation-lanes
    Contributor

    The latest triage verdict holds nothing: admission moved the issue to status: needs-decision; its comment says why.

  10. melodic-automation-lanes commented on Oct 26, 2026

    @melodic-automation-lanes
    Contributor

    Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.

    Intended outcome: Resend on a TLS handshake timeout at both dispatch loops with a test, reword the exhausted-retry warning, add Q677 retry to the rerun and demotion-alert POSTs, and replace the hand-written rate-limit stderr strings with captured gh output.

    Related work

    Open questions

    1. Item 1 asks for gh stderr captured from real rate-limit runs, naming the run. An unattended run cannot trigger or find such a run. May the lane drop item 1?
      RECOMMENDED: Yes: leave item 1 to a person and let the lane do items 2 to 4. Basis: plugins/source-control/skills/babysit-prs/scripts/tests/test_babysit_postmerge.py:4014
    2. The issue puts the hand-written strings in test_babysit_gh.py lines 599-605, but that file has no rate-limit strings; they are in test_babysit_postmerge.py around line 4014. Is that the intended test?
      RECOMMENDED: Yes, treat test_babysit_postmerge.py:4012-4016 as the target. Basis: plugins/source-control/skills/babysit-prs/scripts/tests/test_babysit_postmerge.py:4014
    3. Item 2: should the TLS handshake timeout be added to both dispatch retry loops, matching the text 'net/http: TLS handshake timeout'?
      RECOMMENDED: Yes, extend the grep at pr-merge.yml:295 and pr-merge.yml:1767, and add a test in .github/scripts/pr-merge/workflow.test.mjs. Basis: .github/workflows/pr-merge.yml:295
    4. Item 3: both warnings (pr-merge.yml:316 and :1788) say 'the next push or scheduled pr-merge run starts one'. What should the reworded text say?
      RECOMMENDED: Say the scheduled pickup re-dispatches only lane merges; a merge from outside the lane waits for the next push or pr-require-checks' own schedule. Basis: .github/workflows/pr-merge.yml:316
    5. Item 4: how many attempts and what backoff should the rerun-failed-jobs POST (pr-merge.yml:362) and the demotion-alert dispatch POST (pr-merge.yml:1833) use?
      RECOMMENDED: Reuse the 3-try loop and backoff of the full-run dispatch at pr-merge.yml:264-314. Basis: .github/workflows/pr-merge.yml:264

    Sources read

    • https:/​/github.com/ (not fetched)
    • .github/workflows/pr-merge.yml:295: the first dispatch loop resends only on 'dial tcp' or 'tls: (handshake|first record)' stderr, with no TLS handshake timeout match
    • .github/workflows/pr-merge.yml:1767: the second dispatch loop has the same grep
    • .github/workflows/pr-merge.yml:316: warning says 'the next push or scheduled pr-merge run starts one'
    • .github/workflows/pr-merge.yml:362: the rerun-failed-jobs POST has a single attempt
    • .github/workflows/pr-merge.yml:1833: the demotion-alert dispatch POST has a single attempt
    • plugins/source-control/skills/babysit-prs/scripts/tests/test_babysit_postmerge.py:4014: the hand-written 'gh: API rate limit exceeded (HTTP 403)' string

    Automated refinement by the lanes App. Answer with a comment whose first line is **Decision recorded.**.

  11. kyle-sexton commented on Oct 26, 2026

    @kyle-sexton
    MemberAuthor

    Builder: the poteto session builds this after #9920 merges (they edit the same pr-merge.yml regions). The fix edits .github/workflows/pr-merge.yml, which the lanes App cannot push; that boundary stays. Not a duplicate of #9549: that one covers the JS lane scripts' fetch clients, this one covers pr-merge.yml's shell gh calls and test_babysit_gh.py; they share only the Q677 retry rule. needs-human came off under the owner's 2026-10-26 rule; none of its three reasons applies. agent-ready stays off.

  12. added
    status: confirmedA maintainer confirmed the item is real and in scope; ready to be worked.
    and removed
    needs-owner-decisionAwaiting a human or maintainer judgment call.
    on Oct 26, 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

    status: confirmedA maintainer confirmed the item is real and in scope; ready to be worked.

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions