Repository navigation
Description
Problem or Motivation
Intake is due only on a REOPENED change or on a pending candidate (src/devops_cli/roadmap/run.py:414-422). The change feed reads the repository issue events (src/devops_cli/roadmap/stores/github_store.py:756-773), and ChangeKind has no OPENED member (src/devops_cli/roadmap/stores/store.py:125-132).
So when the scoped update of a new issue is lost (no replica during a rollout, or a lost queue entry), the new issue waits for the intake interval of 29 minutes (src/devops_cli/config/defaults.py:813). No replica receives webhooks for about 37 minutes a day, so this happens on most days.
Proposed Solution & Architectural Design
- First check whether the issue events endpoint reports an
openedkind. If it does, addChangeKind.OPENEDand make intake due on it. - If it does not: make intake due when the repository has an issue newer than the newest issue number that the intake record saw. Use one conditional list request for each due check (
GET /repos/{repo}/issues?state=all&sort=created&direction=desc&per_page=1), which the long-lived Service mostly answers with 304. The intake record keeps the newest issue number that it saw. - The batch run finds nothing to decide when the scoped update already decided the issue, and sends no model request.
Coordinate with #4448 (intake reads only the issues that changed) and #4412 (routes issues webhooks past scoped intake), which change near code.
Target Subsystem
SDLC, Git & PR Governance (roadmap intake: src/devops_cli/roadmap/run.py, src/devops_cli/roadmap/stores/).
Existing Tool Considered
The GitHub REST issue list with sort=created, or the issue events feed. No new tool. Cost: about 50,000 tokens and 2 hours to build, about 2,000 tokens a month to keep, about 5,000 tokens to fix. One more request for each poll of each repository (7 repositories every 300 s: about 84 an hour, most of them 304).
Acceptance Criteria
- A fail-to-pass test: a new issue with no scoped update makes intake due in the next poll.
- An issue that the scoped update already decided makes the batch run find nothing to decide and send no model request.
- The pull request cites the
devops ci fail-to-pass --base <ref>output. - Measure after the merge: the time from delivery to intake decision for an issue whose delivery failed is 5 minutes or less (today up to 30).
Dependencies
None.
Source: #4517
Proposed design
Problem statement
Intake is due only on a REOPENED change or a pending record. A new issue whose scoped update is lost waits for the 29-minute intake interval. This change makes intake due at the next poll by comparing the newest item number with the intake record.
Acceptance criteria
Requirement: New item makes intake due
The newest-item rule SHALL make intake due when the newest item number is greater than the recorded number.
Scenario: New issue without a scoped update
- WHEN The record holds 100 and the issue list returns item 101 with no scoped change.
- THEN
_intake_duereturns true.
Requirement: Unchanged item is not due
The newest-item rule SHALL make intake due only when the newest item number is greater than the recorded number.
Scenario: Conditional request returns 304
- WHEN The issue list request returns 304 and the record holds 100.
- THEN
_intake_duereturns false and makes no second request.
Requirement: Pull request does not hide a new issue
The newest-item rule MUST make intake due when a pull request is newer than an issue with no scoped update.
Scenario: Pull request is newer than the lost issue
- WHEN The record holds 100, issue 101 has no scoped update, and pull request 102 is the newest item.
- THEN
_intake_duereturns true.
Requirement: Record advances after success
The intake run SHALL write the newest item number to the record only after the batch run completes without an error.
Scenario: Successful intake run
- WHEN The run starts with record 100, decides issue 101, and completes.
- THEN The record holds 101 and the next due check returns false.
Requirement: No model request for a decided issue
The intake batch SHALL send no model request when the scoped update already placed every candidate on the roadmap.
Scenario: Already decided issue
- WHEN The due check makes intake due and no open issue lacks a
priority/*label. - THEN The model client receives zero calls.
Requirement: Existing due rules stay
The due check SHALL keep the existing REOPENED and pending-record rules.
Scenario: Reopened change
- WHEN A change has kind
REOPENEDand the record is not pending. - THEN
_intake_duereturns true without the newest-item request.
Requirement: Request failure makes intake due
The due check SHALL make intake due when the newest-item request fails, and the record MUST stay unchanged.
Scenario: Issue list request fails
- WHEN The store raises a network error for the issue list request.
- THEN
_intake_duereturns true and the record holds its old number.
Requirement: Fail-to-pass test
The change SHALL add a regression test that fails on the base revision and passes with the change.
Scenario: Base revision fails
- WHEN The new regression test runs on the base revision.
- THEN The test fails.
Requirement: Fail-to-pass evidence
The pull request SHALL cite the devops ci fail-to-pass --base <ref> output for the new regression test.
Scenario: Pull request cites fail-to-pass output
- WHEN The pull request is opened.
- THEN The body contains the command output.
Existing Tool Considered
No alternatives check has run. The GitHub REST issue list endpoint (GET /repos/{repo}/issues?state=all&sort=created&direction=desc&per_page=1) covers the read, and the existing GitHub store covers the request. The endpoint lacks an issues-only filter, so the code must treat pull requests as items. No new dependency is needed. Cost: about 50,000 tokens and 2 hours to build, about 2,000 tokens a month to keep, about 5,000 tokens to fix. It adds one conditional request for each poll of each repository: 7 repositories every 300 s, about 84 an hour, most answered with 304.
Key questions
- Does the GitHub issue events endpoint report an
openedevent?: No. The issue events endpoint reportsclosed,reopened,labeledandunlabeledevents, but notopened. Theissueswebhook reportsopened. Do not addChangeKind.OPENED; use the newest-item check. [sources: src/devops_cli/roadmap/stores/store.py:125-132, src/devops_cli/roadmap/stores/github_store.py:756-773] - How should the due check find a new issue when the issue events report no
openedevent?: Use one conditionalGET /repos/{repo}/issues?state=all&sort=created&direction=desc&per_page=1request. Compare the returned item number with the record'snewest_item_number. The endpoint returns pull requests too, so treat a pull request number as a new item. This never misses an issue behind a newer pull request. The batch run filters candidates. (best practice) [sources: src/devops_cli/roadmap/run.py:414-422, src/devops_cli/roadmap/stores/github_store.py:756-773]- Chosen: Newest item number with one conditional request. It uses one request, supports 304 caching, and never misses an issue behind a newer pull request.
- Rejected: Search API with
is:issue. It has a lower rate limit, indexing lag, and weaker conditional caching. - Rejected: Page through the issue list until a non-pull-request item. It can make many requests when pull requests fill the first page.
- Rejected: Keep the 29-minute interval. It leaves the lost-delivery delay in place.
- When should the intake record advance the newest item number?: Advance the record only after a batch run completes without an error. Leave the record unchanged on a 304 or an unchanged number. On a request error, make intake due and leave the record unchanged so the next poll retries. (best practice) [sources: src/devops_cli/roadmap/run.py:414-422, src/devops_cli/roadmap/intake/intake.py]
- Chosen: Advance after a successful batch run. A failed run must see the same new item again on the next poll.
- Rejected: Advance during the due check. A failed run would lose the new item until another item opens.
- Rejected: Advance after each issue decision. A later error in the same batch would hide the remaining issues.
- What should the due check do when the newest-item request fails?: Make intake due. The run raises with the error. The record stays unchanged, so the next poll retries. (best practice) [sources: src/devops_cli/roadmap/run.py:414-422]
- Chosen: Make intake due. It follows the existing rule that an unreadable record makes intake due and names the error.
- Rejected: Return not due. It hides the error and delays the new issue until another item opens.
- Rejected: Raise from the due check. It fails the row before the intake run can report the cause.
- How does the batch run avoid a model request when the scoped update already decided the issue?: Keep the existing candidate query. It lists open issues without a
priority/*label. When the scoped update already set the label, the list is empty. The run then sends no model request. [sources: src/devops_cli/roadmap/intake/intake.py, src/devops_cli/roadmap/run.py:414-422] - Are perf(roadmap): intake reads only the issues that changed #4448 and fix(service): route issues webhooks past scoped intake #4412 dependencies for this change?: No. They change nearby code, but neither blocks this change. Rebase if a conflict occurs. (best practice) [sources: src/devops_cli/roadmap/run.py:414-422, src/devops_cli/roadmap/intake/intake.py]
- Chosen: No dependency. The change can merge first and rebase on the later code.
- Rejected: Wait for both issues. It delays a fix for a daily lost-delivery case with no technical need.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(roadmap)scope of the title gives the scope.New issues wait up to 29 minutes on most days when the scoped update is lost, but polling still resolves it.Reduces intake wait from up to 29 minutes to about 5 minutes for new issues whose scoped update was lost.The candidate gives a clear two-path design and estimates about 2 hours to build.Both deal with issues webhooks and intake, but #4412 fixes routing gaps for edited events while the candidate adds a new OPENED trigger for when no event arrives.devops-cli-service commentedon Nov 11, 2026
Status set to Ready at 5f75d25 (see proposed design in issue body).
fix(roadmap): make intake due when a new issue opens
devops-cli-service commentedon Nov 11, 2026
Released in v0.112.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.112.0
devops-cli-service commentedon Nov 11, 2026
Live since 2026-11-11 14:13 UTC