Skip to content

feat(roadmap): a blocker inherits the priority of what it blocks #5510

Open

Description

@dan-petty

Problem or Motivation

The owner rule of 2026-10-17 sets the priority of a blocker. The blocker of a P0 or of 2 or more P1 items is P0. The blocker of a P1 or of 2 or more P2 items is P1. The rule is transitive and never lowers. #1625 applied a similar rule in the reprioritize job, which went with the planner on 2026-10-23. Today only people apply it, so a blocker of urgent work waits in a lower queue.

Proposed Solution & Architectural Design

Target Subsystem

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

Acceptance Criteria

  • Test first: a table test applies the rule on chains of 1 to 3 links. The test fails on the base.
  • A test: the step never lowers a label, and it keeps a lower by a person.
  • A test: --dry-run sends 0 requests.
  • Live proof: after the merge and the release, the step runs as the App over the open items with blocked-by links. A comment on this issue gives the result lines and each raise.

Existing Tool Considered

The GitHub issue dependencies (blocked-by) API gives the links. The removed code of #1625 is the start. No open tool applies this priority rule. Build: 100,000 to 300,000 agent tokens and 0.5 day.

Related

Tracker #5482, Phase 5. Depends on #5504. #1625 (closed), #5235 (the record of the label writers). #5511 reads the source.

Source: #5482

Alternatives check of 2026-11-29: none.
Tool: none found.
Reason: Searches found only the GitHub dependencies API and actions that label the blocked item; no open tool applies a transitive, never-lowering priority raise from blocked-by links.

Covers:

  • Lists blocked-by links through the GitHub dependencies API
  • Marks a blocked issue with a chosen label
  • Scores an issue priority from effort and weight metrics

Lacks:

  • Transitive rule over chains of one to three links
  • Raise only, with no lowering of a label
  • Record of the source that stops a second raise

Proposed design

Problem statement

The owner rule of 2026-10-17 sets the priority of a blocker from the items that it blocks. Only people apply the rule today, so a blocker of urgent work waits in a lower queue. This item adds the inherit sweep step. The step raises the priority/* label of each open blocker, never lowers a label, and keeps a lower that a person set.

Acceptance criteria

Requirement: P0 rule

The inherit step SHALL set priority/p0-critical on an open blocker when it blocks a priority/p0-critical item or two or more priority/p1-high items.

Scenario: Chains of one to three links to a P0 source

  • WHEN the table test runs the step on chains of one, two and three blocked-by links from a P0 item and from two P1 items
  • THEN each open blocker in the chain holds priority/p0-critical

Requirement: P1 rule

The inherit step SHALL set priority/p1-high on an open blocker when it blocks a priority/p1-high item or two or more priority/p2-medium items.

Scenario: Chains of one to three links to a P1 source

  • WHEN the table test runs the step on chains of one, two and three blocked-by links from a P1 item and from two P2 items
  • THEN each open blocker in the chain holds priority/p1-high

Requirement: No lowering

The inherit step MUST NOT lower a priority/* label.

Scenario: A blocker above the target of the rule

  • WHEN the test gives the blocker priority/p0-critical and the item that it blocks priority/p2-medium
  • THEN the fake client records no label request and the blocker keeps priority/p0-critical

Requirement: A person's lower stays

The inherit step MUST NOT raise a label again for a source that its inherit.source record names.

Scenario: A person lowers a raised label

  • WHEN the job record holds inherit.source for the source and the issue has priority/p2-medium
  • THEN the fake client records no label request and the issue keeps priority/p2-medium

Requirement: A new source raises again

The inherit step SHALL raise the label when a new source gives a higher priority than the inherit.source record names.

Scenario: A new P0 source after a person's lower

  • WHEN the job record names source A and a new source B is priority/p0-critical
  • THEN the fake client records one label request and the blocker holds priority/p0-critical

Requirement: Dry run

The inherit step MUST send no request when it runs with --dry-run.

Scenario: Dry run over a blocker that the rule raises

  • WHEN the test invokes uv run devops roadmap step inherit --dry-run on an open blocker of a P0 item
  • THEN the command exits 0, prints one JSON result line that names the raise, and the fake client records zero requests

Requirement: Raise record and comment

The inherit step SHALL write inherit.source and inherit.at and one comment that names the source items when it raises a label.

Scenario: One raise writes one record and one comment

  • WHEN the test runs the step on an open blocker of a P0 item
  • THEN the job record holds inherit.source with the source number and inherit.at with the time, and the client sent one comment that names the source item

Requirement: No supervise resources

The inherit step MUST NOT write a Status, Owner, Value, Effort or supervise resource when it raises a label to P0.

Scenario: An inherited P0 gets order only

  • WHEN the test runs the step on an open blocker that it raises to P0
  • THEN the fake client records one Priority set_field write and one comment, and no write of a Status, Owner, Value, Effort or supervise resource

Requirement: P0 inflow by source

The inherit step SHALL increment devops_cli_roadmap_p0_inflow_total with source="inherit" for each raise to P0.

Scenario: A raise to P0 counts as one inherit

  • WHEN the test runs the step on an open blocker that it raises to P0
  • THEN the metric sink holds one increment with source="inherit"

Requirement: Sweep registration

The inherit step SHALL be a step of the sweep at each pass and in the scoped sweep after a priority/* label or a blocked-by link changes.

Scenario: The sweep lists the inherit step

  • WHEN the test reads the sweep step list
  • THEN the list holds inherit

Requirement: Pending a person after the merge

The inherit step SHALL run as the App over the open items with blocked-by links after the merge and the release.

Scenario: Live proof after the release

  • WHEN after the merge and the release, the step runs as the App over the open items with blocked-by links
  • THEN the result lines and each raise appear in a comment on this issue

Existing Tool Considered

The alternatives check of 2026-11-23 in the issue body records verdict none and names no tool. The change builds its own code for the rule, the inherit.source record, the comment and the P0 inflow metric. Written cost: 100,000 to 300,000 agent tokens and 0.5 day.

Key questions

  • Which files hold a roadmap step, and how does a step run?: A roadmap step is one module of the roadmap steps package and one subcommand of devops roadmap step <name>. src/devops_cli/commands/roadmap_step.py registers each subcommand. A step writes one JSON result line, exits 0, 1 or 75, and sends no request with --dry-run. [sources: src/devops_cli/commands/roadmap_step.py, 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]
  • What does a roadmap step do when it runs with --dry-run?: It sends no external request, a read included. It prints the requests that a real run would send and changes nothing on GitHub. [sources: ARCHITECTURE.md, CONTEXT.md]
  • Where does the inherit step keep the record of a raise, so that it never raises a label again for the same source?: The step writes inherit.source and inherit.at into the hidden job record block of the issue body, in the same set_field write as the Priority. inherit.source holds the source item numbers, comma separated. inherit.at holds the time of the raise. A source that the record names stops a second raise after a person lowers the label. A new source can still raise the label again. (best practice) [sources: docs/ROADMAP_WORKFLOW.md, src/devops_cli/roadmap/stores/store.py, src/devops_cli/roadmap/stores/github_store.py, docs/adr/0016-labels-hold-the-roadmap-items-fields.md]
    • Chosen: The job record block of the issue body. The body states this record, and the job record tells a person's change from a change of a job. set_field writes the record and the label in one PATCH.
    • Rejected: A new label. It adds a label family for a fact that the body holds, and it keeps no time of the raise.
    • Rejected: A key in Valkey. Valkey holds no durable copy, so a lost key raises the label again.
    • Rejected: A comment. The step writes a comment already, and a person reads a comment as text, not as state.
  • How does the step find the items that a blocker blocks?: The step reads the open issues once. For each issue whose IssueRecord.blocked_by count is nonzero, it calls store.blocked_by(number) and inverts the result. Each blocker then has the list of items that it blocks. The store read uses the GitHub issue dependencies blocked_by listing. (best practice) [sources: src/devops_cli/roadmap/consolidate_shortlist.py, src/devops_cli/roadmap/stores/store.py, src/devops_cli/roadmap/stores/github_store.py]
    • Chosen: Invert the store's blocked-by reads. It uses the one copy of the links that GitHub keeps, and the listing count means a read only for an issue that has a blocker.
    • Rejected: A blocked-by line in the issue body. It duplicates the links, and a person can edit it out of step with GitHub.
    • Rejected: The sub-issue links. A sub-issue delivers its parent item. It is not a blocked-by link.
  • Which request writes the raised priority/* label?: The step calls RoadmapStore.set_field(item, ItemField.PRIORITY, value, marks={...}). That method reads the issue and sends one PATCH. The PATCH removes each label of the priority/* family, adds priority/p0-critical or priority/p1-high, and writes the inherit marks in the job record. The step is the second writer of priority/* labels after intake. (best practice) [sources: docs/adr/0016-labels-hold-the-roadmap-items-fields.md, src/devops_cli/roadmap/stores/store.py, src/devops_cli/roadmap/stores/github_store.py]
    • Chosen: The store's set_field. It replaces the family and records the value and the inherit marks in one read and one PATCH, and it refuses a person's change (ADR 0016).
    • Rejected: The issue labels endpoint. It adds and removes labels in two requests and writes no job record.
    • Rejected: An issue update with the full label list. It rewrites every label, and it can drop a label that a person added.
    • Rejected: A GraphQL mutation. The REST issue update is enough for one label family and the record.
  • Where does the inherit step run: in the sweep, or in a pod of its own?: It runs as a step of the sweep at each pass. The router creates a scoped sweep when a priority/* label or a blocked-by link changes, so the step also runs after such a change. It needs no pod and no model. (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: A short step of the sweep. The work is a few reads and writes, so a pod for each tick costs more than the work.
    • Rejected: A step job in its own pod. A pod per tick costs more than the work of this step.
    • Rejected: Only a due mark from the router. The step must run at each pass, not only after an event.
  • How does the step apply a transitive rule without a second pass?: The step reads the open items and their blocked-by links once. It inverts the links into a graph that maps each blocker to the items it blocks. It walks the graph in topological order with graphlib.TopologicalSorter. Each blocker is visited after every item that it blocks, so one pass reaches the transitive result. A cycle in the links is a typed stop. (best practice) [sources: src/devops_cli/core/import_graph.py, src/devops_cli/roadmap/consolidate_shortlist.py]
    • Chosen: One topological pass over the graph read once. It reaches the transitive result with one read and the smallest number of writes, and the standard library supplies the order and the cycle check.
    • Rejected: Write, then repeat until no label changes. Each repeat sends more requests, and it can race an edit of a person.
    • Rejected: One link for each pass. A chain of three links would wait for three passes.
  • How does the step keep a label that a person set?: The step compares the current Priority with the inherit.source record. It raises the label only when the current label is lower than the rule gives and the record does not name the source. When the record names the source, the step leaves the label alone. The store set_field also refuses a write when a person changed the field since the read. (best practice) [sources: docs/adr/0016-labels-hold-the-roadmap-items-fields.md, src/devops_cli/roadmap/stores/store.py, src/devops_cli/roadmap/stores/github_store.py]
    • Chosen: Compare the current label with the inherit.source record and let set_field refuse a changed field. It needs one read of the body, it keeps the decision in a durable place, and the store refuses a race with a person.
    • Rejected: Compare with the last label that the App set in the issue events. It needs a read of every event at each pass.
    • Rejected: Never raise a label that the step raised before. A new source item must be able to raise the label again.
  • How does the step report a P0 that it causes?: It declares the counter devops_cli_roadmap_p0_inflow_total with a source label. It increments the counter with source="inherit" for each raise to P0. The other values are intake, incident and person. (best practice) [sources: src/devops_cli/telemetry/instruments.py, docs/TELEMETRY.md]
    • Chosen: One counter with a source label. One metric keeps the whole P0 inflow, and the label shows the origin.
    • Rejected: A metric of its own for inherited P0 items. It splits one count over two metrics.
    • Rejected: No metric. The body asks for the P0 inflow by source.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#5504

Activity

  1. added
    source/agent
    on Nov 13, 2026
  2. added
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/medium
    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. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at d15dfcf 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.

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

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.

    Searches (9)

    Searches run:

    • open source tool automatically set GitHub issue priority from blocked-by dependencies, results: 5
    • GitHub Actions labeler propagate priority labels dependency graph tool, results: 5
    • "dependent-issues" GitHub action priority labels propagate, results: 5
    • tool that raises priority of blocker issue based on priority of blocked issue, results: 5
    • "blocked by" issue priority inheritance rule automation open source, results: 5
    • GitHub App automation escalate issue priority based on blocking dependencies roadmap, results: 5
    • probot app inherit priority of blocking issue automatically, results: 5
    • GitHub action marketplace issue dependencies priority escalation label bot open source, results: 5
    • "dependent-issues" action issue dependencies blocked by status, results: 5

    Sources:

  7. 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/mediumpriority/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