Skip to content

Report where merged and stalled PRs spend their time聽#802

Description

@justin808

馃 Codex

Outcome

Produce a small, repeatable report showing why PRs take time to merge. Include merged and still-open PRs so stalled work is not hidden. Reuse the normalized telemetry helper from #562 and existing records; do not build a dashboard or a new coordination service.

Recommendation: fix now / P1. Evidence source: maintainer-observed throughput problems and CI measurements.

Evidence

On September 9 UTC, a sample of nine successful Validate jobs had a 33.6-minute median. Run 34318857089 spent 22.67 minutes in installer/stack tests and 13.38 minutes in two helper sections. Three canceled jobs in the 12-completed-run sample consumed 44.3 job-minutes. At that observation, 30 of 55 open PRs had conflicts and 30 were drafts; those sets overlap. These are directional observations, not complete historical attribution.

First deliverable

  • Accept a repository and bounded time range or PR list.
  • Fetch field-selected GitHub issue/PR/run/job metadata; use existing attributable workflow phase records when available.
  • Report new PRs, merges, age of open PRs, approval-to-merge delay where authentic approval is attributable, CI queue time versus execution time, canceled execution time, repeated full runs per head/PR, and conflict/rebase events where recorded.
  • Separate elapsed critical-path time from summed concurrent executor time. Do not count overlapping jobs as additive PR delay.
  • Include both completed and pending work. Treat still-open intervals as open/censored, not completed durations. Distinguish bot comments from actual human decisions.
  • Keep local compute, remote-model waiting, CI, reviews, human decisions and restart/recovery waits distinct when evidence supports it. Missing attribution is UNKNOWN, not zero or inferred from silence.
  • Emit one compact JSON and readable report with source URLs, sample/window boundaries, pagination coverage and missing-field counts. Avoid raw transcripts, prompts, credentials and private operational details.

Acceptance

  1. A replay fixture exercises merged PRs, stalled PRs, overlapping jobs, canceled/superseded runs, missing records, and an answered decision that still waits for execution.
  2. The report reproduces selected public job timings and flags unavailable attribution without inventing percentages.
  3. It identifies the three largest measured delays and links to actionable evidence; no new mandatory worker fields or merge gates.
  4. Query volume is bounded and repeated unchanged runs do not fetch entire histories. Reuse Collect directional human-agent workflow telemetry聽#562 rather than replacing its contract.

Mechanism target: script. Motivating miss: backlog counts and busy-agent messages fail to explain delay. Replay evidence: public Actions metadata plus deterministic fixtures. Non-goal: a scheduler, token-accounting platform, dashboard, or automatic policy changes.

Implementation prompt

Reconcile current ownership, read #562's implemented helper, and implement the smallest report with a bounded GitHub collector and optional existing normalized records. Start with CI and PR lifecycle facts already available. Preserve UNKNOWN for human/work-phase data not yet captured. Publish a focused PR with a reproducible example and fixture tests. Coordinate with #726 and #747 without blocking their implementation.

Activity

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

    P2Useful follow-up: schedule after higher-impact workcomplexity:complexifyAdds enduring logic, modes, contracts or operational obligations; value is judged separately.triage:parkDefer during backlog reduction; requires fresh evidence or explicit reprioritization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions