Skip to content

refactor(roadmap): roadmap run decides whether closure made reprioritize due from the milestones closure read, with no board or issue read #1416

Closed as not planned

Description

@dan-petty

Refreshed plan (2026-10-17, unblocking review)

This section supersedes any text below that conflicts with it.

Decisions

Scope

Delivery

Acceptance criteria

  • tests/test_roadmap_run.py: a round whose closure closes one shipped item and one current item makes reprioritize due, and one that closes only a shipped item does not; neither reads the store after closure (a store whose item() raises, or a count of reads at the process edge).
  • tests/test_roadmap_run.py: a round whose closure closes an issue with no milestone, or one in a later release, named by a pull request merged into the current release branch, does not make reprioritize due.
  • tests/test_roadmap_close.py: each Closing in a plan carries the milestone title its issue had in the store.issues() read, for shipped, current and no-milestone issues.
  • JobOutcome.closed_items no longer exists; test_due_table_scenarios and test_order_and_cross_job_triggers stub closure with Change(kind=ChangeKind.CLOSED, release=...) instead.
  • Tests are offline, each call phase stays under 1 s, and uv run devops ci passes.
  • A changelog.d/1416.md fragment exists under ### Changed.

Current references (verified at 3dd7fa6; unchanged at the release/v0.2.37 head 4ee3e01)

  • _reprioritize_cross_job: src/devops_cli/roadmap/run.py:403-421, with store.item reads at :411 and :418; registered as the reprioritize row's cross_job_predicate at :670 and evaluated at :878-879 (dry run :821-822).
  • _run_close_adapter: run.py:483-543; a local closed_items taken from plan.closings at :501; each Change built with no release at :534-542.
  • JobOutcome.closed_items: declared at run.py:121, read only at :410 and set only at :543 (from the adapter's local of the same name, :501 and :541).
  • GitHubRoadmapStore.item: src/devops_cli/roadmap/github_store.py:1462-1468 (board read :1464, REST issue read :1467).
  • Closing: src/devops_cli/roadmap/close.py:93-99, built only at :310 inside _closings (:274-313), which is called for shipped releases at :376 and for the current release at :452.
  • plan_close reads every issue once at close.py:411 and hands every issue a shipped release did not close to the current release's _closings (:431-432, :452).
  • Change.release: src/devops_cli/roadmap/store.py:311; IssueRecord.release: store.py:335; in_release: store.py:538-540.
  • Person-run path: src/devops_cli/commands/roadmap.py:577 calls run_due_jobs (run.py:919).
  • Tests that stub closed_items today: tests/test_roadmap_run.py:299-300 and :329 (test_due_table_scenarios, :232), and :463 (test_order_and_cross_job_triggers, :422).
  • chore(service): the roadmap service stays at 0 replicas, and its development is blocked, while its machine account is suspended #1562's exemption for jobs the CLI also runs: docs/agent/tasks/task-1562-suspend-roadmap-service.md:19 (the same line lists refactor(roadmap): roadmap run decides whether closure made reprioritize due from the milestones closure read, with no board or issue read #1416 as blocked); the rule still in force: AGENTS.md:151.

Dependencies and order


Problem

_reprioritize_cross_job (src/devops_cli/roadmap/run.py:282-300) decides whether closure made reprioritization due by asking the store, for each number closure closed, whether that item is in the current release. It calls store.item(num) in its closed_items loop, and again in its changes loop, because _run_close_adapter builds each Change with no release (run.py:399-407). On GitHubRoadmapStore, item() (src/devops_cli/roadmap/github_store.py:1334-1340) reads the board listing the first time the store needs it, a GraphQL read with its budget probe. It also makes one REST issues/{n} read on every call.

Since #1362, closed_items lists first the closings of a closed release that still held an open item. Those are never in the current release, so each costs two issue reads before the loop reaches a current item. A round that closes only such items reads the board and every closed issue just to learn that reprioritize is not due. Closure already knew the answer: it read each issue's milestone, and ClosePlan.shipped separates those closings from the current release's.

Proposed remedy

_run_close_adapter sets each Change.release from the issue closure read, or its JobOutcome names the current release's closings on their own. _reprioritize_cross_job decides from that alone, with no store read, and its closed_items loop goes.

Acceptance criteria

  • tests/test_roadmap_run.py: a round whose closure closes one shipped item and one current item makes reprioritize due, and one that closes only a shipped item does not. Neither reads the store after closure (a store whose item() raises, or a count of reads at the process edge).
  • Tests are offline, each call phase stays under 1 s, and uv run devops ci passes.

Found in the review of #1362. Related: #1362, #1400.

Activity

  1. added
    type/refactor
    scope/release
    source/agent
    on Oct 8, 2026
  2. dan-petty-bot commented on Oct 8, 2026

    @dan-petty-bot
    Collaborator

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Priority: P2-Medium. It removes unnecessary board and issue API reads that add latency and API cost to every close round, but the current behavior is correct so it is not urgent.
    • Value: Medium. Eliminating a board GraphQL read plus per-issue REST reads on every close round meaningfully reduces API usage and round latency for all users of the roadmap service.
    • Effort: Low. The change is confined to setting Change.release in _run_close_adapter and simplifying the _reprioritize_cross_job loop, with a clear acceptance test described.
  3. added
    status/blocked
    on Oct 11, 2026
  4. dan-petty commented on Oct 11, 2026

    @dan-petty
    OwnerAuthor

    Blocked by #1562: the roadmap Service's machine account is suspended, and the Service is held at 0 replicas. This item develops the Service or can only be checked on it, so it waits until the account is reinstated or the jobs act as a GitHub App.


    Generated by Claude Code

  5. changed the title [-]refactor(roadmap): the Service decides whether closure made reprioritize due from what closure read, with no board or issue read[/-] [+]refactor(roadmap): roadmap run decides whether closure made reprioritize due from the milestones closure read, with no board or issue read[/+] on Oct 18, 2026
  6. dan-petty commented on Oct 23, 2026

    @dan-petty
    OwnerAuthor

    Not planned: closure and reprioritize are both deleted by #1952.

  7. removed
    status/blocked
    on Oct 30, 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

    scope/releasesource/agenttype/refactor

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions