Skip to content

fix(roadmap): a rule change ends no blocked refine wait #6523

Done

Description

@dan-petty

Problem Description

A change of the refine rules ends a wait on a person, but not a blocked wait. _set_by_older_rules (src/devops_cli/roadmap/refine/refine.py, #4795) compares the rules version in the job record with CONST_ROADMAP_REFINE_RULES_SINCE, and only the person path of _still_waiting asks it. The NextStep.BLOCKED case of _still_waiting ends the wait only when _open_blockers finds no open issue in the recorded refine.blocked_by, or when the item is in a dependency cycle (#6449). It does not ask whether older rules recorded those blockers.

The fix of #6451 (PR #6514) narrows the blocker rule: a parent, a child, a related item, a reverse link and the source line of intake no longer name a blocker, and it sets CONST_ROADMAP_REFINE_RULES_SINCE to the time of that fix. An item that refine recorded as blocked on such a false dependency before that fix keeps its blocked wait. It stays New until the false blocker closes, a person replies or a person edits the body. A parent tracker can stay open for weeks.

Reproduction Steps

  1. In a test store, record an item as blocked with refine.blocked_by = [#N] and a rules version older than CONST_ROADMAP_REFINE_RULES_SINCE, and keep #N open.
  2. Run a refine round.
  3. Actual: the item still waits as blocked on #N, and refine does not look at it again.

Expected vs Actual Behavior

  • Expected: a blocked wait that older rules recorded gets one new look in the next round, as a person wait does (fix(roadmap): refine looks again at a wait that an old rule set #4795). The new look reads the blockers with the current rule. A blocker that is still real keeps the item blocked.
  • Actual: only the close of the recorded blocker, a person reply or a body edit ends the wait.

Environment Diagnostics

devops-cli at the head of PR #6514 (12a2cd8, 2026-11-20).

Dependencies

Depends on #6451.

Acceptance Criteria

  • A test written first: a blocked wait with an older rules version and an open recorded blocker ends in the next round, and refine looks at the item again.
  • A test: a blocked wait with the current rules version and an open recorded blocker still waits.
  • A test: the new look keeps the item blocked when the current rule still reads the blocker from the body.
  • docs/roadmap/refine.md says that a rule change ends blocked waits too.

See #4795, #6515.

Alternatives check of 2026-11-20: none.
Tool: none found.
Reason: Searches for a tool that invalidates recorded blockers after a rules-version change returned only unrelated results; the need is an internal change to the project's own _still_waiting blocked path, which no external tool covers.

Lacks:

  • No tool compares a stored rules version with the current one
  • No tool re-reads recorded blockers with a narrowed rule
  • No external library fits refine's own job record and wait logic

Proposed design

Problem statement

Refine ends a wait on a person when older rules set that wait. Refine never ends a blocked wait that older rules set. The narrowed blocker rule of #6451 no longer reads a parent, a child, a related item, a reverse link or the source line of intake as a blocker. An item that refine recorded as blocked on such a false dependency stays New until the false blocker closes or a person acts, and a parent tracker can stay open for weeks. The change makes the blocked path of _still_waiting ask the rules version, as the person path does, so the item gets one new look under the current rule.

Acceptance criteria

Requirement: A blocked wait of older rules ends

A blocked wait that older rules set SHALL end in the next refine round, so that refine reads the blockers with the current rule.

Scenario: Record older than the current rules with an open recorded blocker

  • WHEN a test store holds an item whose record has refine.rules older than CONST_ROADMAP_REFINE_RULES_SINCE and refine.blocked_by = [#N], #N stays open, and a refine round runs
  • THEN the round takes the item and writes refine.rules at CONST_ROADMAP_REFINE_RULES_SINCE

Requirement: A blocked wait of the current rules holds

A blocked wait that the current rules set MUST hold while a recorded blocker stays open.

Scenario: Record at the current rules with an open recorded blocker

  • WHEN a test store holds an item whose record has refine.rules equal to CONST_ROADMAP_REFINE_RULES_SINCE and refine.blocked_by = [#N], #N stays open, and a refine round runs
  • THEN the round leaves the item out, and its record keeps refine.rules and refine.blocked_by = [#N]

Requirement: The new look keeps a real blocker

The new look MUST keep the item blocked when the body still names an open issue as a dependency under the current rule.

Scenario: The body names an open dependency under the current rule

  • WHEN a test store holds an item with a record older than CONST_ROADMAP_REFINE_RULES_SINCE and a body whose Dependencies section names open #N, and a refine round runs
  • THEN the round writes refine.blocked_by = [#N] with refine.rules at CONST_ROADMAP_REFINE_RULES_SINCE, and the next round leaves the item out

Requirement: The guide states that a rule change ends a blocked wait

The refine guide SHALL state that a change of the refine rules ends a blocked wait as well as a wait on a person.

Scenario: The guide holds the sentence and the docs check passes

  • WHEN the author adds the sentence to docs/roadmap/refine.md and runs uv run devops ci --check --only docs
  • THEN the docs row passes with no broken link and no inventory error

Existing Tool Considered

The alternatives check of 2026-11-20 in the issue body gives the verdict none and names no tool; the block lists what no tool covers. The need is a change to refine's own _still_waiting blocked path, and no external library fits refine's job record and wait logic. The change builds its own code: about 60 lines of code and tests, roughly 45,000 tokens to build, 5,000 tokens a year to keep and fix, and about one day of elapsed time.

Key questions

  • How does the blocked path of _still_waiting learn that older rules set its wait?: The NextStep.BLOCKED case calls _set_by_older_rules before it reads the blockers, as the NextStep.PERSON case does. When the record is older than CONST_ROADMAP_REFINE_RULES_SINCE, the case returns that the item does not wait, and the round refines the item again. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py:2899, src/devops_cli/roadmap/refine/refine.py:2713]
    • Chosen: Reuse _set_by_older_rules in the BLOCKED case. The person path already proves the helper, and the blocked case already holds what the helper reads.
    • Rejected: Record a second rules version for blockers. It adds a record key and a write for one rule, and the one version already covers each wait.
    • Rejected: Clear refine.blocked_by on a rules change. It loses the blockers that are still real and needs a store write for each item.
  • Which record holds the rules version of a blocked wait?: RefineRecordKey.RULES in the item's job record. Each round that writes a proposal writes the version of the rules that set its next step. A record from before the version was recorded takes the time of refine's last comment. [sources: src/devops_cli/roadmap/stores/store.py, src/devops_cli/roadmap/refine/refine.py, src/devops_cli/config/constants.py:3540]
  • Which blockers does the new look read?: _open_blockers reads the issue numbers in the recorded refine.blocked_by and asks the store whether each is open. The round that looks again writes a new blocked_by from the body under the current rule. A blocker that the current rule still reads keeps the item blocked, and the new record stops a second look. [sources: src/devops_cli/roadmap/refine/refine.py:2865, src/devops_cli/roadmap/refine/refine.py]
  • Which issue must be done first?: fix(roadmap): read only blockers in a Dependencies section #6451, which narrows the blocker rule and sets CONST_ROADMAP_REFINE_RULES_SINCE to the time of its fix. The test of an older record needs that new version, and the false blockers come from the rule before it. [sources: src/devops_cli/config/constants.py:3540, src/devops_cli/roadmap/refine/refine.py]
  • Where does the refine guide state the new rule?: In docs/roadmap/refine.md, in the paragraph that states the rules version and the one new round of a person wait (fix(roadmap): refine looks again at a wait that an old rule set #4795). One sentence adds that a rule change also ends a blocked wait. (best practice) [sources: docs/roadmap/refine.md]
    • Chosen: One sentence in the existing paragraph. The guide already states the rules version and the person wait there, and a second place states one rule twice.
    • Rejected: A new section of its own. It splits one rule over two places and adds a heading for one sentence.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#6451

Activity

  1. added
    type/bug
    source/agent
    on Nov 20, 2026
  2. dan-petty commented on Nov 20, 2026

    @dan-petty
    OwnerAuthor
  3. added
    scope/roadmap
    status/new
    value/medium
    effort/low
    priority/p2-medium
    on Nov 20, 2026
  4. devops-cli-service commented on Nov 20, 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 (3)

    Searches run:

    • library detect stale blocked_by dependency references after rule change, results: 5
    • rules version invalidate recorded dependency blockers refinement tool, results: 5
    • open source issue refinement roadmap state machine dependency blockers rules version, results: 5

    Sources:

  5. added
    status/ready
    and removed
    status/new
    on Nov 22, 2026
  6. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

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

    @devops-cli-service
    Contributor

    Live since 2026-11-25 17:09 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