Repository navigation
Description
Problem
The roadmap store finds a card by reading the whole board, and it writes board fields by name through gh. Between 2026-10-07 18:47Z and 2026-10-08 01:09Z that one design caused two failures:
- Intake lost cards it had just added. Three placements failed because the read-back right after
gh project item-addran before the board listing showed the new card. - The roadmap Service spent the machine account's 5,000-point hourly GraphQL budget by itself, twice: at 22:43Z on 2026-10-07 on image v0.2.27, and at 01:08Z on 2026-10-08 on v0.2.28, deployed at about 23:48Z. Both times intake was refused partway through a placement, and reprioritize was refused later in the same round.
Most of the spend does not come from the paged board read #1125 built, which costs 1 point a page. It comes from board writes and the whole-board reads around them. The cited files (roadmap/intake.py, github_store.py, run.py, board_read.py) are identical at v0.2.27 and at 910b823, where the code was checked.
Sources:
- the failures: the roadmap Service's log line "Roadmap job intake failed";
- card times and field values: each issue's
projectItems(GraphQL read, 2026-10-08 about 01:15Z); - query costs: GitHub's own estimate,
rateLimit(dryRun: true), which spends nothing (2026-10-08); - spend and timing: the rate limiter's pacing lines in Loki, and Prometheus.
Five placements failed partway:
| Issue | Card created | Failed | Where it failed | Left on the card |
|---|---|---|---|---|
| #1290 | 10-07 18:47:02Z | 18:47:31Z | read-back (intake.py:1164-1170) |
Status only; the next round placed it at 19:01–19:03Z |
| #1303 | 21:16:15Z | 21:16:46Z | read-back | Status New only |
| #1336 | 22:40:25Z | 22:43:30Z | Effort write: _require_entry's board read refused, "88 points left" |
Status New, Value Medium, job record {Status, Value} |
| #1348 | 23:31:34Z | 23:32:05Z | read-back | Status New only |
| #1352 | 10-08 01:05:48Z | 01:08:22Z | Priority write: refused, "51 points left" | Status, Value, Effort |
- docs(agent): pending-a-person steps name only manifests that exist in the repository #1303 and docs(agents): an agent that finds an item cannot be built as specified stops and returns it to refinement with evidence, instead of adding code #1348 hold only the Status
Newthat the board itself sets 2 s after an add. - docs(agent): pending-a-person steps name only manifests that exist in the repository #1303, test(cli): Convert ratchets to bans and merge invariant tests #1336, docs(agents): an agent that finds an item cannot be built as specified stops and returns it to refinement with evidence, instead of adding code #1348 and fix(review): a scanner finding that names a kubernetes object the reviewed commit lacks is rejected as object-not-in-commit #1352 still have no Priority. They are not lost:
_subjectstakes open on-board issues with no Priority again (intake.py:567-578).
1. A board write costs about 320 points and reads the whole board
- What a write does.
GitHubRoadmapStore.set_field(roadmap/github_store.py:1321-1352) andset_marks(:1354-1369) both start with_require_entry(:1750-1762). That runsgh project field-list(_read_board_options,:1998-2010; argvfield_list_args,:889-902). It then re-reads the whole board through_read_board_items: a budget probe plus 11 pages on board feat(release): v0.1.8 #2, about 1,080 items.- The read is there so that the Job record the write merges with is the one the card holds at write time (
set_fielddocstring,:1329-1336). That needs one card, not the whole board.
- The read is there so that the Job record the write merges with is the one the card holds at write time (
- The write itself. It is
gh project item-edit <n> --owner --url --field(_edit_board_field,:1779-1784; argvitem_edit_args,:927-942). It runs once for the Job record and once for the field. - What gh does with it. In gh 2.102.0,
field-listcallsProjectFields(owner, number, …)(pkg/cmd/project/field-list/field_list.go:91,pkg/cmd/project/shared/queries/queries.go:1080). So doesitem-editwhenever--urlor--fieldis given: it resolves those names first (pkg/cmd/project/item-edit/item_edit.go:225-235,resolveItemEditNamesat:263-289).ProjectFieldsalways setsfirstItemsto 100.- So besides the fields, it fetches the first 100 board items with
fieldValues(first: 100)and nestedfirst: 10connections (queries.go:218-225,:353-440).
- Measured cost. GitHub's own estimate against board feat(release): v0.1.8 #2 on 2026-10-08:
- 101 points for that query shape;
- 1 point for a fields-only query;
- 1 point for one page of the store's own board query.
- Per call:
set_fieldon a board field costs about 101 (field-list) + 12 (board re-read) + 2 × ~103 (item-edit) ≈ 320 points.set_field(Release)andset_markscost about 215, because each sends one item-edit. The Release itself is a REST milestone write (:1772-1777).
- A cheap write path already exists.
set_card_field(:1577-1597) andset_run_record(:1376-1387) write by node ids throughcard_edit_args(:945-959). With--id/--project-id/--field-id, gh skips name resolution and sends only the mutation (item_edit.go:225-235,updateItemValuesat:472-498). - The limiter can't see this spend.
gh project …prints norateLimit, sorun_ghcharges an estimate of 2 per call (github/rate_limiter.py:1825-1831).require_budget(roadmap/board_read.py:244-258) prices only the board read about to happen, at the 1-point page default (DEFAULT_GH_PROJECT_ITEM_PAGE_POINTS,config/defaults.py:784).- The writes between two reads use up the 250-point floor (
:780) without the limiter noticing. The two refusals found 88 and 51 points left.
- Why fix(github): GraphQL mutations and implicit-POST
gh apiwrites get the rate limiter's mutation pacing, decided from the request gh sends #1125 didn't catch it. fix(github): GraphQL mutations and implicit-POSTgh apiwrites get the rate limiter's mutation pacing, decided from the request gh sends #1125's criterion reads: "Aghcommand that can't report its cost (for examplegh project …) is not used for reads that page."field-listand name-addresseditem-editdon't page, but each one reads a 100-item page inside gh.
2. The read-back after an add races the board listing
_apply_placement calls store.add_item(number), then store.item(number) (intake.py:1162-1170).
- The add's answer is thrown away.
GitHubRoadmapStore.add_itemrunsgh project item-addwithout--format jsonand drops its output, which holds the new card's id (github_store.py:923-924,:1307-1319).- The protocol returns
None(store.py:726). ItemandBoardEntrycarry no card id (store.py:238-260,:349-359).
- The protocol returns
item()reads the whole board to find the card (github_store.py:1262-1268→_read_board_listing,:1810-1841).- That is one
RoadmapBoardBudgetprobe plus 11 pages ofitems(query: $filter, archivedStates: [NOT_ARCHIVED])(board_read.py:42), for about 1,080 cards. It takes about 30 s.
- That is one
- It is not a filter. Intake and run pass
""(config/constants.py:2445-2446,run.py:870), and none of the cards is archived. - It is not pagination. The read checks every page's
totalCountagainst the cards it received, and reads once more if the count moved (github_store.py:1828-1834). The failing reads logged no "changed while they were read" line, so their count never included the new card. - The listing shows a new card after a lag that varies from about 1 s to about 2 min. Of the 14 adds on 2026-10-07 and 2026-10-08:
- 4 were listed on the first read: perf(cli): the dashboard's reactive tests run in half today's time and still check every behaviour #1339, test(cli): Convert ratchets to bans and merge invariant tests #1336, fix(roadmap): an item a person places in a release stays there, and the roadmap jobs comment on a rule it breaks instead of moving it out #1349 and fix(review): a dependency advisory the base revision's pins already have is listed as pre-existing #1353. For example, fix(roadmap): an item a person places in a release stays there, and the roadmap jobs comment on a rule it breaks instead of moving it out #1349's read-back pages ran 23:28:18–23:28:40Z with no re-read.
- 7 were listed only because the count rose after the first page and the read ran again: feat(k8s): Read homelab config from in-cluster Gitea, drop overrides #1291, perf(ci): the gate's test workers start at least 15% faster, and the full test run keeps at least half of that saving #1338, fix(ci): the live bubblewrap tests run wherever bwrap is installed and skip only where it is missing #1337, fix(github): the commit-status read fails closed when the runner raises, and check_verdict no longer swallows StopIteration from under-scripted test mocks #1350, fix(mcp): an mcp tool stops at its timeout, also when its command runs in-process #1356, fix(ai): gateway reviews keep requests in flight at the backend slot count, however many ai.ollama_urls are configured #1354 and fix(review): a scanner finding that names a kubernetes object the reviewed commit lacks is rejected as object-not-in-commit #1352.
- 3 were not listed within the ~30 s read, and intake failed: fix(k8s): argo cd takes homelab values from deploy-time overrides, and the repository holds no private or placeholder config #1290, docs(agent): pending-a-person steps name only manifests that exist in the repository #1303 and docs(agents): an agent that finds an item cannot be built as specified stops and returns it to refinement with evidence, instead of adding code #1348.
- docs(agents): an agent that finds an item cannot be built as specified stops and returns it to refinement with evidence, instead of adding code #1348 entered the listing about 56 s after its add: a read ending at 23:32:40Z logged counts
1079 ×7, 1080 ×4. - fix(k8s): argo cd takes homelab values from deploy-time overrides, and the repository holds no private or placeholder config #1290's count rise (1070→1071) was logged about 2 min after its add, at 18:49:25Z.
- docs(agents): an agent that finds an item cannot be built as specified stops and returns it to refinement with evidence, instead of adding code #1348 entered the listing about 56 s after its add: a read ending at 23:32:40Z logged counts
So the read-back works only while the lag is shorter than one whole-board read.
3. A placement takes minutes and up to about 1,500 points, and one failure drops the rest of the plan
-
What a placement does.
_apply_placement(roadmap/intake.py:1151-1178) does these in order:- labels the issue over REST;
- adds the card (
gh project item-add, a few points); - reads the whole board again to find the card (
store.item,github_store.py:1262-1268, 12 points; section 2); - calls
set_fieldfor the Release if the issue moves, for each decided field, and last for Priority.
-
How many fields. Intake decides Status, Value and Effort wherever the item has no value (
_fields,intake.py:920-928). An issue not yet on the board gets all three. So a placement costs:- about 330 points when only Priority is set;
- about 1,300 points for a new issue;
- about 1,500 points for a new issue that also moves into a Release.
-
How long. With the read-back, a new issue's placement makes 5 or 6 whole-board reads of about 30 s each. From card creation to the Priority write, placements took 2 min 50 s to 4 min 37 s: fix(review): a dependency advisory the base revision's pins already have is listed as pre-existing #1353 01:02:55→01:05:45Z, fix(roadmap): an item a person places in a release stays there, and the roadmap jobs comment on a rule it breaks instead of moving it out #1349 23:28:17→23:31:31Z, fix(ci): the live bubblewrap tests run wherever bwrap is installed and skip only where it is missing #1337 22:35:44→22:40:21Z. Between the fix(roadmap): an item a person places in a release stays there, and the roadmap jobs comment on a rule it breaks instead of moving it out #1349 and docs(agents): an agent that finds an item cannot be built as specified stops and returns it to refinement with evidence, instead of adding code #1348 adds the Service made 73 GraphQL-class
ghcalls (Loki "Mandatory pause for 'graphql'"), and about 60 of those were board pages and probes. -
The budget check sits inside the board read.
require_budget(board_read.py:244) runs as part of the whole-board read. When the hourly budget ran low, it therefore refused partway through a placement: test(cli): Convert ratchets to bans and merge invariant tests #1336 between its Value and Effort writes, and fix(review): a scanner finding that names a kubernetes object the reviewed commit lacks is rejected as object-not-in-commit #1352 before its Priority write. -
The backlog. 59 issues were opened after the last successful intake (2026-10-07 19:29:21Z). 55 are open and 54 have no milestone (REST search, 2026-10-08). At these costs, placing them takes roughly 18,000 to 80,000 points, which is four to sixteen hourly budgets.
-
What a failure costs.
apply_intakeraises at the first failed placement (intake.py:1227) and drops the remaining placements, each of which a model call decided._execute_due_rowsleaves intake unrecorded and due (run.py:770-784), so the next round plans every candidate with the model again.- Jobs in a round run in order, and a failed job does not stop the next one (
_execute_due_rows,run.py:734-791). Intake runs first today (fix(roadmap): a shipped release starts the next one without a person: the poll reports the ship, and close and reprioritize run before a capped intake batch #1360 moves it after close and reprioritize), so intake spends the budget and reprioritize, later in the same round, is refused. "Roadmap job reprioritize failed" was logged at 22:44:03Z and again at 01:08:54Z (49 points left), each time in the same round as the intake failure.
-
The same pattern elsewhere.
_create_run_record_card(:1737-1748) reads the whole board to find the draft card it just created. That is the same read-after-write._require_card(:1912-1923) reads the whole board to check one card beforeset_card_fieldand card removal (:1584,:1602).
Neither has failed in the retained logs.
4. Measured in Loki, from the limiter's pacing lines
The pacing delay is the seconds left until the reset divided by the points left.
2026-10-07, v0.2.27. The window reset at 23:06Z.
- Intake planned with the model from 22:06Z and made no GraphQL call. It began writing at 22:29Z with about 4,940 points left (delay 0.45 s).
- The pacing lines repeat for each
set_field: two writes at 1.00 s, thenfield-list, the probe and 11 pages.- Between consecutive board re-reads the delay rose 0.45 → 0.47 → 0.50 → 0.53 → 0.55 s (22:29:38–22:32:11Z).
- That is about 290 points per cycle, of which the board read is 12.
- At 22:43:30Z intake stopped inside
set_field→_require_entry→require_budgetwith "GraphQL has 88 points left until 23:06 UTC". That is about 4,850 points in 14.5 minutes, across about 300 GraphQLghcalls. - From 22:44:41Z to 23:05:39Z, 34 rounds were refused. They were 10 s to 5 min apart, one every 37 s on average.
- Points left fell from 85 to 52. The first round stopped before page 2; each later one stopped at the budget probe and spent one point.
- Nothing else spent the machine account's GraphQL budget in that window.
- Loki shows 40
GitHubRateLimitErrorlines that day:- 37 are GraphQL-floor refusals between 22:43:30Z and 23:06:13Z: intake, reprioritize, the 34 refused rounds, and one intake on another managed repository's board, which shares the account.
- The other 3 are the limiter's "core … unknown or broken state" error, which fix(github): a gh call at a quota window's reset waits out the reset second instead of failing as unknown or broken state #1364 covers.
2026-10-08, v0.2.28. The window reset at about 00:11Z.
- The first round on the new pod started at 23:51Z. It planned intake with the model for about an hour; there were fewer than 25 GraphQL calls across all repositories from 00:00Z to 00:50Z.
- It began writing at about 00:57Z with about 4,860 points left (delay 0.18 s).
- At 01:08:22Z intake stopped inside
set_field(Priority)→_require_entry→require_budgetwith 51 points left until 01:11 UTC. That is about 4,800 points in 11.5 minutes. - Reprioritize was refused at 01:08:54Z (49 left), and the next round at 01:09:14Z (48 left).
5. Reads multiply the cost
On board #2 a whole-board read is 12 points: the probe plus 11 pages. On another managed repository's smaller board it is 2.
- Nothing is cached. The store says so (
github_store.py:1-3). The Service opens a new store each round with the empty filter (run.py:870,CONST_ROADMAP_RUN_BOARD_FILTER = "",config/constants.py:2446). So every read is the whole board, closed items included. - Change detection reads the whole board whenever any event exists since the cutoff, to attach job records (
changes_since→_with_job_records,github_store.py:1290-1305,:1720-1730). The Service's own events are dropped only after that read (_fetch_filtered_changes,run.py:687-689). - The cutoff stays pinned.
_oldest_cutoff(run.py:626-637) takes the oldest last success of intake (60-minute interval) and reprioritize (no interval).- While either is failing or not due, every poll re-reads the same foreign events and pays for the board read again.
- In quiet hours (06:00–11:00Z on 2026-10-07) the Service logged exactly 158 GraphQL calls an hour. That is about one whole board feat(release): v0.1.8 #2 read per 5-minute poll, with no job due.
- Across that day, hourly counts ranged from 144 to 711 calls.
- The reprioritize trigger reads the whole board once per change it checks (
store.item,run.py:278), until one change is in the current release.:290and:297do the same after close. - Other reads:
- intake planning reads the board once (
intake.py:1117), plus once per placement and once perset_fieldorset_marks; - reprioritize planning reads it twice (
reprioritize.py:1181,:1197); render_roadmapreads it once per kept release, plus once for the backlog (render.py:80-95).
- intake planning reads the board once (
- Webhooks add rounds. devops-cli received 940 webhook triggers from 21:00 to 22:00Z, and 227 from 22:00 to 23:00Z (
increase(devops_cli_service_triggers_total{source="webhook"}[1h])). Triggers coalesce while a round runs. The worker starts the next batch as soon as a round ends (server/service.py:93-105,:133-152).
6. Nothing reports the spend, and nothing waits for the reset
- Prometheus has no GitHub quota or points series.
- The spend line (
GraphQLSpend.line,board_read.py:151) is printed only by thedevops roadmapcommands (commands/roadmap.py:138-150), never by a Service round. - The reset time is lost.
- The floor's
GitHubRateLimitErrorcarriesremainingandcostin its details, but the reset time only inside its message (board_read.py:244-258,exceptions/git.py:124-143). _execute_due_rowswraps job failures in aRoadmapRunErrorthat carries only job names (exceptions/roadmap.py:11-26).- So no worker can wait for the reset. Each one runs the next batch as soon as it arrives, and every repository worker spends from the same account.
- The floor's
Acceptance criteria
-
add_itemreturns the card it added.RoadmapStore.add_item(number)returns theItem, with the card's node id fromgh project item-add --format jsonand its field values from one node read of that id (the--format jsonoutput carries no field values).- The protocol (
store.py:726),GitHubRoadmapStoreand the in-memory store (memory_store.py:603-614, or wherever test(infra): infrastructure tests run on edge fakes #1335 moves it) change together. - Adding an issue that is already on the board returns its existing card. GitHub's
addProjectV2ItemByIdanswers with the existing item in that case.
- The protocol (
-
ItemandBoardEntrycarry the card's node id, from the add or from the listing (_BoardItemPayload.id). -
_apply_placementwrites to the card it already has:subject.item, or theItemthatadd_itemreturned. It never callsstore.item(), and the "is not on the board after intake added it" error is deleted. - Board writes go by node id.
set_fieldandset_markstake field and option ids fromboard_fields(), a 1-point query read once per store. They write throughcard_edit_args, asset_card_fielddoes.field_list_args,item_edit_argsand_read_board_optionsare deleted.- No argv the store sends contains
field-list. Everyitem-editargv uses--id,--project-idand--field-id, with neither--urlnor--field.item-add --urlstays: it has no id form and costs a few points.
- A write reads only the card it writes.
_require_entryreads that card by node id in one request (node(id:) { ... on ProjectV2Item { isArchived fieldValues } }withrateLimit), instead of calling_read_board_items().- The Job record the store writes still joins the record the card holds at that moment. This keeps the contract in
set_field's docstring (github_store.py:1329-1336) and ADR 0002's last-set compare. - A missing or archived card still raises "#N is not on the board" before any write.
- The existing reserve check (
require_budget) reads that request'srateLimitand still refuses a write before it starts when the points left are at the reserve.
- The Job record the store writes still joins the record the card holds at that moment. This keeps the contract in
- No path that writes one card reads the board listing.
_create_run_record_cardtakes the card id fromgh project item-create --format jsonand reads nothing after the create._require_cardreads its card by node id, in one request.
- One board read per filter per store, for the readers that need the board.
items,item,backlog,candidates,cards, the job recordschanges_sinceattaches, therun_recordlookup by title, and the cross-job checks inrun.py:278-297(fix(roadmap): a shipped release starts the next one without a person: the poll reports the ship, and close and reprioritize run before a capped intake batch #1360 deletes the one at:278) share one listing per filter, read when first needed. The store's own writes update that listing: the field values and Job record text it writes, and the cardadd_itemreturns. - The Service's own events cost no board read. Job records are attached only to the changes left after the session's own events are dropped.
- A budget refusal pauses every worker until the reset, because the GraphQL budget belongs to the account all repository workers share.
require_budgetandrequire_floorput the reset time in the error's details.- The Service takes the earliest such reset from a failed round: from the error itself when the refusal comes from outside a job (for example from
changes_since), and from the failed jobs' errors in aRoadmapRunError. If fix(roadmap): the roadmap service logs each failed job's own error with its repository, and a configuration error without a traceback #1365 has landed, those are theGitHubRateLimitErrormembers of itsExceptionGroupcause, andRoadmapRunErrorgains no field of its own. OtherwiseRoadmapRunErrorcarries the earliest reset. - Only a refusal whose details carry a reset pauses the workers. The limiter's state errors (fix(github): a gh call at a quota window's reset waits out the reset second instead of failing as unknown or broken state #1364) carry none and pause nothing.
- After such a round,
ServiceManagerstarts no round for any repository before that reset. It logs the wait once, with the reset time. Triggers that arrive in the meantime run as one round per repository after the reset.
- Every Service round that sends a GraphQL request ends with the spend line.
- The line names the repository and is read from GraphQL, as
_reporting_spenddoes. - It says the points are the account's, because the workers share it.
- A round that sends no GraphQL request logs no line and sends no budget query.
- The line names the repository and is read from GraphQL, as
- The dry-run request plan matches the new requests, and
--dry-runstill sends no request:add_itemlistsitem-add --format jsonand the card read (request_plan.py:335-337);- intake's placement drops its
itemstep (intake_requests.py:195); set_fieldandset_markslist the card read and the id-addresseditem-editinstead offield_options(),board_read()and the name-addressed edit (request_plan.py:300-325);- the run record's create step has no
board_read()after it (:369); set_card_fieldandremove_cardlist the card read (:389,:398).
- Store tests (
tests/test_roadmap_github_store.py, recordedghrunner):- once the store has read the board and its fields, one
set_fieldon Value sends exactly one card node read and two id-addresseditem-editcalls, and nofield-list, budget probe or board page; set_field(Release)sends one card node read, oneitem-editand one REST milestone write;set_fieldon a card that another process archived raises before anyitem-edit;- a Job record mark that another process wrote after the listing was read is kept in the record the store writes.
- once the store has read the board and its fields, one
- Intake tests (
tests/test_roadmap_intake.py, store on aghfake at the process edge):- The observed lag. The fake's board listing leaves a new card out of its next three listings, the lag seen on 2026-10-07. Intake files and places one new issue, writing Status, Value, Effort, Release and Priority. After
item-add, the fake receives noRoadmapBoardItemsorRoadmapBoardBudgetquery: one card read for the add and one per field write. The same test fails at 910b823 with the read-back error. - test(cli): Convert ratchets to bans and merge invariant tests #1336's state. Placing an issue that is already on the board with Status and Value set writes only Effort and Priority, and sends no board listing query.
- One listing. An intake apply of three placements on a fixture board of 250 items sends one budget probe and three board pages in total.
- The observed lag. The fake's board listing leaves a new card out of its next three listings, the lag seen on 2026-10-07. Intake files and places one new issue, writing Status, Value, Effort, Release and Priority. After
- Run and Service tests:
tests/test_roadmap_run.py:run_due_jobswith 50 foreign label changes, none in the current release, sends one board read;tests/test_roadmap_run.py: a poll round with no job interval due, whose events since the cutoff are all the Service's own, sends no GraphQL request;tests/test_server_service.py, with a fake clock, for two cases: a refusal raised fromchanges_since, and a job-level refusal wrapped inRoadmapRunError. In both, a second repository's worker starts nothing before the reset.
- No test reaches the network. Fakes sit only at the
ghprocess edge (the store'srunnerseam,github_store.py:1187) and the clock. - Each new test's call phase stays under 1 s (
uv run pytest tests/test_roadmap_github_store.py tests/test_roadmap_intake.py tests/test_roadmap_run.py tests/test_server_service.py --durations=10), anduv run devops cipasses within its 5-minute budget. -
changelog.d/<n>.mdrecords the fix under### Fixed. CHANGELOG.md and docs/ROADMAP.md are untouched, anduv run devops pr check-readinesspasses. - Pending a person, after merge, once the Service runs a release image with this fix:
- (a) The next devops-cli intake rounds place the open backlog without a budget refusal. Each round's spend line divided by its placements is at most 50 points; about 25 is expected, against about 1,300 today.
- (b) For the next five issues the Service places, the card's
createdAtand its Priority'supdatedAt(GraphQLprojectItems) are less than 90 s apart. On 2026-10-07/08 the gap was 2 min 50 s to 4 min 37 s. - (c)
{namespace="devops", container="service"} |= "changed while they were read"shows no line inside those five windows. - (d) Over the hour after that, no devops-cli round that writes nothing to the board logs a spend line above 25 points.
- (e)
sum(count_over_time({namespace="devops", container="service"} |= "GitHubRateLimitError" |= "GraphQL has" [24h]))is 0 on a day with at least 20 placements. - (f) docs(agent): pending-a-person steps name only manifests that exist in the repository #1303, test(cli): Convert ratchets to bans and merge invariant tests #1336, docs(agents): an agent that finds an item cannot be built as specified stops and returns it to refinement with evidence, instead of adding code #1348 and fix(review): a scanner finding that names a kubernetes object the reviewed commit lacks is rejected as object-not-in-commit #1352 each have a Priority, or were closed as duplicates.
Key questions
- Is this a patch on fix(github): GraphQL mutations and implicit-POST
gh apiwrites get the rate limiter's mutation pacing, decided from the request gh sends #1125's budget guard? Proposed: no. It removes the spend at its source and leaves the guard as it is.- Two premises multiply the cost: "no read is cached" (
github_store.py:1-3), and "re-read the board before every write" (:1329-1336). - This item replaces them with one listing per store, kept current by the store's own writes, plus a one-card read before each write.
- More floors or probes would be the patch on a patch.
- Two premises multiply the cost: "no read is cached" (
- Is the per-store listing a hand-rolled cache? Proposed: no. It is the store's own read, kept for the store's lifetime.
- It has no TTL, no eviction and no reuse across stores: it lives for one Service round or one CLI command.
- Only the store's own writes change it, with the values those writes sent.
- A change someone else makes meanwhile is seen by the next store, as ADR 0003's polling model expects. The one-card read before each write keeps every write correct against such a change.
- Is the lag only in the filtered
items(query:)connection? Would reading withoutquery:, or withgh project item-listas before fix(github): GraphQL mutations and implicit-POSTgh apiwrites get the rate limiter's mutation pacing, decided from the request gh sends #1125, be enough? Proposed: depend on no listing right after a write.- The id the mutation returns, and a
node(id:)lookup of that id, do not go through a listing. Issue.projectItemsis also a connection, and nothing shows it is current right after an add. So nothing in this item reads it after a write.- Whole-board readers (reprioritize, render, candidates) keep the listing. For them, a card that appears a minute late does no harm.
- The id the mutation returns, and a
- Why not retry the read-back with a backoff? Proposed: no. That would be a patch on a patch:
- it adds waits to every placement;
- it keeps the 5–6 whole-board reads;
- it still races a lag that reached about 2 min.
- Does this end mid-placement failures? Proposed: it ends the read-back race, and it cuts a new issue's placement from about 1,300 points to about 25, so the budget should no longer run out partway through an intake round.
- The reserve check stays before each write, so a write never starts below the reserve.
- If the spend lines still show refusals once this lands, two follow-ups are possible: isolate one failed placement from the rest of the plan, or check the budget once for a whole placement.
- fix(roadmap): a shipped release starts the next one without a person: the poll reports the ship, and close and reprioritize run before a capped intake batch #1360 caps intake at 5 decisions per round, which bounds what one failure drops.
- Should a poll with no new event skip the board, and should each job judge only the changes since its own last success? Proposed: the per-job judging is fix(roadmap): a shipped release starts the next one without a person: the poll reports the ship, and close and reprioritize run before a capped intake batch #1360's (its reprioritize row judges only the changes after its own last success). Skipping the board read is a follow-up item.
- After this item, a poll with a pinned cutoff costs one board read: 12 points, about 150 an hour at 12 polls an hour. The budget absorbs that.
- refactor(github): the github session owns transport, ledger, error classes and link pagination #983's conditional requests don't remove this read. A 304 returns the stored body, so
changes_sincereturns the same events and the board is still read. - The follow-up skips GraphQL when no event is newer than the last round's newest. It also amends ADR 0003's "an unchanged answer costs nothing", which doesn't hold for the board read.
- Does this fix the slow release start? Proposed: partly.
- It removes the budget refusals that stopped reprioritize at 22:44Z and 01:08Z.
- It does not remove the hour of serial model planning ahead of reprioritize in the same round, or the decisions a failed intake loses. fix(roadmap): a shipped release starts the next one without a person: the poll reports the ship, and close and reprioritize run before a capped intake batch #1360 runs close and reprioritize before a capped intake, and makes the poll see a ship.
- Should
item(number)read the issue'sprojectItemsinstead of the whole board? Proposed: not here.- Once this item lands, no path calls
item()after a write, so this is a cost question, not a correctness one. - The per-store listing makes
item()free after the first read.
- Once this item lands, no path calls
- Metrics? Proposed: only the per-round log line here. A points-spent counter and a points-left gauge join feat(github): github api request and throttle counters for the devops-cli dashboard #814, whose exclusion of gauges predates gauge support (fix(telemetry): classify project metrics and upstream status snapshot instruments as gauges #1253, v0.2.27) and the long-lived service.
- Order with refactor(github): the github session owns transport, ledger, error classes and link pagination #983? Both edit
roadmap/github_store.py. Proposed: this item lands first, because it changes which gh commands the store sends; refactor(github): the github session owns transport, ledger, error classes and link pagination #983 changes how they are sent, and rebases. - What about
projects.py?gh project reconcilewrites the same name-addressed way (github/projects.py:997-1016). Proposed: not here. fix(github): project reconcile reads an unknown quota, fixes existing cards first, and says when it stopped early #892 and refactor(github): board fields are written only through the roadmap store, and projects.py keeps provisioning #999 own that path; see the note on fix(github): project reconcile reads an unknown quota, fixes existing cards first, and says when it stopped early #892. - One pull request? Proposed: one, if it stays reviewable.
- Card identity, the node-id write and the one-card read must land together: they change the same functions (
add_item,set_field,set_marks,_require_entry). - If it outgrows one pull request, the worker pause and the spend line split out as their own item first; the store changes are the fix.
- Card identity, the node-id write and the one-card read must land together: they change the same functions (
Strategic alignment
- Priority: P1 bug.
- The Service used up the whole hourly budget twice, across two releases (2026-10-07 22:43Z and 2026-10-08 01:08Z), and both times reprioritize was refused.
- Five placements failed in under 6.5 hours, three of them from the read-back race. Each failure dropped the rest of a plan that model calls had decided and left intake due. Four items are still part-placed with no Priority.
- At about 1,300 points per new issue, the 55-issue intake backlog can't be placed within one budget, and a placement takes 3–4.5 minutes instead of under 90 s.
- Value: high. The roadmap jobs finish under load, intake keeps every card it adds, and the release start is no longer refused for budget.
- Effort: M to L:
- one store module, and the store protocol across two adapters with one GraphQL card query;
- a reorder in change detection;
- a service-wide pause with a reset in the error details;
- the dry-run plan;
- tests on the recorded runner and a fake clock.
- Library-first: gh's id-addressed
item-editand--format json, GraphQLnode(id:), the store's existing queries andGraphQLSpend. No new dependency, no retry loop or sleep, and no hand-rolled cost model. - Related:
- fix(github): GraphQL mutations and implicit-POST
gh apiwrites get the rate limiter's mutation pacing, decided from the request gh sends #1125 (closed): the paged read and floor this item builds on. - refactor(github): the github session owns transport, ledger, error classes and link pagination #983: transport; it rebases on this item.
- feat(github): github api request and throttle counters for the devops-cli dashboard #814: GitHub counters.
- fix(github): project reconcile reads an unknown quota, fixes existing cards first, and says when it stopped early #892, refactor(github): board fields are written only through the roadmap store, and projects.py keeps provisioning #999:
projects.py's name-addressed writes; refactor(github): board fields are written only through the roadmap store, and projects.py keeps provisioning #999 also keeps board writes in the store. - feat(github): single-entry item intake with duplicate detection and placement (
devops roadmap intake) #742: intake. - feat(cli): service mode for
devops servewith github webhooks, a polling tick and per-repo job queues #752, feat(roadmap): run the roadmap jobs when they are due (devops roadmap run) #981 (closed): service mode androadmap run. - test(infra): infrastructure tests run on edge fakes #1335: the in-memory store moves to tests.
- fix(roadmap): a shipped release starts the next one without a person: the poll reports the ship, and close and reprioritize run before a capped intake batch #1360: round order, the intake cap and the reprioritize row's own window; it deletes the reprioritize predicate's per-change board reads and lands after this item.
- fix(roadmap): the roadmap service logs each failed job's own error with its repository, and a configuration error without a traceback #1365: carries each job's error in
RoadmapRunError, which the worker pause reads. - fix(github): a gh call at a quota window's reset waits out the reset second instead of failing as unknown or broken state #1364: the core reset boundary; its errors don't pause the workers.
- ADR 0002, ADR 0003.
- fix(github): GraphQL mutations and implicit-POST
Update 2026-10-08: delivered scope
Delivered in one commit on release/v0.2.29:
- The card intake added:
add_itemreturns the cardgh project item-add --format jsonnames, with its fields from oneRoadmapBoardCardnode read.ItemandBoardEntrycarrycard_id. Intake's placement writes to the card it has and never callsstore.item(), so the "is not on the board after intake added it" error is gone. - Writes by node id: every board write is an id-addressed
item-edit(--id,--project-id,--field-id). Field and option ids come from the 1-point fields query, read once per store, and no argv the store sends containsfield-list._read_board_optionsis deleted.field_list_argsanditem_edit_argsstay becausegh project reconcileuses them since fix(github): project reconcile reads an unknown quota, fixes existing cards first, and says when it stopped early #892; refactor(github): board fields are written only through the roadmap store, and projects.py keeps provisioning #999 owns that path (see the note there). - One card read per write: a write reads only its card, by node id. A gone, archived or other issue's card raises "#N is not on the board" before any write, and the reserve check (
require_write_floor) reads that card read'srateLimit. - Run record card: it is written by the id
item-create --format jsonreturns, with no read after the create. - One listing per filter per store, kept current by the store's own writes. A card the store adds joins the unfiltered listing, and the
is:openlisting when its issue is open. A close (close_issue,close_as_duplicate) drops every listing, because the board's "Item closed" workflow then sets the card's Status, so a release cut rendered in the same round shows Done. - Own events:
changes_since(since, except_actor=...)drops the Service's own events before it attaches job records. An empty actor leaves out nothing. - Dry runs: the request plans match the new requests, and
--dry-runstill sends nothing. - Cost: a critical-fix placement costs a small constant whatever the board's size: about 17 points in the test fake, which doesn't charge gh's own lookups for an add. A job-record mark costs 3. On 2026-10-07 these cost about 1,500 and about 215.
New behaviour: "changed since it was read." Before a job writes a board field (set_field, and set_card_field for any card), the store compares that field on the card it just read with the value it read before. If a person or a board workflow changed it, and the card doesn't already hold the value being written, the write raises RoadmapCardChangedError (ROADMAP_CARD_CHANGED) before any edit. The job fails and the next round plans again, so a job never reverts a change it did not see (ADR 0002). A write of the value the card already holds goes ahead; an example is the Status New the board sets on a card intake just added. Both store adapters keep this contract.
Not covered here:
- the milestone (Release) write, which is noted on fix(roadmap): an item a person places in a release stays there, and the roadmap jobs comment on a rule it breaks instead of moving it out #1349;
- a card a person adds during intake's planning, and the refine hook's catch-all, both in fix(roadmap): intake keeps the fields a person set on a card added during its planning #1404.
Split out:
- fix(roadmap): a GraphQL budget refusal pauses every Service worker until the reset, and each Service round ends with its spend line #1400: the worker pause until the GraphQL reset and the per-round spend line. Acceptance criterion (a) and check (d) depend on the spend line, so they move with it.
- perf(roadmap): a Service poll with no event newer than the last round's sends no GraphQL request #1401: skipping the board read on a poll with no new event.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 8, 2026
Live measurement, 2026-10-08 at about 02:20 UTC. A person ran
devops roadmap reprioritize --confirmon this repository, and the plan had nothing left to move. The run made 0 changes and 10 job-record marks. It spent 2,022 GraphQL points, about 200 per mark, and took 11 min 14 s. Two earlier--confirmruns the same night were cut off by a 7- and a 15-minute timeout before their last step, the run-record write. So at today's write cost, a single reprioritize pass can outlast a reasonable timeout as well as use up the hourly budget.dan-petty-bot commentedon Oct 8, 2026
Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.
Production failures already occurred: five placements lost data and the service was refused twice within ~7 hours, blocking all roadmap work.Fixes data loss during intake and prevents repeated exhaustion of the machine account's GraphQL budget that halts the entire roadmap service.Requires rewriting _require_entry, set_field, and set_marks in github_store.py to target a card by node id and read only that card, plus verifying the read-back path in intake.py.dan-petty commentedon Oct 8, 2026
Placed in v0.2.29 by the owner on 2026-10-08 as a critical fix. The roadmap service has completed no devops-cli round in 6 hours (about 88 failures, all GraphQL reserve refusals), because each intake placement costs about 1,300 GraphQL points under the write pattern this item fixes. This is a person's placement, so it stays in the release (see #1349).
dan-petty-bot commentedon Oct 8, 2026
Admitted to v0.2.29: an open or merged pull request is in flight for it. (devops roadmap reprioritize)
fix(roadmap): write board fields by card node id and read only that c…
dan-petty-bot commentedon Oct 8, 2026
What changed
#1405, merged into
release/v0.2.29as 376a1b7.23 file(s) changed.
How it was verified
Check runs at 8068dbe:
Acceptance Criteria of
docs/agent/tasks/task-1361-board-writes-by-node-id.md:add_itemreturns the card it added, with its fields from one node read; both adapters and the protocol change together, and adding an issue already on the board returns its existing card (test_add_item_adds_the_issue_by_its_url_and_returns_the_card_it_added,test_adding_an_issue_already_on_the_board_returns_its_existing_card,test_adding_an_item_returns_it_with_its_card_and_adding_it_again_keeps_that_card).ItemandBoardEntrycarry the card's node id, from the add or from the listing (test_two_writes_from_one_read_keep_both_fields_in_the_job_record)._apply_placementwrites to the card it already has and never callsstore.item(); the "is not on the board after intake added it" error is deleted.field-list, and everyitem-edituses--id,--project-idand--field-id(test_a_value_write_sends_one_card_read_and_two_id_addressed_edits_and_no_board_read,test_no_roadmap_plan_lists_a_board_command_gh_resolves_by_reading_the_board_first).test_a_write_to_a_card_another_process_archived_raises_before_any_edit,test_a_mark_another_process_wrote_after_the_listing_was_read_is_kept,test_writing_an_item_that_is_not_on_the_board_raises_without_writing,test_a_write_refuses_before_it_starts_while_the_points_left_are_below_the_reserve).item-createreturns, and_require_cardreads by node id (test_set_run_record_creates_its_card_once_then_edits_its_job_record_by_node_id,test_remove_card_reads_the_card_then_deletes_it_by_id).test_the_store_reads_the_board_once_and_its_own_writes_keep_that_listing_current,test_an_added_card_joins_the_listing_the_store_already_read,test_each_read_passes_its_filter_at_the_source,test_a_reprioritize_run_on_a_board_of_931_items_charges_its_pages).RoadmapCardChangedErrorbefore any edit, in both adapters, forset_fieldandset_card_field; a write of the value the card already holds goes ahead, and a revert then a decision on one field from one read both go ahead (test_a_field_a_person_changed_after_the_listing_was_read_raises_before_any_edit,test_a_persons_change_stays_caught_after_the_store_wrote_another_field_of_its_card,test_a_write_of_the_value_the_card_holds_now_goes_ahead,test_the_stores_own_write_is_the_value_its_next_write_of_that_field_compares,test_a_card_field_a_person_changed_after_the_listing_was_read_raises_before_any_edit, and their in-memory counterparts intests/test_roadmap_store_contract.py).test_a_render_after_a_close_in_the_same_store_shows_the_status_the_board_set, forclose_issueandclose_as_duplicate).test_an_added_open_card_joins_the_open_items_listing_without_a_read).test_changes_since_drops_an_actors_own_changes_before_it_reads_the_board,test_changes_since_leaves_out_the_changes_one_actor_made,test_changes_since_with_an_empty_actor_leaves_out_nothingin both suites).test_a_board_write_plans_its_card_read_and_an_edit_by_node_ids,test_the_run_record_card_a_run_creates_is_written_with_no_read_after_its_create,test_intakes_placement_plans_no_board_read_after_its_add,test_a_reprioritize_runs_gh_argv_sequence_is_its_plan,test_a_render_runs_gh_argv_sequence_is_its_plan,test_every_jobs_dry_run_makes_no_request_and_lists_the_requests_a_run_makes).set_fieldon Value sends one card read and two id-addressed edits;set_field(Release)one card read, one edit and one REST milestone write; an archived card raises before any edit; another process's mark is kept.GitHubFakeat theghprocess edge: the observed lag (the listing leaves the new card out of three reads; afteritem-addno board listing query, six card reads; the same test fails on the code before this change with the read-back error), test(cli): Convert ratchets to bans and merge invariant tests #1336's state (only Effort and Priority, no listing query), and one listing for three placements on a 250-card board (test_intake_writes_to_the_card_it_added_while_the_board_listing_leaves_it_out,test_an_item_on_the_board_with_status_and_value_gets_only_effort_and_priority,test_an_intake_of_three_placements_reads_the_board_once).GitHubFake, which chargesitem-addas one mutation though gh first resolves the owner, board and issue with queries of its own), and a job-record mark 3 (test_a_placement_costs_the_same_few_graphql_points_whatever_the_boards_size,test_a_job_record_mark_costs_three_graphql_points_whatever_the_boards_size).test_a_round_judging_50_foreign_label_changes_reads_the_board_once,test_a_poll_whose_changes_are_all_the_services_own_sends_no_graphql_request).runnerseam; the run tests also fix the session login. Each new test's call phase is under 1 s; the slowest,test_a_placement_costs_the_same_few_graphql_points_whatever_the_boards_size[1080], took 0.07 s (--durations, run serially).changelog.d/1361.mdrecords the fix;CHANGELOG.mdanddocs/ROADMAP.mdare untouched.require_budget's andrequire_floor's details,ServiceManagerholding every repository's rounds, thetests/test_server_service.pycases) and the spend line at the end of each Service round: split out to fix(roadmap): a GraphQL budget refusal pauses every Service worker until the reset, and each Service round ends with its spend line #1400, as the issue's "One pull request?" question provides.gh api graphql -f query='query { repository(owner: "dan-petty", name: "devops-cli") { issue(number: <N>) { projectItems(first: 5) { nodes { createdAt fieldValueByName(name: "Priority") { ... on ProjectV2ItemFieldSingleSelectValue { updatedAt } } } } } } }'showscreatedAtand the Priority'supdatedAtless than 90 s apart.{namespace="devops", container="service"} |= "changed while they were read"shows no line inside those five placements, andsum(count_over_time({namespace="devops", container="service"} |= "GitHubRateLimitError" |= "GraphQL has" [24h]))is 0 on a day with at least 20 placements.{namespace="devops", container="service"} |= "when this run read it"line names a field a person or a board workflow changed after that round read the board, and the next round's write of that card succeeds.feat(release): v0.2.29 (#1455)