Skip to content

feat(roadmap): one watch row for plan and delivery PRs #5024

Description

@dan-petty

Problem or Motivation

No row watches plan and delivery pull requests after their producer ends and routes their state. stage_ready reads each plan draft every 3 min with no backoff (#3671). pr_conflicts reads each ready delivery pull request every 19 min and only comments. No row sees the drift of an open plan pull request against main (#3968). #4574 lists stage_ready but not pr_conflicts as a sweep step.

Proposed Solution & Architectural Design

One status-lane row watch replaces stage_ready and pr_conflicts.

  1. It reads all open roadmap pull requests of a repository with one GraphQL query (headRefOid, isDraft, mergeable, statusCheckRollup), and uses REST with ETag during a GraphQL hold.
  2. It keeps a ledger {pr, head, verdict, next_read_at} and reads a failed head again only on a head or base change, or after 30 min (fix(roadmap): stage_ready backs off after a failed check #3671).
  3. It routes with one pure function due_steps(state), which the sweep uses later for its reconcile: READY gives the ready step; CONFLICT on a person's pull request gives one comment for each head; FAILED or CONFLICT on a bot pull request gives the due mark fix-checks: or fix-conflict: (mode off until the fix Job items); drift gives the feat(roadmap): detect drift against default branch on open plan PRs #3968 mark; MERGED or CLOSED gives the Status writer and cleanup.
  4. It skips a pull request whose item has a live unit.
  5. A gauge counts the GitHub requests of each tick.
  6. The settings of the two old rows leave the ConfigMap before the image rolls (removed-setting rule). Change k8s/README.md (rows) and docs/ROADMAP_WORKFLOW.md (step 3) in the same pull request. fix(roadmap): stage_ready backs off after a failed check #3671 and feat(roadmap): detect drift against default branch on open plan PRs #3968 fold here.

Timeouts: request 30 s < one pull request 60 s < row 240 s < tick 300 s.

Cost: about 1.5M tokens and 1.5 agent-days.

Target Subsystem

Roadmap Service status lane (src/devops_cli/roadmap/run.py), k8s/README.md and docs/ROADMAP_WORKFLOW.md.

Existing Tool Considered

One GitHub GraphQL query for each repository, and REST with ETag during a GraphQL hold.

Acceptance Criteria

  • A table test of due_steps covers each verdict for a bot pull request and for a person's pull request.
  • A row test with the fake GitHub sends 1 GraphQL request for each repository and tick, and does not read a failed head again within 30 min.
  • The rows stage_ready and pr_conflicts are gone from src/devops_cli/roadmap/run.py.
  • A dry-run test sees 0 requests.

Dependencies

Source: #5014

Owner decision 2026-11-13

This replaces the due-mark part of item 3 of the Proposed Solution. The approved pipeline split (tracker #5482, Phase 3) removes the due marks:

Alternatives check of 2026-11-15: in-use.
The repository already uses this tool.
Tool: gidgethub/gidgethub (https://github.com/gidgethub/gidgethub), Apache-2.0, last activity 2026-09-25, maintained.

Activity

  1. added
    source/agent
    on Nov 12, 2026
  2. added
    type/feature
    scope/roadmap
    status/new
    value/high
    effort/high
    on Nov 12, 2026
  3. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor
  4. added
    priority/p2-medium
    on Nov 12, 2026
  5. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Alternatives check: in-use

    Reason: The searches found no open watcher tool that polls GitHub pull-request state and routes it; they returned only generic pages. gidgethub, the project's GitHub session per ADR 0006, does cover the access layer the row needs (GraphQL queries and REST requests with ETag/conditional handling) but none of the ledger, backoff, routing or sweep work.

    The repository already uses this tool.

    Tool: gidgethub/gidgethub (https://github.com/gidgethub/gidgethub)

    • License: Apache-2.0
    • Last activity: 2026-09-25
    • Maintained: yes

    Covers:

    • Sends GraphQL queries to GitHub, so one query per repository can read the open pull requests
    • Sends REST requests and supports ETag/conditional handling for the fallback during a GraphQL hold
    • An async Python client, already the project's chosen GitHub session

    Lacks:

    • The ledger {pr, head, verdict, next_read_at} and the 30-minute re-read rule
    • The due_steps routing to ready, comment, fix, drift, status and cleanup steps
    • Skipping a pull request whose item has a live unit
    • The per-tick GitHub request gauge and the sweep reconcile
    • Removing stage_ready and pr_conflicts and updating the two documents

    Tools considered:

    Searches run:

    • library poll GitHub open pull requests GraphQL mergeable statusCheckRollup ETag caching, results: 5
    • open source tool watch pull requests mergeable state backoff GitHub API, results: 5
    • prow tide github pull request merge automation open source, results: 5
    • gidgethub GraphQL ETag conditional requests documentation, results: 5
    • gidgethub GitHub API client async Python, results: 5
    • hishel HTTP cache httpx ETag, results: 5
    • site:github.com gidgethub, results: 5
    • mergify pull request merge automation, results: 5
    • gidgethub readthedocs conditional requests etag graphql, results: 5

    Sources:

    Checked on 2026-11-15. A person decides what this means for the item. The check changes no label and closes no issue.

  6. added
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 16, 2026
  7. removed
    status/in-review
    on Nov 16, 2026
  8. added a commit that references this issue on Nov 16, 2026
  9. devops-cli-service commented on Nov 16, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-16 03:02 UTC

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

    effort/highpriority/p2-mediumscope/roadmapsource/agenttype/featurevalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions