Repository navigation
Description
Problem Description
Since #6449 (PR #6505, 494de4f), refine gives an item in a dependency cycle the step person with the text "The item is in a dependency cycle: #A → #B → #A". Two faults keep that step after the edge that made the cycle is gone:
- Refine builds the graph once for each round, before it refines an item (
plan_refine,graph = DependencyGraph.of(open_items),src/devops_cli/roadmap/refine/refine.py:3724). The cycle check of the refined item uses that graph (held.cycle_of(item.number),refine.py:3388-3389). So the edges of the refined item come from its old job record and its old body (_edges_of,refine.py:1325), not from the new proposal. The open blockers of the same round come from the new proposal (_open_dependencies(store, proposal),refine.py:3387). When a person answers "#A does not depend on #B", the new proposal has no dependency, but the round still names the cycle and setsperson. The answer is then used up, so the person must reply a second time. _still_waitingchecks the cycle only in the blocked branch (refine.py:2704-2710). No rule ends apersonwait when its cycle is gone. When a person removes the edge #B → #A from the body of #B, #B becomes Ready, but #A keepspersonwith the old cycle text until #B closes or a person replies.
#6451 will make body_dependencies narrower and remove false edges (for example the "needs this item" link of #4691 ↔ #4814). Each item that refine moves to the cycle step before that release then keeps a stale person wait (fault 2).
docs/roadmap/refine.md also lists no cycle step (lines 9-13), and line 19 still says "The item waits on that issue" for each open dependency.
Reproduction Steps
- In a test store, make Release v0.1.8 #1 depend on feat(release): v0.1.8 #2 in its record, and feat(release): v0.1.8 #2 depend on Release v0.1.8 #1 in its Dependencies section. Run a refine round: both items get
personwith the cycle. - Add a person reply on Release v0.1.8 #1 ("Release v0.1.8 #1 does not depend on feat(release): v0.1.8 #2"), and let the fake model give a proposal with no dependency. Run a refine round on Release v0.1.8 #1.
- Actual: Release v0.1.8 #1 gets
personwith "The item is in a dependency cycle: Release v0.1.8 #1 → feat(release): v0.1.8 #2 → Release v0.1.8 #1", and its section says "Dependencies: None.". Only the next round, after a second reply, givesready. - Second case: remove the edge feat(release): v0.1.8 #2 → Release v0.1.8 #1 from the body of feat(release): v0.1.8 #2 and run refine on both. feat(release): v0.1.8 #2 goes to
ready; Release v0.1.8 #1 keepspersonwith the old cycle text.
A reviewer reproduced both cases with a fake store and a fake model on 4f0a86f.
Expected vs Actual Behavior
- Expected: the cycle check of a refined item uses the edges of its new proposal. A
personwait whose cycle is gone ends in the next round. - Actual: a cycle that the round itself removes still sets
person, and a person wait keeps a cycle that no longer exists.
Environment Diagnostics
devops-cli at main 494de4f (2026-11-20), after #6505.
Dependencies
None.
Acceptance Criteria
- A test written first: a person reply removes the edge, and the model gives no dependency. The same refine round gives no cycle step.
- A test written first: the edge leaves the body of the other item. The next refine round ends the
personwait of the first item. docs/roadmap/refine.mdnames the cycle step, and says that only an open dependency outside a cycle makes the item wait.
Alternatives check of 2026-11-20: none.
Tool: none found.
Reason: Searches returned only Python import-cycle tools (depcycle, pydeps, DepMapper), which analyze module imports, not GitHub issue dependency state. Nothing covers refine's internal cycle-step logic; the fix belongs in src/devops_cli/roadmap/refine/refine.py.
Proposed design
Problem statement
Refine can keep a person cycle step after the edge that made the cycle is gone. The cycle check uses the graph built before the round, so a reply that removes an edge still sets the step. No rule ends a person wait whose cycle the current bodies no longer hold. The change decides the cycle step from the new proposal, ends a stale cycle wait, and names the cycle step in the refine guide.
Acceptance criteria
Requirement: Cycle step from proposal edges
The refine round SHALL decide the cycle step of an item from the dependencies of its new proposal and the open blockers of the round, and not from the graph that the round builds before it refines the item.
Scenario: Reply removes the last edge
- WHEN a person reply removes the last edge of a cycle, the model proposal names no dependency, and
uv run pytest tests/roadmap/refine/test_roadmap_refine_cycle.py -k reply_removes_edgeruns - THEN the test asserts that the same round gives the item no
personcycle step and sets its Status to Ready.
Requirement: Stale cycle wait ends
A refine round SHALL end a person wait whose recorded cycle no longer exists in the current bodies and records of the open items.
Scenario: Other body removes the edge
- WHEN a person removes the edge
#2 → #1from the body of feat(release): v0.1.8 #2, the next round refines Release v0.1.8 #1, anduv run pytest tests/roadmap/refine/test_roadmap_refine_cycle.py -k stale_cycle_wait_endsruns - THEN the test asserts that the round clears the
personwait of Release v0.1.8 #1 and sets its Status to Ready.
Requirement: Refine guide names the cycle step
The refine guide SHALL name the cycle step and state that only an open dependency outside a cycle makes an item wait.
Scenario: Guide text check
- WHEN
uv run pytest tests/roadmap/refine/test_roadmap_refine_cycle.py -k guideruns - THEN the test asserts that
docs/roadmap/refine.mdnames the cycle step and the rule that only an open dependency outside a cycle makes an item wait.
Existing Tool Considered
The alternatives check in the issue body (2026-11-20) gives the verdict none and names no tool. depcycle, pydeps and DepMapper analyze Python module imports, not the dependency state of issues. No open, maintained tool or library covers the cycle step of refine. The change edits existing code in src/devops_cli/roadmap/refine/refine.py. Written cost: about 3,000 tokens to build, keep and fix that code, and about 2 hours of work. The existing refine tests keep it.
Key questions
- Which dependency edges decide the cycle step of the refined item?: Use the dependencies of the new proposal and the open blockers of the round. Do not use the graph built before the round for the refined item. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py, src/devops_cli/roadmap/dependencies.py, tests/roadmap/refine/test_roadmap_refine_cycle.py]
- Chosen: Dependencies of the new proposal plus the open blockers of the round. The reply changes the proposal, so the same round must see the removed edge.
- Rejected: Edges of the graph built before the round. The graph holds the old job record and the old body of the item, so it keeps the cycle that the reply removed.
- Rejected: Wait for fix(roadmap): read only blockers in a Dependencies section #6451 to narrow the body edges. Items already on the cycle step keep a stale
personwait until that release, so the fix must land now.
- How does a
personwait end when its cycle is gone?: Recompute the cycle from the current bodies and records in each round. End thepersonwait when the recorded cycle no longer exists. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py, docs/roadmap/refine.md]- Chosen: Recompute the cycle from the current bodies and records in each round. The body edit removes the edge, so the next round can see that the cycle is gone.
- Rejected: Wait for the other item to close. The other item becomes Ready when the edge leaves its body, and no close follows.
- Rejected: Wait for a second person reply. The first reply is used up, so the person must reply again for no reason.
- Where does the guide describe the cycle step?: Add the cycle step to the list of next steps in
docs/roadmap/refine.md. State that only an open dependency outside a cycle makes the item wait. (best practice) [sources: docs/roadmap/refine.md]- Chosen: Add the cycle step to the list of next steps in
docs/roadmap/refine.md. The list of next steps is the place where the guide names each step. - Rejected: Leave the guide unchanged. The guide keeps the false rule that every open dependency makes the item wait.
- Rejected: Put the rule only in the OpenSpec spec. The issue asks for the guide, and readers use the guide for the next steps.
- Chosen: Add the cycle step to the list of next steps in
- Does this change need a new version of the refine rules?: Yes. Set a later time in
CONST_ROADMAP_REFINE_RULES_SINCE, so each item that the old rule left in a cycle wait gets one new look. (best practice) [sources: docs/roadmap/refine.md]- Chosen: Set a later time in
CONST_ROADMAP_REFINE_RULES_SINCE. The change sets a next step, so the guide requires a later time in the constant, and each item in a stale cycle wait gets one new look. - Rejected: Keep the current version of the rules. An item that waits on a person under the older rule then keeps the stale cycle wait until a reply or a body edit.
- Chosen: Set a later time in
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 20, 2026
A person must reply twice and items stay in a stale person state, but no service, CI, or data is affected.The regression commit 494de4f does not set P0: the author has no write access, and no caller attached it as evidence. A person can set P0 with the label priority/p0-critical.Both address a refine wait that persists after its cause ends; #3483 covers blocked and stage-return waits, while the candidate covers the new cycle person step from #6449.devops-cli-service commentedon Nov 20, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
devops-cli-service commentedon Nov 20, 2026
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 (2)
Searches run:
Sources:
devops-cli-service commentedon Nov 22, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
chore(main): release 0.219.0 (#7177)
devops-cli-service commentedon Nov 25, 2026
Released in v0.219.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.219.0
devops-cli-service commentedon Nov 25, 2026
Live since 2026-11-25 17:09 UTC