Skip to content

fix(roadmap): a pull request that fixes a Blocked item leaves it Blocked #2967

Closed

Description

@dan-petty

What happened

A stop of the implement job now sets status/blocked (#2912). A person or an agent often fixes such an item by hand. devops pr create and devops pr ready leave a Blocked item Blocked, because pull_status.py says a Blocked item stays Blocked: a person set that. Now the Service also sets Blocked. The item stays Blocked while its fix pull request is open and in review, until the issue closes.

What should happen

devops pr create and devops pr ready replace status/blocked when a job recorded it with a stop on record (implement.stopped). They keep a status/blocked label that a person set by hand. The rule is the same as is_service_stop in src/devops_cli/roadmap/stop_clear.py, without the claim and Job checks.

Evidence

  • src/devops_cli/roadmap/pull_status.py: the table _REPLACES has no Blocked.
  • openspec/specs/roadmap-item-labels, requirement "A Status moves forward only": a Blocked item stays Blocked.

Acceptance criteria

  • devops pr create sets In Progress on an item that the Service set Blocked at a stop.
  • devops pr ready sets In Review on the same item.
  • A status/blocked label that a person set stays.
  • uv run devops ci passes.

Proposed design

Problem statement

A stop of the implement job sets status/blocked on an item. When a person or agent fixes the item by hand and opens a pull request, devops pr create and devops pr ready leave the Blocked label because pull_status.py never replaces it. The item stays Blocked until it closes. The fix is to replace a Blocked label that the Service set at a stop, while keeping a Blocked label that a person set by hand.

Acceptance criteria

Requirement: pr create replaces Service-set Blocked

devops pr create SHALL set In Progress on an item whose Blocked label the Service set at a stop.

Scenario: Service stop then pr create

  • WHEN An open item has status/blocked, its job_record has STATUS=blocked and STOPPED set, and a pull request that closes it is created
  • THEN The item's status label changes to status/in-progress

Requirement: pr ready replaces Service-set Blocked

devops pr ready SHALL set In Review on an item whose Blocked label the Service set at a stop.

Scenario: Service stop then pr ready

  • WHEN An open item has status/blocked, its job_record has STATUS=blocked and STOPPED set, and a pull request that closes it is marked ready
  • THEN The item's status label changes to status/in-review

Requirement: Person-set Blocked stays

devops pr create and devops pr ready SHALL NOT replace a Blocked label that a person set by hand.

Scenario: Person-set Blocked then pr create

  • WHEN An open item has status/blocked, its job_record does NOT have STATUS=blocked or STOPPED set, and a pull request that closes it is created
  • THEN The item's status label remains status/blocked

Requirement: CI passes

The change SHALL pass uv run devops ci.

Scenario: Full CI run

  • WHEN uv run devops ci runs on the branch that contains the change
  • THEN All checks complete with a passing status

Existing Tool Considered

No check has run. No open, maintained external tool covers this need. The project builds its own code. The written cost is small: modify the condition in set_delivered_status in src/devops_cli/roadmap/pull_status.py (about 10 lines) and add test cases in the existing test file for pull_status.

Key questions

  • How does the code distinguish a Service-set Blocked from a person-set Blocked?: Check that item.job_record.get(ItemField.STATUS) equals CONST_ROADMAP_STATUS_BLOCKED and that item.job_record.get(ImplementRecordKey.STOPPED) is truthy. This is the same rule as is_service_stop without the claim and Job checks, as the issue body states. (best practice) [sources: src/devops_cli/roadmap/stop_clear.py:78-86, src/devops_cli/roadmap/pull_status.py:55-65]
    • Rejected: Add BLOCKED unconditionally to _REPLACES. Rejected. It would replace a person-set Blocked label, violating the rule that a job never reverts a person's change (ADR 0002).
    • Chosen: Check job_record for STATUS=blocked and STOPPED set. Chosen. It matches the is_service_stop rule minus the claim and Job checks, as the issue body specifies. It distinguishes a Service stop from a person's manual label.
    • Rejected: Read the issue events to find who set the label. Rejected. It adds a network request per item and is more complex than reading the job_record that is already on the item.
  • Where does the new condition go in the code?: In set_delivered_status in src/devops_cli/roadmap/pull_status.py, as an additional condition alongside the existing _REPLACES check. When the item's status is BLOCKED and the job_record shows a Service stop, allow the replacement. (best practice) [sources: src/devops_cli/roadmap/pull_status.py:55-65]
    • Rejected: Extend the _REPLACES dict with a dynamic check. Rejected. _REPLACES is a static Final dict. A dynamic per-item check does not fit its shape.
    • Chosen: Add a separate condition in set_delivered_status. Chosen. The function already reads the item. Adding one more check for the Service-stop case is the smallest change and keeps _REPLACES static.
    • Rejected: Create a new helper module. Rejected. The logic is two field reads. A new module adds indirection for no gain.
  • Does the check include the claim and Job checks from is_service_stop?: No. The issue body states the rule is the same as is_service_stop without the claim and Job checks. A pull request that fixes the item is the act that unblocks it, so a claim or a running Job does not prevent the status change. (best practice) [sources: src/devops_cli/roadmap/stop_clear.py:78-86]
    • Rejected: Include claim and Job checks. Rejected. The issue body explicitly excludes them. A person fixing the item by hand may hold a claim, and the pull request is the fix.
    • Chosen: Exclude claim and Job checks. Chosen. The issue body says 'without the claim and Job checks.' The pull request that fixes the item is the unblocking act.

Open questions

  • What does the spec say about a Blocked item staying Blocked? (missing verified source)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Alternatives check of 2026-11-04: none.
Tool: none found.

Activity

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

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. Items get stuck as Blocked while their fix is in review, but work can still proceed through merge and close.
    • Value: Medium. It removes a manual step for anyone fixing a Service-blocked item, but does not block the project.
    • Effort: Low. The change adds one entry to the _REPLACES table and a check for implement.stopped in pull_status.py.
    • Related: feat(roadmap): a stop sets status/blocked and a new runner image clears it once #2912, which asks for a different change. Both concern the status/blocked label lifecycle; #2912 introduces the Service setting it, this candidate fixes the PR flow to clear it when a stop record exists.
  3. added
    priority/p2-medium
    on Nov 1, 2026
  4. devops-cli-service commented on Nov 1, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at e093ac8 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

    • What does the spec say about a Blocked item staying Blocked? (missing verified source)
  5. devops-cli-service commented on Nov 4, 2026

    @devops-cli-service
    Contributor

    Alternatives check: none

    Tool: none found

    Lacks:

    • No external tool knows the project's roadmap item model (job_record with STATUS=blocked and STOPPED, ItemField/ImplementRecordKey) and so cannot tell a Service-set status/blocked from a person-set one.
    • Generic label automations apply labels from changed file paths or review state; none replaces a project-specific status/blocked label with status/in-progress or status/in-review when a fix pull request is created or marked ready.
    • The need is a small change inside the project's own devops pr create / pr ready code path (src/devops_cli/roadmap/pull_status.py), which no third-party library plugs into.

    Searches run:

    • github label automation tool set status label when pull request opens, keep manually set labels
    • python library roadmap item status labels sync with pull request state

    Sources:

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

  6. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 6, 2026
  7. removed
    status/in-review
    owner/agent
    on Nov 6, 2026
  8. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-06 19:47 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/lowpriority/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions