Skip to content

PR status line: stop spending the App installation rate limit on unchanged or bursty edits #3727

Closed

Description

@integry

Problem

On 2026-11-17 the GitHub App installation rate limit ran out for about nine minutes with roughly 16 pull requests in flight (issue #3680, item 10). During that time post-processing failed on several PRs (titles left as "Fix issue #N", no review or summary posted, follow-up comments not picked up). The largest consumer was the PR status line: ProPR edits the PR body/title status on check completions, so a head with ~50 checks causes dozens of edits per PR per push.

Expected

  • No PR body or title edit is sent when the rendered status would be identical to what ProPR last wrote for that PR.
  • Status edits caused by check completions are coalesced per pull request: at most one edit per PR per short window (choose a window around 30–60 s), always ending with one edit that reflects the latest state, so the final status is never stale. Edits for state changes a person waits on (run started, run finished, review score, merge-ready, suspended) are not delayed by more than that window.
  • When the installation's remaining rate limit is low (use the x-ratelimit-remaining already returned by GitHub; pick a threshold and say which), check-completion status edits are skipped until the limit recovers, and work that must not be lost (opening the PR, final summary, review comment, labels) keeps priority.
  • A log line (not a PR comment) records each time edits were skipped for rate-limit reasons, with the remaining budget.

Acceptance

  • Unit tests: identical status → no request; 20 check completions within the window → one or two edits and the last reflects the final state; low remaining budget → check-driven edits skipped while a completion summary still goes out.
  • A short note in the docs page that describes the PR status line saying that check progress can lag by up to the window.
  • Existing status block tests still pass.

Implementation

Start from packages/core/src/services/pullRequestStatus/pullRequestStatusBlock.ts and its callers; find every place that edits the PR body or title for status purposes and route them through one writer that holds the last-written value, the coalescing timer and the budget check. The workers are separate processes, so the last-written value and the coalescing state must live in Redis (the repository already uses it for locks and queues), not in process memory. Measure before and after in the test by counting requests on a fake GitHub client. Do not change the status text itself.

Activity

  1. propr-dev commented on Nov 19, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: claude
    • Model: claude-opus-5-5
    • Branch: 3727/claude-opus-5-5-pr-status-line-stop-spend-20261119-0926-bz6
    • Base Branch: 3725-epic-0-9-0ws
    • Worktree: issue-3727-20261119-0926-claude-opus-5-5-bz6

    🔍 Track Task Execution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions