Repository navigation
Description
Problem Description
No roadmap job checks the dependencies of an item for a cycle. When item A waits on B and B waits on A, refine records the step blocked on each item. Each comment names only the next open item, and each item waits with no end. A person sees no cycle unless they follow the links by hand.
On 2026-11-19, 6 groups of open items are in a cycle. The graph uses the declared dependencies of the 778 open issues. These are refine.blocked_by of the job record and the Dependencies sections that body_dependencies reads. The stage and implement jobs use the same read.
| Cycle | Edges |
|---|---|
| #4692 → #4840 → #5219 → #4692, also through #4720 and #4733 | #4692 record 4840. #4840 record 4860,5219,5223,5228. #5219 body "Merge first: #4692", #4720 and #4733. #4733 record holds 4720. #4720 body names #4692. |
| #4805 → #4809 → #4808 → #4805, also #4808 → #4806 → #4805 | #4805 record 3077,4787,4809. #4809 body names #4808. #4808 record 4805,4806,3077,4787. #4806 record 4805. |
| #4691 ↔ #4814 | #4691 record 4814. #4814 is Ready, and its body says "#4691 needs this item." |
| #5348 ↔ #5356 | #5348 record 5356. #5356 body: "Related: #5348 adds the agent client side and depends on this item." |
| #4893 ↔ #4909 | #4909 is Ready, and its body names "#4893 owner steps 1 to 6. Child 5 of #4893." Tracker #4893 says "Owner steps 1 to 6 come before child 5 (#4909)." No job refines or stages the tracker #4893, so only the edge #4909 → #4893 holds an item back. This pair is a case of the tracker bug. |
| #5134 ↔ #5135 | #5135 record 5134. #5134 body names #5135. |
The stage job holds #4814 and #4909 with no end. devops roadmap explain 4814 gives "Stage job: no. The item depends on the open issue #4691." #4691 waits on #4814.
Cause, at origin/main 0d90de5:
validate_proposal(src/devops_cli/roadmap/refine/refine.py:1418-1424) keeps each dependency of the proposal that is a known issue. It does not look at the dependencies of that issue._open_dependencies(refine.py:1498-1501) keeps each open dependency, andnext_step_of(refine.py:1504-1533) makes the stepblockedfrom it.open_dependency(src/devops_cli/roadmap/dependencies.py:30-42) gives the same answer to the stage job (stage.py:771-774) and to the implement job (implement.py:379-382).- A search for
cycle,graphlibandTopologicalSorterundersrc/devops_cli/roadmap/finds no cycle check. - Two other bugs make some of the edges. The parse of the Dependencies section reads a related or reverse
#Nas a blocker (bug "read only blockers in a Dependencies section"). Refine and stage count an open tracker as a blocker (bug "an open tracker holds back no item"). A cycle check is still necessary, because a person or a scope comment can also make a cycle, as on feat(roadmap): read project review facts through a catalog #4692.
Reproduction Steps
- Run
devops roadmap explain 4814. The stage job leaves perf(k8s): seed the uv cache of a runner pod from the image #4814 out for the open issue feat(k8s): add the CI gate WorkflowTemplate #4691. - Read the job record of feat(k8s): add the CI gate WorkflowTemplate #4691:
refine.blocked_byis4814, andrefine.next_stepisblocked. - Read the job record of feat(roadmap): read project review facts through a catalog #4692 (
4840) and of feat(telemetry): rank CLI usage errors and propose fixes #4840 (4860,5219,5223,5228). Then read the Dependencies section of feat(roadmap): report job grades and fix effects in the project review #5219 (Merge first: feat(roadmap): read project review facts through a catalog #4692). - Give the declared dependencies of the open issues to
graphlib.TopologicalSorter(graph).prepare(). It raisesCycleErrorwith the path[5219, 4840, 4692, 5219].
Expected vs Actual Behavior
- Expected: when a dependency of an item leads back to the item, refine records a person step. The step names the full cycle and the edges that make it, so that a person can remove one edge. Stage and implement name the cycle in their reason.
- Actual: refine records
blockedand names the next open item only. Stage and implement say "depends on the open issue #N". The items wait with no end, and no inbox line names a cycle.
Environment Diagnostics
- DevOps CLI Version: 0.180.0 (origin/main 0d90de5).
- Execution Environment: the roadmap Service rounds of 2026-11-14 to 2026-11-16 wrote the records. The graph was read on 2026-11-19 through the GitHub REST API.
Logs, Traces, or Terminal Output
$ devops roadmap explain 4814
Refine job: no. The item is Ready. A round takes a Ready item only when no round refined it, or when it holds a covering tool that no round asked about.
Stage job: no. The item depends on the open issue #4691.
Implement job: no. The item depends on the open issue #4691.Pre-Submission Checklist
- I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
- I have checked existing issues and pull requests to ensure this is not a duplicate. Searches: "dependency cycle", "circular dependency", "deadlock refine", "dependency loop", "mutual dependency". feat(roadmap): a blocker inherits the priority of what it blocks #5510 uses
graphlibfor the priority of blocked-by links, not for refine. feat(roadmap): the split row files the parts of a stalled item #4819 checks the order of split parts only.
Existing Tool Considered
graphlib.TopologicalSorter of the Python standard library finds a cycle and names its path. src/devops_cli/core/import_graph.py:18 already uses it for the import graph. No new dependency is necessary.
Acceptance Criteria
- Test first: a store with items A and B, where the record of A names B and the Dependencies section of B names A. Refine gives each item a person step that names the cycle
A → B → A. The test fails on the base. - A test: the stage and implement reason for an item in a cycle names the cycle, not only "depends on the open issue".
- A test: an item whose dependency is open but not in a cycle keeps the step
blocked. - The graph is read once for each round from the listing that the round already holds. The round sends no extra GitHub request.
- Live proof: after the release, the next refine round gives feat(k8s): add the CI gate WorkflowTemplate #4691 or feat(roadmap): read project review facts through a catalog #4692 a person step that names its cycle.
Dependencies
None.
Alternatives check of 2026-11-19: in-use.
The item already names this tool.
Tool: python/cpython (https://github.com/python/cpython), NOASSERTION, last activity 2026-11-19, maintained.
Reason: Searches found no cycle-detection tool beyond the standard-library sorter that the issue already names and uses for the import graph; it finds a cycle and names its path, so only a small adapter remains.
Covers:
- Raises CycleError that names the cycle path
- Standard library module, no new dependency
- Graph build makes no network or store call
Lacks:
- Reads no issue record or Dependencies section
- Writes no refine step or stage/implement reason
- Names one cycle per prepare(); a repeat pass per group is needed
Proposed design
Problem statement
Refine, stage and implement read the declared dependencies of an open item one edge at a time. When item A waits on B and B waits on A, each job names only the next open item, so both items wait with no end and no inbox line names the cycle. The change adds a cycle check to the shared dependency read. It records a person step that names the path, so a person can remove one edge.
Acceptance criteria
Requirement: Refine records a person step for a cycle
Refine SHALL record a step that asks a person, and not blocked, for an open item that a dependency leads back to.
Scenario: Two items in a cycle
- WHEN a test refines a fake store with items A and B, where the record of A names B and the Dependencies section of B names A
- THEN the refine record of A and of B holds a step that is not
blocked, and its reason names the cycleA → B → A.
Requirement: Stage and implement name the cycle
The shared dependency read MUST give a reason that names the full cycle for an item that a dependency leads back to.
Scenario: The reason that stage and implement give
- WHEN a test calls
open_dependency, which the stage and implement jobs call, for item A with a fake store and the item sequence that holds the cycleA → B → A - THEN the reason names the cycle
A → B → A, and not only the open issueB.
Requirement: An open dependency outside a cycle stays blocked
An item whose open dependency is in no cycle MUST keep the step blocked.
Scenario: Open dependency with no cycle
- WHEN a test refines a fake store where item A depends on the open item B, and B depends on no open item
- THEN the refine record of A holds the step
blockedand its reason names no cycle.
Requirement: One graph for each round
The cycle check MUST build its graph from the item sequence of the round and MUST make no store or GitHub call.
Scenario: The check makes no call
- WHEN a test gives the check the item sequence of a round that holds the cycle
A → B → Aand a fake store that counts each call - THEN the check returns the path
A → B → Aand the fake store counts no call.
Requirement: Each item of a shared cycle is named
The check SHALL name a path for each item of a cycle, also when two cycles share an edge.
Scenario: Two cycles that share an edge
- WHEN a test gives the check the items of the cycles
A → B → AandA → B → C → A - THEN the check returns a path for each of A, B and C.
Requirement: The live roadmap names the cycle
After the release, devops roadmap explain MUST name the cycle that holds an item of a group that a person made.
Scenario: Explain names the cycle
- WHEN a person runs
devops roadmap explain 4692on the live repository after the release - THEN the output names the cycle that holds feat(roadmap): read project review facts through a catalog #4692, and not only the next open item.
Existing Tool Considered
graphlib.TopologicalSorter of the Python standard library (python/cpython), verdict in-use: the issue already names the tool, and src/devops_cli/core/import_graph.py:18 uses it for the import graph. The alternatives check of 2026-11-19 in the issue body gives what the tool covers and what it lacks. The proposal fills the one gap that the block names, and it does so without a repeat pass: the round calls TopologicalSorter(graph).prepare() once, and when it raises CycleError the check walks the one graph from each item's open dependencies back to that item. An edge that two cycles share then cannot hide one of them. The adapter is about 15 lines in src/devops_cli/roadmap/dependencies.py and adds no dependency.
Key questions
- Which tool detects a dependency cycle?:
graphlib.TopologicalSorterof the Python standard library. The alternatives check of 2026-11-19 gives the verdictin-use, and the project already uses the module for the import graph. (best practice) [sources: src/devops_cli/core/import_graph.py:18]- Chosen: graphlib.TopologicalSorter. Standard library, already used at src/devops_cli/core/import_graph.py:18; no new dependency.
- Rejected: networkx. Adds a dependency for a check that the standard library gives.
- Rejected: a hand-written topological sort. Keeps a sort and a cycle check in the project that the standard library gives and tests.
- Where does the cycle check live?: In
src/devops_cli/roadmap/dependencies.py, besideopen_dependency. The stage and implement jobs call that function, and refine reads the same body dependencies, so one change reaches all three jobs. (best practice) [sources: src/devops_cli/roadmap/dependencies.py, src/devops_cli/roadmap/refine/refine.py:1498, src/devops_cli/roadmap/stage/stage.py:771, src/devops_cli/roadmap/implement/implement.py:379]- Chosen: dependencies.py beside open_dependency. The shared read; stage and implement call it and refine reads the same section.
- Rejected: a new module src/devops_cli/roadmap/cycle.py. A second module for one function; each call site imports two modules.
- Rejected: inside refine.py only. Stage and implement keep the old reason and name no cycle.
- How does the round build the graph one time and send no request?: The round builds one graph from the item sequence that it already holds and gives it to each call. The check reads no issue and sends no request. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py:1418, src/devops_cli/roadmap/dependencies.py]
- Chosen: one graph for each round, passed to each call. The round holds the item listing, so one build and no request.
- Rejected: build the graph in each call. The same graph is built one time for each item of the round.
- Rejected: read each dependency record from GitHub. An extra request for each item, and the round already holds the listing.
- How does the check name the cycle of each item, also when two cycles share an edge?: The round calls
TopologicalSorter(graph).prepare()once. When it raisesCycleError, the check walks the one graph from each item's open dependencies back to that item and records the path. Each item in a cycle gets its own path. (best practice) [sources: src/devops_cli/core/import_graph.py:18]- Chosen: prepare() once as the gate, then a walk for each item. A path for each item; an edge that two cycles share cannot hide one of them, as feat(roadmap): read project review facts through a catalog #4692's group shows.
- Rejected: one prepare() and the first CycleError path. Names one cycle for each round, so the other groups keep waiting.
- Rejected: repeat prepare() with the closing edge removed. An edge removed for one cycle breaks another cycle that shares it, so its items stay unnamed.
- What does refine record for an item in a cycle?: A step that asks a person, with the path in its reason.
blockedsays the item waits on an outside event, and a cycle waits on no outside event, so a person must remove one edge. (best practice) [sources: CONTEXT.md, src/devops_cli/roadmap/refine/refine.py:1504, src/devops_cli/roadmap/refine/refine.py:3308]- Chosen: the step that asks a person, with the cycle in the reason. The issue asks for a person step, and a person must remove one edge.
- Rejected: keep blocked and add the cycle to its reason. CONTEXT.md gives blocked as a wait on an outside event, and no person acts on it.
- Rejected: a new step value for a cycle. A new value in the step vocabulary for one case.
- What do the stage and implement jobs say for an item in a cycle?:
open_dependencyreturns the cycle reason. The stage and implement call sites change nothing and name the path. (best practice) [sources: src/devops_cli/roadmap/dependencies.py, src/devops_cli/roadmap/stage/stage.py:771, src/devops_cli/roadmap/implement/implement.py:379]- Chosen: open_dependency returns the cycle reason. One change gives stage and implement the cycle at their call sites.
- Rejected: change each call site in stage and implement. Three copies of the same logic.
- Does the round hold the item records that the graph needs?: Yes. Refine holds the items of the round and gives that sequence to the dependency read, so the check builds its graph from it and sends no request. [sources: src/devops_cli/roadmap/refine/refine.py:1418, src/devops_cli/roadmap/dependencies.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 19, 2026
Six groups of open items are permanently stuck with no end, blocking downstream work.Both deal with refine blocking an item on an open dependency, but #3500 fixes a single open dependency blocking while the candidate detects a multi-edge cycle that no single fix can resolve.devops-cli-service commentedon Nov 19, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
devops-cli-service commentedon Nov 19, 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 (8)
Tools considered:
Searches run:
https://docs.python.org/3/library/graphlib.html, results: 5Sources:
devops-cli-service commentedon Nov 19, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
12 remaining items
fix(roadmap): Add the dependency graph and the cycle path of an item (#…
fix(roadmap): Name the cycle in the shared dependency reason (#6449)
fix(roadmap): Prove the stage reason names the cycle (#6449)
fix(roadmap): Prove the implement reason names the cycle (#6449)
wip: 1 of 2 tasks of group 5, Give a dependency cycle a person step i…
fix(roadmap): Give a dependency cycle a person step in refine (#6449)
docs(openspec): archive the change (#6449)
devops-cli-service commentedon Nov 20, 2026
Pull request #6505 is ready for review. The checks passed.
Spend: 225 model requests, 21620705 input tokens, 88542 output tokens.
devops-cli-service commentedon Nov 20, 2026
Released in v0.183.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.183.0
devops-cli-service commentedon Nov 20, 2026
Live since 2026-11-20 16:25 UTC