Repository navigation
Description
Problem
A scoped update can read every issue of the repository. Each webhook delivery that runs an intake update then costs a full listing. Evidence from #3497, in the window 2026-11-03T15:05Z to 2026-11-04T15:05Z:
_execute_scopedruns with no row (src/devops_cli/server/service.py:559), so its requests count asother. devops-cli has 4683 requests in that row.candidatesanditemsread_every_issue(src/devops_cli/roadmap/github_store.py:698,:665), and_every_issuereadsstate=all(:1019). That is about 35 pages for this repository. This is inferred from the highest issue number.
Expected
Scoped intake has a bounded read. It reads the issue of the event and a window of recent changes, up to a set number of pages. The reconciling poll stays the full read, as ADR 0017 states, so a scoped update hides no change.
The refine plan on #3497 proposes a setting with a limit of 10 pages for one scoped run. The plan of this item confirms the limit against the code, and states what the update does when it gets to the limit.
Acceptance criteria
- A test: scoped intake reads a bounded number of pages.
Existing tool considered
The GitHub issue listing has the since parameter, and the session already reads pages. This change adds no library.
Related
Split from #3497, which holds the evidence. It holds criterion 6 of that issue.
Source: #3497
Proposed design
Problem statement
A scoped intake run lists every issue of the repository. _every_issue reads state=all, so one webhook delivery costs about 35 pages, and devops-cli counts 4683 requests in the other row. The change bounds the pages that a scoped run reads to the issue of the event and a window of recent changes. The reconciling poll keeps the full read, so the scoped run hides no change.
Acceptance criteria
Requirement: Bounded page count in a scoped run
A scoped intake run SHALL send at most roadmap.intake.scoped_max_pages issue-listing page requests.
Scenario: A scoped run stops at the page limit
- WHEN A scoped intake run lists recent changes and the page limit is 10.
- THEN The store sends at most 10 page requests and sends no 11th request.
Requirement: Full read in the reconciling poll
The reconciling poll MUST read the issue listing to its last page.
Scenario: The poll reads every page
- WHEN The poll lists the issues of a repository that has more pages than the scoped limit.
- THEN The store follows each next-page link and returns the issues of every page.
Requirement: Warning at the page limit
A scoped run that stops at the page limit SHALL log one warning that names the limit and the repository.
Scenario: The store reaches the last permitted page
- WHEN The store reads the last permitted page and GitHub reports a next page.
- THEN The run logs one warning with the limit and the repository, and the run completes without error.
Requirement: Page limit setting
The page limit of a scoped run SHALL be the setting roadmap.intake.scoped_max_pages, with a default of 10.
Scenario: The setting is absent
- WHEN The setting is absent from the configuration.
- THEN A scoped run sends at most 10 page requests.
Existing Tool Considered
No alternatives check has run. The GitHub REST issue listing covers the need: it has the since parameter to bound the window and per_page with Link pagination to bound the pages, and the store already reads pages. It lacks a request for the last N changes, so the client must stop at the page limit. The change adds no library and no new dependency.
Key questions
- Which number bounds the pages of one scoped run?: 10 pages, held in the setting
roadmap.intake.scoped_max_pages. (best practice) [sources: src/devops_cli/roadmap/github_store.py:1104, docs/adr/0017-each-subscribed-webhook-event-runs-the-update-scoped-to-it.md]- Chosen: A setting with a default of 10. The plan of fix(service): the rows stop repeating reads that find no change #3497 proposes 10, and an operator can lower the limit without a release.
- Rejected: A fixed constant of 10. An operator cannot change it without a release.
- Rejected: No limit. It keeps the full listing that the change removes.
- What does a scoped run read?: The issue that the event names and the issues updated since the last reconciling poll, up to the page limit. (best practice) [sources: docs/adr/0017-each-subscribed-webhook-event-runs-the-update-scoped-to-it.md]
- Chosen: The event issue and the issues updated since the last poll. The scoped update sees the event and every change since the last full read.
- Rejected: The event issue only. A related change waits for the next poll.
- Rejected: Every issue. It is the full listing that the change removes.
- What does a scoped run do when it reaches the page limit?: It stops after the last permitted page. It logs one warning that names the limit and the repository. It returns the issues that it read, and the next reconciling poll reads the full listing. (best practice) [sources: docs/adr/0017-each-subscribed-webhook-event-runs-the-update-scoped-to-it.md]
- Chosen: Stop and warn. The bound stays, and the poll reconciles the rest.
- Rejected: Fall back to a full read. It removes the bound and costs the pages that the change saves.
- Rejected: Fail the round. A busy repository would block intake.
- Does the reconciling poll keep the full read?: Yes. The poll reads every page, so a scoped run that stops at the limit hides no change. (best practice) [sources: docs/adr/0017-each-subscribed-webhook-event-runs-the-update-scoped-to-it.md]
- Chosen: Full read in the poll. ADR 0017 makes the poll the reconciling path.
- Rejected: Bounded read in the poll. A change after the limit would never reach the roadmap.
- Which calls read every issue today?:
itemsat line 719,candidatesat line 752 and the open-issue listing at line 816. All three call_every_issueat line 1104, which readsstate=all. [sources: src/devops_cli/roadmap/github_store.py:719, src/devops_cli/roadmap/github_store.py:752, src/devops_cli/roadmap/github_store.py:816, src/devops_cli/roadmap/github_store.py:1104]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-08: partly.
Tool: gidgethub/gidgethub (https://github.com/gidgethub/gidgethub), Apache-2.0, last activity 2026-09-25, maintained.
Activity
dan-petty commentedon Nov 5, 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.Every webhook delivery pays for a full 35-page listing, but the system still functions.It cuts API cost per webhook delivery, but does not change correctness.The change adds a page limit to an existing read and one test.Both work on scoped roadmap updates; #2009 delivers the scoped update mechanism, while this item adds a page-count limit to its read.fix(service): count each GitHub request with its HTTP status (#3686)
devops-cli-service commentedon Nov 7, 2026
Status set to Ready at 0550497 (see proposed design in issue body).
devops-cli-service commentedon Nov 8, 2026
Alternatives check: partly
Reason: gidgethub, the async GitHub API library that the project's session already sends its GitHub requests through (ADR 0006), is an open, maintained library that makes the issue-listing requests with the REST parameters the scoped read needs (
since,per_page, page URLs) without hiding the GitHub API, so no new library is required. It supplies no page cap, no warning when a limit is reached and noroadmap.intake.scoped_max_pagessetting, so the stop-at-the-limit behaviour and its test stay in the store's own code, as the issue proposes.Tool: gidgethub/gidgethub (https://github.com/gidgethub/gidgethub)
Covers:
sinceandper_page, without a model layer in the wayLacks:
roadmap.intake.scoped_max_pagessetting or defaultTools considered:
Searches run:
Sources:
Checked on 2026-11-08. A person decides what this means for the item. The check changes no label and closes no issue.
dan-petty commentedon Nov 11, 2026
Scope from the project brain plan (2026-11-11)
This item is child 2 of the project brain plan #4624. It keeps its title and its parent #3497. The solution changes as follows.
Measured (24 h): the Service rows
other(scoped updates) andintakesent 27,138 GitHub requests (11,014 counted 200 answers and 16,113 answers of 304) for about 800 intake rounds (799 successes). The Service reads every issue in each round (_every_issue, twice a round), because only the CLI intake usesIncrementalListing(src/devops_cli/commands/roadmap.py:215). The snapshot also drops at each package version (src/devops_cli/roadmap/stores/listing_snapshot.py:173), and 117 releases came in 7 days.New solution:
IncrementalListingof perf(roadmap): intake reads only the issues that changed #4552 withFileSnapshotStoreon the Service volume (RESTsincethe watermark). The full read every 24 h stays (ADR 0017).IssueRecord.model_json_schema(), in place of the package version. A test pins it.New acceptance criteria:
IssueRecordschema reuses the snapshot, and a schema change drops it.sum(increase(devops_cli_github_requests_total{job="roadmap-service",row=~"other|intake"}[24h]))is under 3,000 (27,138 before).The tiered cache child of #4624 (#4668) builds on this item: it adds the shared Valkey tier behind the same seam.
dan-petty commentedon Nov 11, 2026
Changed solution
The plan of this item changes. The title stays.
IncrementalListingandFileSnapshotStore(perf(roadmap): intake reads only the issues that changed #4448) inlistingof the state directory of the Service, on its volume. A round with a kept snapshot reads only the issues changed since the watermark: one request when 100 or fewer changed. The full read every 24 hours stays. The snapshot keys to the schema ofIssueRecord(the first 16 hex characters of the sha256 of its JSON schema), not to the package version, so a release that keeps the schema keeps the snapshot.Evidence, Prometheus, 2026-11-11: the rows
intakeandotherof the Service sent 28,317 GitHub requests in 24 hours. In the last 2 hours the triage lane ran 78 rounds and sent 2,568GETrequests, about 33 a round. #4522 already moved the requests of the scoped intake fromothertointake.Acceptance:
IssueRecordschema keeps the snapshot, and another schema drops it.sum(increase(devops_cli_github_requests_total{job="roadmap-service",row=~"other|intake"}[24h]))is less than 3,000.devops-cli-service commentedon Nov 11, 2026
Released in v0.112.3: https://github.com/dan-petty/devops-cli/releases/tag/v0.112.3
devops-cli-service commentedon Nov 11, 2026
Live since 2026-11-11 19:36 UTC