Repository navigation
Description
Problem Description
Refine reads the state of each recorded blocker with one GitHub request. _is_open (src/devops_cli/roadmap/refine/refine.py, near line 1719) calls store.item(number), and GitHubRoadmapStore.item reads the issue with one gh api subprocess with no cache (issue -> _read_or_none, use_cache=False, src/devops_cli/roadmap/stores/github_store.py near lines 823-833 and 1498). _open_blockers (each blocked wait) and _open_dependencies (each proposal) call it once for each number. open_issue_dependencies (src/devops_cli/roadmap/dependencies.py) does the same for stage and implement.
But each round already holds the open listing (store.open_items()), which tells which Items are open. An Item that is not in the open listing is closed, or it is no Item, and both give no blocker.
Measured on 2026-11-20 by a review of PR #6548 (read only, 803 open items): the 202 blocked items make 331 recorded-blocker reads in each refine round. After #6450 (PR #6548), a blocked item that named a tracker records the open sub-issues of that tracker, so the reads go to 391 (#4733 from 5 to 41, #5525 from 1 to 16).
Reproduction Steps
- Count the calls of
store.itemin onedevops roadmap refineround without--confirm(or indevops roadmap explainof a blocked item). - Each number in
refine.blocked_byof each blocked item gives onegh api repos/<repo>/issues/<n>read.
Expected vs Actual Behavior
- Expected: a round reads the state of a blocker from the open listing that it already holds, and makes no request for each blocker.
- Actual: one uncached
gh apiread for each recorded blocker in each round.
Environment Diagnostics
devops-cli at main aa7cae7 (2026-11-20).
Dependencies
None.
Acceptance Criteria
- A test: a refine round over blocked items with recorded blockers makes no
store.itemread for a blocker; the open listing decides. - The same for the dependency reasons of stage and implement.
- A blocker that is open but no Item keeps its current result (no blocker).
Alternatives check of 2026-11-20: not-applicable.
Class: perf, no search.
Tool: none found.
Proposed design
Problem statement
Refine reads the state of each recorded blocker with one uncached gh api request through store.item. A round already holds the open listing from store.open_items(). On 2026-11-20 a review of PR #6548 measured 331 blocker reads in each refine round over 202 blocked items. After #6450 that count rises to 391. The round can decide blocker state from the listing that it holds and make no request for a blocker. Stage and implement read dependency state the same way through open_issue_dependencies.
Acceptance criteria
Requirement: Refine reads blocker state from the open listing
A refine round SHALL decide whether each recorded blocker is open from the open listing that the round holds, and MUST make no store.item read for a blocker number.
Scenario: Blocked items with recorded blockers
- WHEN a refine round runs over blocked items whose
refine.blocked_byrecords blocker numbers, against a store that counts eachitemcall - THEN the round records the blockers that the open listing holds and the store counts no
itemcall for a blocker number
Requirement: Stage and implement read dependency state from the open listing
open_issue_dependencies SHALL take the open item numbers of the listing and MUST make no store.item read for a dependency number.
Scenario: Stage or implement over an item with recorded dependencies
- WHEN a stage or implement round calls
open_issue_dependencieswith the open numbers and a store that counts eachitemcall - THEN the call returns the open dependencies from those numbers and the store counts no
itemcall for a dependency number
Requirement: An open blocker that is no Item stays no blocker
A recorded blocker number that the open listing does not hold MUST give no blocker, even when its issue is open.
Scenario: Open issue with no priority label
- WHEN the open listing holds no item for a recorded blocker number and the store would return an open item for that number
- THEN the round reports no open blocker for that number and the store counts no
itemcall for it
Existing Tool Considered
The alternatives check of 2026-11-20 records not-applicable with tool none found, class perf, no search. The alternatives block in the issue body holds the result. No open tool or library covers this need, because the need is fewer gh api reads in the project's own refine round. The change reuses GitHubRoadmapStore.open_items(), which each round already holds. It adds no dependency and no new code to keep. Written cost: one small refactor of _is_open, _open_blockers, _open_dependencies and open_issue_dependencies, in one pull request.
Key questions
- Does each refine round already hold the open listing?: Yes. The round calls
store.open_items()to select the items, so it holds the item numbers of the open listing before it reads a blocker. [sources: src/devops_cli/roadmap/refine/refine.py, src/devops_cli/roadmap/stores/store.py, src/devops_cli/roadmap/stores/github_store.py] - How does a refine round decide whether a recorded blocker is open?: The round builds one set of the item numbers in
store.open_items()and testsnumber in open_numbers._is_opengoes, and_open_blockersand_open_dependenciestake the set. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py:2865, src/devops_cli/roadmap/refine/refine.py:1760, src/devops_cli/roadmap/stores/github_store.py:1420]- Chosen: One set of open numbers per round. The round already holds the listing, so the set costs no request, and a number that is not in it is closed or is no Item.
- Rejected: Cache the
store.itemresult for the round. It keeps onegh apiread for each blocker on its first look, and the issue asks for none. - Rejected: Keep the
store.itemread for each blocker. It makes the 331 to 391 uncached reads that the issue measures.
- How do stage and implement give
open_issue_dependenciesthe open numbers?:open_issue_dependenciestakes a requiredopen_numbersargument. Each caller passes the numbers of the listing that it holds, and no caller falls back tostore.item. (best practice) [sources: src/devops_cli/roadmap/dependencies.py, src/devops_cli/roadmap/refine/refine.py:1760]- Chosen: Required
open_numbersargument. A required argument makes each caller pass the listing, so no path keeps the read for each number. - Rejected: Optional argument with a
store.itemfallback. The fallback keeps the reads that the issue removes, and a caller that forgets the argument keeps them with no error. - Rejected: Read the listing inside
open_issue_dependencies. It adds a listing read for each call, and each caller already holds the listing.
- Chosen: Required
- What does a blocker number that the open listing does not hold give?: No blocker. A number that the listing does not hold is closed or is no Item, and the round reports no blocker for it. The change keeps the current result of an open issue with no priority label. (best practice) [sources: src/devops_cli/roadmap/refine/refine.py:2865, CONTEXT.md]
- Chosen: No blocker. The current
store.itemresult is no blocker for an open issue with no priority label, so the change keeps the result that the body asks to keep. - Rejected: Read the issue to tell a closed issue from no Item. It makes the request that the issue removes, and both cases give no blocker.
- Chosen: No blocker. The current
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 20, 2026
Both work on blocker state in refine, but #6450 changes what counts as a blocker (trackers) while the candidate changes how state is read (open listing vs. per-item calls).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.215.0 (#7057)
devops-cli-service commentedon Nov 25, 2026
Released in v0.215.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.215.0
devops-cli-service commentedon Nov 25, 2026
Live since 2026-11-25 04:21 UTC