Description
Problem or Motivation
When devops roadmap intake --confirm files a new candidate, it makes 13 GitHub calls, one after the other. In two profiled runs (#4404), these calls took 30.5 s and 30.1 s. Each call took 0.9 s to 3.3 s.
_apply_placement in src/devops_cli/roadmap/intake/intake.py makes these writes:
create_issue, with thesource/agentlabel only.add_sub_issue, when the candidate has a parent.label_issuefor each label, for example the type and the scope: 2 calls.set_fieldfor Status, Value and Effort. Eachset_fieldofGitHubRoadmapStorereads the issue and then sends onePATCH: 6 calls.comment, the reason comment.set_fieldfor Priority: 2 calls.
The issue is new, so no other writer can change it between these calls. The reads of set_field and the separate label calls give no protection for a new issue.
Proposed Solution & Architectural Design
Write a new candidate in as few calls as GitHub permits:
create_issuesends all labels (source, type, scope, Status, Value and Effort) and the body with its job record block, in onePOST.add_sub_issueand the reason comment stay as they are.- One
set_fieldfor Priority stays last, so a run that stops before the end leaves an issue that the next intake round decides again.
For an issue that already exists, the plan checks if Status, Value and Effort can go in one PATCH after one read.
Target: the whole intake call takes 1 minute or less (#4404). This item cuts the write phase of a new candidate to 5 calls and 10 s or less.
Target Subsystem
roadmap
Existing Tool Considered
The REST call that opens an issue already takes labels, and create_issue_args already passes them. with_record already writes the job record block into a body. This change adds no library. Cost: about 25,000 tokens to build, about 2,000 tokens a year to keep, and about 2 hours of elapsed time.
Source: #4404
Proposed design
Problem statement
Intake writes a new candidate with 13 GitHub calls in a row. Two profiled runs took about 30 s each. Each call took 0.9 s to 3.3 s. The reads of set_field and the separate label calls give no protection for a new issue. The change files a new candidate with 5 GitHub calls and sets Priority last.
Acceptance criteria
Requirement: One request files a new candidate
Intake SHALL file a new candidate with its source, type, scope, Status, Value and Effort labels in one create_issue request.
Scenario: Filed labels of a new candidate
- WHEN intake confirms a new candidate that has a parent and sets Status, Value and Effort
- THEN the store records one
create_issuecall whose labels hold the source, type, scope, Status, Value and Effort labels
Requirement: No separate label or field write
Intake MUST make no label_issue call and no set_field call for Status, Value or Effort of a new candidate.
Scenario: Writes of a new candidate
- WHEN intake confirms a new candidate that has a parent and sets Status, Value and Effort
- THEN the store records one
create_issue, oneadd_sub_issue, onecommentand oneset_fieldfor Priority, and no other write
Requirement: Job record of the filed fields
The body of a new candidate MUST hold the job record with the Status, Value and Effort that intake sets.
Scenario: Record of a filed candidate
- WHEN intake files a new candidate with Status, Value and Effort
- THEN the body passed to
create_issueholds a job record with the three values
Requirement: Priority last
Intake MUST set Priority with one set_field after the create request, the sub-issue link and the comment.
Scenario: Order of the writes
- WHEN intake confirms a new candidate that has a parent
- THEN the Priority
set_fieldis the last write that the store records
Requirement: Fields of an existing issue in one PATCH
The store SHALL write Status, Value and Effort of an existing issue with one read and one PATCH.
Scenario: Writes of an existing candidate
- WHEN intake places an existing candidate that sets Status, Value and Effort
- THEN the store records one read of the issue and one
PATCHthat carries the three labels and the job record
Requirement: A person's label stays
The batched field write MUST refuse the write when a person changed one of the three labels since the plan.
Scenario: A person changed a field
- WHEN a person changes the Value label of the issue after the plan and before the batched write
- THEN the store raises
RoadmapItemChangedErrorand writes no field
Requirement: Dry run shows one create request
The dry-run write plan MUST list one create request that carries every label of a new candidate.
Scenario: Dry-run writes of a new candidate
- WHEN a person runs
devops roadmap intake --dry-runfor a new candidate - THEN the write plan holds one create request with every label, then the sub-issue link, the comment and the Priority write
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers this need. The change uses the GitHub REST calls that the store already makes, and it adds no library. The written cost is about 25,000 tokens to build, about 2,000 tokens a year to keep, and about 2 hours of elapsed time.
Key questions
- Which labels must the one
create_issuerequest of a new candidate carry?: The source label when an agent files it, the type and scope labels the title gives, and the Status, Value and Effort labels the decision sets. Priority stays out of the request, so its write stays last. [sources: src/devops_cli/roadmap/intake/intake.py, src/devops_cli/roadmap/stores/store.py] - How many GitHub calls does the write phase of a new candidate make after the change?: Five: one create POST, one sub-issue POST, one comment POST, and the Priority
set_field, which reads the issue and sends one PATCH. [sources: src/devops_cli/roadmap/intake/intake.py, src/devops_cli/roadmap/stores/github_store.py] - Where does the job record of the filed Status, Value and Effort come from?: Intake builds the body with the existing
with_recordhelper, with the Status, Value and Effort values, and passes it tocreate_issue. (best practice) [sources: src/devops_cli/roadmap/stores/github_store.py, tests/roadmap/stores/test_roadmap_github_store_record_writes.py]- Chosen: Build the body with the existing record helper.
with_recordalready writes the job record block, and one helper keeps one format for every write. - Rejected: Add a field list to the
create_issuesignature. It puts the record format in a second place and changes the signature of every store.
- Chosen: Build the body with the existing record helper.
- Can Status, Value and Effort of an existing issue go in one PATCH after one read?: Yes. The store writes the three fields with one read and one PATCH. It refuses the write when a person changed one of the three labels since the plan. (best practice) [sources: docs/adr/0002-roadmap-jobs-act-as-a-machine-account.md, src/devops_cli/roadmap/stores/github_store.py]
- Chosen: One read and one PATCH for the three fields. The issue PATCH takes labels and body in one request, and one read keeps the person-change guard. Six calls become two.
- Rejected: One
set_fieldfor each field. Eachset_fieldreads and then PATCHes, so three fields take six calls. - Rejected: One PATCH with no read. ADR 0002 requires a comparison with the value the job last set before it overwrites a field.
- How does the store offer the batched field write?: Add
set_fields(item, fields)toRoadmapStore, toGitHubRoadmapStoreand to the store fake. Run the store contract suite over it. (best practice) [sources: src/devops_cli/roadmap/stores/store.py, tests/support/fakes/roadmap_store.py, tests/roadmap/stores/test_roadmap_store_contract.py]- Chosen: A new
set_fields(item, fields)method. It keepsset_fieldfor the Priority write with its marks, and it names the batch at the call site. - Rejected: A list argument on
set_field. It changes a signature that every caller and the fake use, and it mixes one field with many. - Rejected: No batched write. An existing candidate keeps six calls for the three fields.
- Chosen: A new
- What does the dry-run write plan show for a new candidate?: One create request that carries every label, then the sub-issue link, the reason comment and the Priority write. It shows no separate label or field write. [sources: src/devops_cli/roadmap/intake/intake_requests.py, tests/roadmap/intake/test_roadmap_intake_dry_run.py]
- Which test shows that a new candidate makes five write calls?: A test over the store fake counts the calls of one new candidate: one
create_issue, oneadd_sub_issue, onecommentand oneset_field. [sources: tests/roadmap/intake/test_roadmap_intake_github_requests.py, tests/support/fakes/roadmap_store.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-11: not-applicable.
Class: perf, no search.
Tool: none found.
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.
perfprefix of the title gives the type.(roadmap)scope of the title gives the scope.Intake works but is slow; the fix cuts time but does not block a release.Faster intake saves agent and user time on every new candidate.One function changes to send labels and fields in fewer calls.devops roadmap intake) #742, which asks for a different change.Both work on the intake write phase, but #742 builds the command and this item cuts its API calls.devops-cli-service commentedon Nov 11, 2026
Status set to Ready at c653bde (see proposed design in issue body).
devops-cli-service commentedon Nov 11, 2026
Alternatives check: not-applicable
Class: perf. The check makes no search and no model call for an item of this class.
Tool: none found
Checked on 2026-11-11. A person decides what this means for the item. The check changes no label and closes no issue.
perf(roadmap): file a new candidate with one request (#4452)
test(roadmap): count the two field writes of a placement (#4452)
devops-cli-service commentedon Nov 15, 2026
Released in v0.159.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.159.0
devops-cli-service commentedon Nov 15, 2026
Live since 2026-11-15 23:51 UTC