Skip to content

pr-pipeline: review lanes wait 20-37 min behind a Refine fix-docs run that changes nothing #14292

Closed

Description

@kyle-sexton

Problem

The review lanes wait in wait-refine for the whole PR Refine run, and its fix-docs agent leg can run for half an hour even when it changes nothing. ci-status gives the reviews 480s, so it goes red on most fresh PRs, and the reviews (and the merge) wait on Refine.

Evidence

Expected

Review starts within a few minutes of the ready flip when Refine has nothing to change; ci-status's wait covers the normal case.

Possible fixes (not evaluated)

  • Bound the fix-docs leg well below 60 minutes, or skip it when the docs diff is small.
  • Let review start on the head once Refine reports no change is coming, rather than after the full run.
  • Size ci-status's review wait from measured Refine durations.

Refs: #13717 (Refine before review, closed).

🤖 Generated with Claude Code

https://claude.ai/code/session_015XWwmeNJQuDSqTkQAr6zCT

Activity

  1. added
    needs-triage
    on Nov 9, 2026
  2. github-actions commented on Nov 9, 2026

    @github-actions
    Contributor

    Size: Medium
    Complexity: Medium
    Uncertainty: Knowable
    Flags: none
    Blocked by: none
    Blast radius: the PR Refine workflow's planning jobs (check-dispatcher-current, select-passes, fix-docs-head) and the review lanes' wait; every PR that goes through Refine and review.
    Reversible: yes; revert the workflow change.
    Open questions: none
    Understood: review lanes sit in wait-refine behind a Refine run that changes nothing, so ci-status goes red. Measurements on this issue show the cause is runner queueing across about 15 serial jobs per Refine run, not the fix-docs leg's run time.

    Decision recorded. Merge PR Refine's three planning jobs (check-dispatcher-current, select-passes, fix-docs-head) into one select-passes job (#17552). The owner answered in an agent session on 2026-11-19, verbatim: "go w/ recommendations". Recommendation put to the owner: merge; all three jobs run only main-branch code with read-only tokens, and the merge removes up to 2 runner-queue waits per Refine run.

    #14292 (comment)

    This decision settles the open design question, so no owner question remains. The earlier #16889 change is merged, and #17552 is referenced by the decision. The merged-pulls list I was given was empty, so I could not check whether #17552 has merged.

    Automated triage. A maintainer reviews it.

  3. removed
    needs-triage
    on Nov 9, 2026
  4. melodic-automation-lanes commented on Nov 9, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: it carries host-run. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  5. melodic-automation-lanes commented on Nov 9, 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: Review lanes start within a few minutes of ready when Refine's fix-docs leg has nothing to change, most likely by bounding or short-circuiting the fix-docs leg and/or ending wait-refine early.

    Related work

    Open questions

    1. Which fix should this issue deliver: bound the fix-docs leg timeout, skip the leg on small docs diffs, let wait-refine end early when no change is coming, or resize ci-status's REVIEW_WAIT_SECONDS?
      RECOMMENDED: Let wait-refine end early once Refine reports no change is coming, plus a lower fix-docs timeout, so review no longer waits on an idle agent run. Basis: judgment
    2. What fix-docs timeout is acceptable? Lowering it risks cutting off legitimate fixes. The job cap is 60 minutes in three legs (subscription, fallback, and the first run).
      RECOMMENDED: 15 minutes on each fix-docs leg, based on the observed 20-37 minute no-change runs; the owner should confirm against the durations of runs that did push a commit. Basis: .github/workflows/pr-refine.yml:419
    3. Should wait-refine's cap (2400s) and ci-status's 480s review wait be changed or aligned? Today ci-status goes red at 480s while wait-refine may hold review up to 2400s.
      RECOMMENDED: Keep ci-status at 480s and shorten the wait-refine path, since the expected outcome is review starting within a few minutes. Basis: .github/scripts/pr-review/wait-refine.mjs:28
    4. How does the pipeline know Refine has nothing to change before the run ends? That needs a signal from the fix-docs agent leg, for example an early no-change check result the review wait can read.
      RECOMMENDED: Decide the signal first: a cheap pre-check job in pr-refine.yml that posts no-change before the agent leg starts. Basis: judgment

    Sources read

    • .github/workflows/pr-refine.yml:419: fix-docs job timeout-minutes is 60; the subscription leg (line 623) and the fallback leg (line 716) are also 60.
    • .github/scripts/pr-review/wait-refine.mjs:28: default wait cap is 2400s, appear 300s, poll 30s.
    • .github/workflows/pr-require-checks.yml:7016: REVIEW_WAIT_SECONDS is 480 for ci-status, 0 for label events.
    • .github/workflows/pr-review-hosted.yml:245: wait-refine job gates the review job.

    To answer, post a comment that starts with this line:

    **Decision recorded.** <answer>
    

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

  6. kyle-sexton commented on Nov 17, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded. Cap each fix-docs leg of PR Refine at 15 minutes and lower the wait-refine cap to match (option A).

    Question as put to the owner (Q30): "Review lanes wait 20 to 37 minutes behind a docs-fix run that changes nothing."

    • A (recommended): cap each docs-fix leg at 15 minutes and lower the wait cap.
    • B: add a no-change pre-check.
    • C: drop the wait.

    Chosen: A. The owner answered the batch on 2026-11-17, typed in an agent session, verbatim: "Go with recommendations."

    This change edits a workflow file, which a lane patch cannot touch (.github/actions/resolve-config/patch-rules.json:3), so a host session builds it.

    Acceptance criteria

    • Every fix-docs leg in .github/workflows/pr-refine.yml (the first run, the subscription leg and the fallback leg) has timeout-minutes: 15, down from 60.
    • The default wait cap in .github/scripts/pr-review/wait-refine.mjs is lowered from 2400 s to match the 15-minute leg cap, and the pull request body states the new value and how it was derived.
    • Tests that pin the wait-refine cap or the fix-docs timeouts are updated to the new values, and CI passes.
    • No pre-check job is added and the review lanes still wait for Refine (options B and C were not chosen).

    Posted by an agent session.

  7. added
    host-run
    on Nov 17, 2026
  8. github-actions commented on Nov 17, 2026

    @github-actions
    Contributor

    A listed human released the issue's Work status hold, so it goes back to intake triage.

  9. kyle-sexton commented on Nov 17, 2026

    @kyle-sexton
    MemberAuthor

    #16889 is merged; this issue stays open, because the measured cause of the wait is not the leg's run time.

    What #16889 delivered (the owner's chosen option: cap each docs-fix leg at 15 minutes and lower the wait cap):

    • The fix-docs run job timeout is 30 minutes on all three legs, down from 60. The runner refuses a job timeout of 15 or less and gives the model leg 15 minutes less than the job, so 30 is the value that caps the leg at 15.
    • The review lanes' wait cap is 1800 seconds, down from 2400.

    What was measured (2026-11-15 to 2026-11-17):

    • 101 fix-docs legs: the launcher step ran a median 0.0 minutes, p90 0.7, longest 3.1. None reached 15 minutes, so the leg cap almost never fires.
    • 185 fix-docs runs, wall time: median 7.2 minutes, p90 18.9, longest 71.2. 18 ran over 20 minutes.
    • The long runs are queue time. One run waited 70.3 of its 71.2 minutes before its first job. Three runs read job by job had about 15 serial jobs each, each waiting 1 to 6 minutes for a runner: 47.8 to 49.3 minutes of queueing per run against 0.4 to 2.8 minutes of leg time.

    A leg that does hit the cap ends red and posts its failed check; the dispatcher skips a head that already has that check, so it is not dispatched again.

    Left on this issue: the wait comes from about 15 serial jobs per Refine run queueing for runners. Whether that is the runner concurrency limit or the per-pull-request write queue was not told apart. Cutting it means fewer serial jobs per run or a different wait, which is a design choice for the owner.

  10. kyle-sexton commented on Nov 20, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded. Merge PR Refine's three planning jobs (check-dispatcher-current, select-passes, fix-docs-head) into one select-passes job (#17552). The owner answered in an agent session on 2026-11-19, verbatim: "go w/ recommendations". Recommendation put to the owner: merge; all three jobs run only main-branch code with read-only tokens, and the merge removes up to 2 runner-queue waits per Refine run.

  11. updated Work status needs-triage and Priority high on Nov 20, 2026
  12. kyle-sexton commented on Nov 21, 2026

    @kyle-sexton
    MemberAuthor

    Closing: the Expected line is met in the normal case.

    Delivered: #16889 (fix-docs job timeout 30 min, so each leg is capped at 15) and #17552 (Refine's three planning jobs merged into one; on main at 426cfdb, 2026-11-20 02:19:56Z).

    Measured (pr-refine.yml runs, createdAt to updatedAt, 68 runs each side):

    before #17552 (11-19 14:19Z to 11-20 02:18Z) after (11-20 02:29Z to 11-21 03:16Z)
    median 238 s 40 s
    p90 816 s 433 s
    max 1387 s (run) 857 s (run)
    over 20 min 2 0
    • The review lanes wait at most 1800 s for Refine (.github/scripts/pr-review/wait-refine.mjs:39, capSeconds: 1800). The slowest run since perf(ci): merge Refine's three plan jobs into one #17552 took 857 s, under half of that.
    • The median run now finishes in under a minute.
    • In the five longest runs after the merge, queue waits between jobs are 2 to 30 s, and none is longer than about 50 s. Job time dominates now: the fix-docs legs take 69 to 266 s. The queue-time cause measured on 11-17 no longer holds.

    Not shown: these numbers do not separate #17552's effect from #16889's or from a change in the mix of runs. I did not read whether CI Status still fails on the review wait.

    🤖 Generated with Claude Code

  13. removed
    host-run
    on Nov 21, 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

    No labels
    No labels

    Type

    Fields

    Work status

    confirmed

    Priority

    high

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions