Skip to content

feat(roadmap): refine looks again when a related item merges #5515

Open

Description

@dan-petty

Problem or Motivation

When a roadmap PR closes item X, the items that depend on X keep the plan text that they had before. Refine does not look at them again. The approved pipeline split design (tracker #5482) adds a sweep step that makes refine due.

Proposed Solution & Architectural Design

  • Add the sweep step related (no pod). Due: a merged roadmap PR closed item X, and a dependent of X has no related.seen entry for that PR.
  • It writes related.{seen, at}. Refine is due when related.at is newer than refine.at.
  • The scoped sweep runs it after watch sees MERGED.
  • Reuse the release_comments.py pattern and refine.wait_refs.

Target Subsystem

Roadmap Service and roadmap jobs (src/devops_cli/roadmap/steps/).

Acceptance Criteria

  • Test first: a merge of X makes refine due for each dependent, one time. The test fails on the base.
  • A test: a second pass writes nothing.
  • Live proof: after the merge and the release, the step runs as the App after the next merged roadmap PR with dependents. A comment on this issue gives the result lines and the refine run that follows.

Existing Tool Considered

The GitHub issue dependencies API gives the links. Build: 100,000 to 300,000 agent tokens and 0.5 day.

Related

Tracker #5482, Phase 6. Depends on #5024 and #5504. #4813.

Source: #5482

Alternatives check of 2026-11-30: none.
Tool: none found.
Reason: Searches found no maintained tool that marks a refine job due when a dependent item's blocker merges. The GitHub dependencies API gives links only, so the project's own sweep step is needed.

Lacks:

  • No per-item seen mark for one merged pull request
  • No due mark that makes refine run early
  • No sweep step that runs after watch sees MERGED
  • The dependencies API returns links only, with no state

Proposed design

Problem statement

A merged roadmap pull request closes an item and leaves the plan of each dependent stale. Refine never looks at those dependents again. This item adds the sweep step related. The step writes related.seen and related.at for each dependent of a closed item, one time for each merged pull request, and makes refine due.

Acceptance criteria

Requirement: A merge makes refine due for each dependent

The related sweep step SHALL write related.seen and related.at for each dependent of a closed item, one time for each merged roadmap pull request.

Scenario: One merged pull request closes an item

  • WHEN The test runs the related step with a merged roadmap pull request that closed item X, a dependent of X has no related.seen entry for that pull request, and the dependent has a refine.at mark.
  • THEN The test asserts that the step writes related.seen and related.at for that dependent, and that related.at is newer than refine.at.

Requirement: A second pass writes nothing

The related step MUST write no entry when a dependent already has a related.seen entry for the merged roadmap pull request.

Scenario: The step runs a second time

  • WHEN The test runs the step again with the same merged roadmap pull request, and each dependent already has a related.seen entry for it.
  • THEN The test asserts that the step writes no related.seen entry, writes no related.at entry, and sets no refine due mark a second time.

Requirement: The scoped sweep runs related after watch

The scoped sweep MUST run the related step after watch sees a merged roadmap pull request.

Scenario: The scoped sweep builds its row list

  • WHEN The test builds the row list of the scoped sweep.
  • THEN The test asserts that the related row follows the watch row.

Requirement: Pending a person after the merge

The deployed Service SHALL show the related step result line and the refine run of each dependent in a comment on this issue, after the next merged roadmap pull request with dependents.

Scenario: The next merged roadmap pull request with dependents

  • WHEN A person reads the Service log after the change merges and after the next roadmap pull request with dependents merges.
  • THEN The log shows the related step result line with exit 0, and a comment on this issue gives that line and the refine run that follows.

Existing Tool Considered

The alternatives check of 2026-11-23 in the issue body gives the verdict none and names no tool. The proposal builds its own code, so the written cost of the body applies: 100,000 to 300,000 agent tokens and 0.5 day. The step does what the Lacks: list of the block records: it writes related.seen and related.at for each dependent, sets the refine due mark, and runs in the scoped sweep after watch sees MERGED. The body names the GitHub issue dependencies API as the only related tool, and that API gives the links only.

Key questions

  • How does the related step make refine due, and where does it keep its state?: The step writes related.seen and related.at for each dependent and sets the refine due mark. Refine is due when related.at is newer than refine.at. Valkey holds the keys, and the due mark is never the only copy of the decision. (best practice) [sources: CONTEXT.md, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]
    • Chosen: Per-item keys in Valkey plus the refine due mark. ADR 0021 puts the shared state of the jobs in Valkey and gives a due mark for a job that must run before its interval ends.
    • Rejected: A comment on each dependent issue. It adds comment noise and gives refine no due mark, so refine waits for its interval.
    • Rejected: A label on each dependent issue. The label families hold the Status, Priority, Value and Effort of an item only.
  • Does the related step run in the sweep or as a step job with its own pod?: It runs in the sweep, with no pod. The step is short, so a pod for each tick costs more than the work. (best practice) [sources: CONTEXT.md, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]
    • Chosen: In the sweep, with no pod. A short roadmap step, such as watch or ready, runs in the sweep, because a pod for each tick costs more than the work.
    • Rejected: As a step job with its own pod. The step jobs are fix-checks and fix-conflict only, and each one works on a pull request.
  • Does the item wait on feat(roadmap): one watch row for plan and delivery PRs #5024 and feat(roadmap): one due_jobs function names the due jobs of an item #5504 as dependencies or as a block?: It waits on feat(roadmap): one watch row for plan and delivery PRs #5024 and feat(roadmap): one due_jobs function names the due jobs of an item #5504 as dependencies. The Related section of the body names them. A wait on another item is a dependency, not a block. (best practice) [sources: CONTEXT.md]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#5024, #5504

Activity

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

    @dan-petty
    OwnerAuthor
  4. added
    priority/p2-medium
    on Nov 13, 2026
  5. dan-petty commented on Nov 15, 2026

    @dan-petty
    OwnerAuthor

    Cannot be built as written: depends on unmerged issues #5024 and #5504 (pipeline split Phase 2/3 and due_jobs function). Returned per AGENTS.md Rule 2.

  6. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    Alternatives check: none

    Reason: Searches found no open, maintained tool that marks dependents due and re-runs planning after a related item merges. GitHub's dependencies API only supplies the links; the due mark and sweep are internal roadmap code.

    Tool: none found

    Lacks:

    • No tool writes a related.seen entry for a merged PR
    • No tool makes refine due from a dependency merge
    • No dependency-aware trigger in the chosen workflow engine
    Searches (10)

    Searches run:

    • open source tool re-run planning when dependency issue merges roadmap, results: 5
    • GitHub issue dependencies API blocked-by dependent issues automation, results: 5
    • ZenHub dependencies automation issue merged trigger, results: 5
    • "issue dependencies" GitHub API blocked_by sub-issues documentation, results: 5
    • Linear issue dependencies automatically update blocked issues when blocker completes, results: 5
    • open source project management tool dependency reschedule successor task when predecessor done, results: 5
    • github sub-issues dependencies rest api docs, results: 5
    • roadmap job sweep step dependency graph trigger, results: 5
    • docs.github.com issue dependencies blocked by REST endpoint, results: 5
    • "blocked by" issue relationships GitHub changelog dependencies generally available, results: 5

    Sources:

    A person decides what this check of 2026-11-17 means for the item.

  7. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 86358b6 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.

  8. devops-cli-service commented on Nov 27, 2026

    @devops-cli-service
    Contributor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.

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/lowpriority/p2-mediumscope/roadmapsource/agentstatus/newtype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions