Repository navigation
Description
Problem or Motivation
Each devops roadmap intake run reads the full state=all issue listing of the repository: 45 pages, 4,431 issues and pull requests. In three profiled --plan runs (#4404), the page transfer took 55 s, 80 s and 75 s. Of that time, the pacing of the rate limiter took 4 s, 31 s and 28 s, because other agents share the quota.
The GitHub session keeps the ETag of each page only in memory (#1692). A CLI run is a new process, so each run reads all 45 pages again in full, and each page costs one request of the quota.
#3670 bounds the read of a scoped Service update. A new candidate on the CLI still needs the full comparison set: every item and every issue closed as not planned.
Proposed Solution & Architectural Design
Read only what changed since the last run. The plan chooses one of these:
- Keep the session's conditional-request answers (ETag and items) on disk, so an unchanged page gets a 304. GitHub does not count a 304 against the primary rate limit.
- Keep a snapshot of the listing under the data directory and read only the issues changed since it, with the
sinceparameter of the listing, sorted by update time.
The snapshot also holds the split body and record of each issue, so the body parse runs only for the issues that changed.
Target: the whole intake call takes 1 minute or less (#4404). This item cuts the GitHub read to 10 s or less when 20 or fewer issues changed since the last run.
Target Subsystem
roadmap
Existing Tool Considered
The GitHub session already sends conditional requests (#1692), and the REST listing has the since parameter. hishel is an open HTTP cache for httpx that persists conditional answers; the plan checks if it fits the httpx2 transport of the session. The plan states the cost if it builds instead.
Source: #4404
Proposed design
Problem statement
Each devops roadmap intake run reads all 45 pages of the state=all issue listing, which holds 4,431 issues and pull requests. The read took 55 s, 80 s and 75 s in three profiled runs, and the rate limiter took up to 31 s of that time. The session keeps the ETags only in memory, so each new process reads every page in full and spends one request of the quota for each page. Intake will read only the issues that changed since the last run, from a snapshot under the data directory.
Acceptance criteria
Requirement: Incremental listing read
Intake MUST request the issue listing with the stored watermark in the since parameter, with state=all, sort=updated and direction=asc.
Scenario: Second run requests only changed issues
- WHEN The snapshot holds a watermark and 20 issues changed since it
- THEN The recorded request URL holds
since=<watermark>,state=all,sort=updatedanddirection=asc.
Requirement: Bounded page count
A run MUST send at most 2 page requests of the issue listing when 20 or fewer issues changed since the watermark.
Scenario: Few changed issues
- WHEN The stub transport returns 20 changed issues on the first page and an empty second page
- THEN Intake sends exactly 2 page requests of the listing.
Requirement: Snapshot merge
Intake SHALL merge each issue of the incremental read into the snapshot and keep every item and every issue closed as not planned.
Scenario: A changed issue replaces its record
- WHEN An issue in the snapshot arrives with a new title and a later
updated_at - THEN The snapshot holds one record for that issue number, and its title is the new title.
Requirement: Body parse on change only
Intake SHALL parse the body of an issue only when the issue is absent from the snapshot or changed in the read.
Scenario: Unchanged bodies are not parsed
- WHEN 20 of 4,431 issues changed since the watermark
- THEN The body parser runs 20 times.
Requirement: Watermark overlap
Intake MUST store the UTC start time of the read minus 60 seconds as the next watermark.
Scenario: The stored watermark precedes the read
- WHEN The read starts at 2026-01-01T10:00:00Z
- THEN The snapshot stores 2026-01-01T09:59:00Z as its watermark.
Requirement: Full read on a missing snapshot
Intake SHALL do a full listing read and write a new snapshot when the repository has no readable snapshot.
Scenario: First run
- WHEN No snapshot file exists for the repository
- THEN The request holds no
sinceparameter and the run writes a snapshot with every issue of the listing.
Requirement: Full read on request
devops roadmap intake --full MUST read the full listing and replace the snapshot.
Scenario: The flag ignores the watermark
- WHEN The operator passes
--fulland a snapshot exists - THEN The request holds no
sinceparameter and the new snapshot replaces the old one.
Requirement: Atomic snapshot write
Intake SHALL write the snapshot through a temporary file and a rename in the same directory.
Scenario: A failed write keeps the old snapshot
- WHEN The write of the temporary file raises an error
- THEN The old snapshot file is unchanged and intake reports the error.
Existing Tool Considered
No check has run. hishel (https://github.com/karpetrosyan/hishel) is an open, maintained HTTP cache for httpx that persists conditional answers on disk. It covers the 304 answer of an unchanged page. It lacks the incremental listing: it still walks all 45 pages, and it keeps no parsed record, so the body parse still runs for every issue. It cannot reach the 10 s target. The item is in the perf skip class, so the alternatives job gives no verdict. The plan builds the snapshot store instead. Cost: about 400 lines of code and 500 lines of tests, about 110,000 tokens to build in 3 hours, and about 20,000 tokens a month to keep and fix.
Key questions
- Which read strategy cuts the GitHub read?: Read only the issues that changed since the stored watermark, with the
sinceparameter and a snapshot under the data directory. (best practice) [sources: docs/adr/0003-polling-is-how-the-roadmap-sees-changes.md]- Chosen: Snapshot with the
sinceparameter. It reads one page instead of 45 when few issues changed, and it holds the parsed record, so the body parse runs only for changed issues. - Rejected: Persist the ETag cache with hishel. It keeps the conditional answers but still walks all 45 pages and keeps no parsed record, so it cannot reach the 10 s target.
- Rejected: Keep the full
state=allread. It keeps the 55 s to 80 s read and the 4 s to 31 s of rate-limit pacing.
- Chosen: Snapshot with the
- Which value does intake store as the watermark?: The UTC start time of the read minus 60 seconds. (best practice) [sources: tests/roadmap/intake/test_roadmap_intake_item_changed.py]
- Chosen: The start time minus 60 seconds. An issue updated during the read, or in the same second, is read again, and the overlap costs one page.
- Rejected: The newest
updated_atof the response. An issue updated between the last page and the write is missed. - Rejected: The end time of the read. An issue updated during the read is missed.
- Which issues does the snapshot keep?: Every issue of the
state=alllisting: every open item and every issue closed as not planned. (best practice) [sources: CONTEXT.md, docs/adr/0001-github-is-the-roadmap-source.md]- Chosen: Every issue of
state=all. Duplicate detection compares a candidate with every item and every not-planned issue. - Rejected: Only open items. A not-planned issue would look new and be filed again.
- Chosen: Every issue of
- Where does the snapshot live and how is it keyed?: One JSON file per repository under the data directory, keyed by the repository full name. (best practice) [sources: tests/roadmap/intake/test_roadmap_intake_command.py, tests/github/test_github_session.py]
- Chosen: One file per repository. A write for one repository cannot corrupt the record of another repository.
- Rejected: One file for all repositories. A single write can corrupt the record of another repository.
- Rejected: In the session cache only. It does not survive the process and holds no parsed record.
- What does intake do when no readable snapshot exists?: Do a full listing read and write a new snapshot. (best practice) [sources: CONTEXT.md]
- Chosen: Full read. Every issue is present, so no item is filed twice.
- Rejected: Read nothing and start empty. Every issue would look new and be filed as a candidate again.
- Does the run keep the conditional requests of the session?: Yes. Each page read sends
If-None-Matchwhen the session holds an ETag. (best practice) [sources: docs/adr/0003-polling-is-how-the-roadmap-sees-changes.md, tests/github/test_github_session.py]- Chosen: Keep the conditional requests. ADR 0003 records conditional requests, and a repeated page costs no primary quota.
- Rejected: Send no conditional request. A retry or a second run in the same session pays quota again.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
The change removes a large part of a slow intake read, but it is an optimization and not a blocker.Each intake run saves about 45 requests and tens of seconds for large repositories.It needs a persistent ETag or snapshot store, the since path, and a check of the hishel library.Both items cut the issue listing read in roadmap intake; #3670 bounds scoped pages and the candidate reads only changed issues.devops-cli-service commentedon Nov 11, 2026
Status set to Ready at 6cf78e7 (see proposed design in issue body).
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
fix(roadmap): scoped intake reads a bounded page count (#4740)