Repository navigation
Description
Context & Rationale
Two modules write board fields with gh project item-edit, and two own Status policy. Checked at 9c879ae.
roadmap/github_store.py(:571-810) writes a field and, beside it, the Job record ADR 0002 requires, so a later job can tell a person's change from its own.github/projects.py(:851-1244:sync_repository_issues_to_project,plan_item_changes,_forced_status,initial_status,declared_priority,_edit_project_item_field,reconcile_project_custom_fields) writes without the compare. It forces Done / In Progress / In Review from pull request state, a vocabulary the Roadmap does not use; CONTEXT.md's Started, Stalled and Not planned appear nowhere insrc/.gh project reconcilecan therefore overwrite what a person or a job set.- The store is used by four milestone commands only. No command calls
store.set_field; only the intake and refine jobs call it (roadmap/intake.py:1165,roadmap/refine.py:1156).commands/gh.pyimports 9 names fromgithub.projectsand fromroadmap.storeside by side. tests/test_github_projects.pyandtest_github_projects_reconcile.py: 62 tests patchingprojects.run_gh18 times,_is_graphql_quota_exhausted10 times and_get_authenticated_user6 times.
Deletion test: delete the item-write half of projects.py and the only behaviour that vanishes is the old status-forcing policy; the field writes already exist in the store. Two real adapters (GitHubRoadmapStore, InMemoryRoadmapStore) already justify the seam.
Scope & Deliverables
- Deliverable: every board-field write goes through
RoadmapStore, so the Job record compare holds on every write path.projects.pykeeps template loading, field and view provisioning and the auth-scope checks. Any "Item status from pull request state" rule becomes a roadmap job written against the store and run by feat(roadmap): run the roadmap jobs when they are due (devops roadmap run) #981;gh project syncandreconcileopen a store. - Tests: the 62 tests above become job tests on
InMemoryRoadmapStore; therun_ghand GraphQL-quota patches go. - Key questions (open):
- Which Status transitions may a job make (CONTEXT.md: Started, Stalled; ADR 0002: never revert a person's change)?
- What happens to
plan_item_changesonce refactor(github): the board's priority field is the only priority source, and stray type labels merge into type/bug #880 makes the board the only priority source? - Does
gh project reconcilesurvive as a command, or doesroadmap run(feat(roadmap): run the roadmap jobs when they are due (devops roadmap run) #981) replace it?
- Constraint: ADR 0001 and ADR 0002 stand; this item makes them hold where today's reconcile path does not.
Strategic Alignment
- Design: CONTEXT.md (Item, Started), ADR 0001, ADR 0002
- Depends on: none (refactor(github): roadmap store that reads and writes items, releases and board fields behind one interface #768 is merged)
- Related: refactor(github): the board's priority field is the only priority source, and stray type labels merge into type/bug #880, fix(github):
gh project syncstops parsing task files and reports only what it wrote #878, feat(roadmap): reprioritize places every open p0 and p1 item in an open release, from the backlog and at a release start #882, feat(roadmap): run the roadmap jobs when they are due (devops roadmap run) #981, feat(github): current release admission, cap, descoping and stall rules (devops roadmap reprioritize) #740 - Source: architecture review of 2026-10-02, commands over the GitHub and roadmap packages
Scope added 2026-10-02: checked at 38517a8, with two corrections. "Not planned" does appear in src, as CloseReason.NOT_PLANNED in roadmap/store.py:68; only Started and Stalled do not. In Progress, In Review and Done are the board statuses that CONTEXT.md's Started names ("in progress, in review or done", CONTEXT.md:43-45), so the defect is not a foreign vocabulary. It is that projects.py forces them from pull request state (_forced_status, github/projects.py:916-930) and writes them with gh project item-edit (:990-1011) without the last-set compare ADR 0002 requires. The store is read by four gh milestones commands (commands/gh.py:316-398) and by the roadmap jobs; intake and refine write fields through it. #740 (v0.2.25, in flight) adds Status writes through the store (a stalled item goes back to Ready), the run record and the last-set reads to both adapters. #981 (v0.2.26) adds devops roadmap run.
Acceptance criteria
-
rg '"item-edit"' srcfinds onlyroadmap/github_store.pyand the rate limiter's list of mutating verbs (config/constants.py:1935). -
github/projects.pykeeps template loading, field and view provisioning and the auth-scope checks._forced_status,plan_item_changes,_edit_project_item_field,_reconcile_single_item,_apply_field_updatesand the item-writing half ofreconcile_project_custom_fieldsare moved into the job or deleted. - Status from pull request state is a roadmap job written against
RoadmapStoreand run bydevops roadmap run. It applies today's rules (closed issue to Done, draft PR to In Progress, open or linked open PR to In Review). Before each write it compares the field with the value it last set, and leaves the field alone if a person changed it since. - A test on
InMemoryRoadmapStore: a person moves an item from In Review back to In Progress while its PR is open, and the next job run leaves it there. The same test with no person's change writes In Review once, and a second run writes nothing. -
gh project reconcileandgh project syncprovision fields and views and write no item field.gh project syncreconciles by default today (--reconcile-fields,commands/gh.py:472-478;github/projects.py:1284-1287), so the flag goes. A test asserts that neither command issues anitem-edit. - The item-writing tests in
tests/test_github_projects.pyandtests/test_github_projects_reconcile.pybecome job tests onInMemoryRoadmapStore, with norun_ghor GraphQL-quota patches. The provisioning tests stay. - The tests run offline.
- Names the job that does.
-
uv run devops cipasses. - (person-run)
devops roadmap run --dry-runon the board lists the Status writes it would make, and skips an item whose Status a person changed after the job's last write.
Key questions
- Which Status transitions may a job make (CONTEXT.md: Started, Stalled; ADR 0002: never revert a person's change)? (proposed) The three above. Each passes the last-set compare. Started and Stalled are derived states (
CONTEXT.md:43-49), so no job writes them as values. - What happens to
plan_item_changesonce refactor(github): the board's priority field is the only priority source, and stray type labels merge into type/bug #880 makes the board the only priority source? (proposed) Its priority half goes with refactor(github): the board's priority field is the only priority source, and stray type labels merge into type/bug #880, because the board becomes the source and nothing writes priority from labels. Its status half becomes this job. Whichever item lands second deletes the rest. - Does
gh project reconcilesurvive as a command, or doesroadmap run(feat(roadmap): run the roadmap jobs when they are due (devops roadmap run) #981) replace it? (proposed) It survives as provisioning only. Item writes run underroadmap run. - Does it land before or after feat(github): current release admission, cap, descoping and stall rules (
devops roadmap reprioritize) #740 and feat(roadmap): run the roadmap jobs when they are due (devops roadmap run) #981? (proposed) After both, and after fix(github): project reconcile reads an unknown quota, fixes existing cards first, and says when it stopped early #892 (v0.2.29). feat(github): current release admission, cap, descoping and stall rules (devops roadmap reprioritize) #740 adds the store's Status writes and last-set reads, and feat(roadmap): run the roadmap jobs when they are due (devops roadmap run) #981 adds the runner this job needs. fix(github): project reconcile reads an unknown quota, fixes existing cards first, and says when it stopped early #892 fixes the reconcile path's quota read, add-first budget and silent stop (github/projects.py:1087-1243); the job keeps those fixes when it takes over the writes.
Update 2026-10-08: refinement
Unblocked; #880 lands first. The item-edit criterion passes today only because reconcile uses item_edit_args (github/projects.py:991-1000); it becomes 'rg -n item_edit_args src prints nothing'. Helpers were renamed (plan_item_changes :833, reconcile_project_custom_fields :1044). Keep _stop_before_write. Provisioning stays in projects.py, so #1376 stays separate; the field builders go once nothing uses them, and the store's _read_fields already reads fail closed.
Proposed design
Problem statement
Two modules write board fields with gh project item-edit. The roadmap/github_store.py module writes with a Job record compare per ADR 0002. The github/projects.py module writes without the compare and forces Done, In Progress, or In Review from pull request state. A person's Status change can be overwritten. This item routes every board-field write through RoadmapStore so the last-set compare holds on every path. The projects.py module keeps only provisioning.
Acceptance criteria
- Criterion 1: No
item_edit_args,field_list_args, orFieldListingPayloadreference exists insrc/.
Verification:rg -n 'item_edit_args|field_list_args|FieldListingPayload' srcprints nothing. - Criterion 2:
github/projects.pykeeps template loading, field and view provisioning, and auth-scope checks. Item-writing functions are removed.
Verification:_forced_status,plan_item_changes,_edit_project_item_field,_reconcile_single_item,_apply_field_updatesand the item-writing half ofreconcile_project_custom_fieldsare absent fromgithub/projects.py. The_stop_before_writehelper is kept. - Criterion 3: Status from pull request state is a named roadmap job on
RoadmapStore, run bydevops roadmap run. It applies today's rules: closed issue to Done, draft PR to In Progress, open or linked open PR to In Review. Before each write it compares the field with the value it last set and leaves the field alone if a person changed it since.
Verification: A test onInMemoryRoadmapStore: a person moves an item from In Review to In Progress while its PR is open, and the next job run leaves it there. With no person's change, the job writes In Review once, and a second run writes nothing. - Criterion 4:
gh project reconcileandgh project syncprovision fields and views. They write no item field. The--reconcile-fieldsflag is removed.
Verification: A test asserts that neither command issues anitem-edit. Runningdevops gh project sync --helpshows no--reconcile-fieldsflag. - Criterion 5: Item-writing tests in
tests/test_github_projects.pyandtests/test_github_projects_reconcile.pybecome job tests onInMemoryRoadmapStore. Norun_ghor GraphQL-quota patches remain in those tests. Provisioning tests stay.
Verification:rg 'run_gh|_is_graphql_quota_exhausted|_get_authenticated_user' tests/test_github_projects.py tests/test_github_projects_reconcile.pyfinds no item-writing test patches. The provisioning and auth-scope tests are present and pass. - Criterion 6: The tests run offline.
Verification:uv run pytest tests/test_github_projects.py tests/test_github_projects_reconcile.pypasses with no network access. - Criterion 7: CI passes.
Verification:uv run devops cipasses. - Criterion 8:
devops roadmap run --dry-runon the board lists the Status writes it would make and skips an item whose Status a person changed after the job's last write.
Verification: Rundevops roadmap run --dry-runon a board with one person-changed item. The output lists the planned Status writes and names the skipped item.
Key questions
- Which Status transitions may a job make (CONTEXT.md: Started, Stalled; ADR 0002: never revert a person's change)?: The three board statuses: Done, In Progress, In Review. Each passes the last-set compare. Started and Stalled are derived states, so no job writes them as values. (proposed) [sources: CONTEXT.md, docs/adr/0002-roadmap-jobs-act-as-a-machine-account.md]
- What happens to
plan_item_changesonce refactor(github): the board's priority field is the only priority source, and stray type labels merge into type/bug #880 makes the board the only priority source?: Its priority half goes with refactor(github): the board's priority field is the only priority source, and stray type labels merge into type/bug #880, because the board becomes the source and nothing writes priority from labels. Its status half becomes this job. Whichever item lands second deletes the rest. (proposed) [sources: tests/test_github_projects_reconcile.py] - Does
gh project reconcilesurvive as a command, or doesroadmap run(feat(roadmap): run the roadmap jobs when they are due (devops roadmap run) #981) replace it?: It survives as provisioning only. Item writes run underroadmap run. (proposed) - Does it land before or after feat(github): current release admission, cap, descoping and stall rules (
devops roadmap reprioritize) #740 and feat(roadmap): run the roadmap jobs when they are due (devops roadmap run) #981?: After both, and after fix(github): project reconcile reads an unknown quota, fixes existing cards first, and says when it stopped early #892 (v0.2.29). feat(github): current release admission, cap, descoping and stall rules (devops roadmap reprioritize) #740 adds the store's Status writes and last-set reads. feat(roadmap): run the roadmap jobs when they are due (devops roadmap run) #981 adds the runner this job needs. fix(github): project reconcile reads an unknown quota, fixes existing cards first, and says when it stopped early #892 fixes the reconcile path's quota read, add-first budget, and silent stop; the job keeps those fixes when it takes over the writes. (proposed) [sources: src/devops_cli/github/projects.py, src/devops_cli/roadmap/github_store.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsReady
- StatusShow more project fieldsNew
Activity
dan-petty commentedon Oct 3, 2026
Order note (consolidation, 2026-10-03): #878 and #1010 are merged into #892 (v0.2.29). This item still lands after #892 and keeps its fixes. #880 (the priority source) lands before this item, in either order with #892. With all done,
rg '"item-edit"' srcfinds onlyroadmap/github_store.py.dan-petty commentedon Oct 8, 2026
Note from #1361 (2026-10-08). #1361 moved every roadmap store write to card node ids, so the store no longer sends
gh project field-listor a name-addresseditem-edit --url --field(each about 101 GraphQL points on board #2 in gh 2.102.0).field_list_args,item_edit_argsandFieldListingPayloadremain only becausegh project reconcile(github/projects.py, #892) still reads and writes through them. When this item moves reconcile's writes to the store, delete those builders and route reconcile through the store's node-id writes, so reconcile gets the same constant write cost.dan-petty commentedon Oct 17, 2026
Moved to v0.2.37: v0.2.37 started with fewer than its 16 items and was topped up to 16 from Ready items, critical fixes and P0 features first. (devops roadmap reprioritize)
dan-petty commentedon Oct 19, 2026
Status set back to New at 0ae4ea4: refine found it not ready (see Key questions, Fit and Suspected block in the proposed design in the issue body).
dan-petty commentedon Oct 28, 2026
Status set to Ready at 69636b6 (see proposed design in issue body).
dan-petty commentedon Oct 28, 2026
Closed as not planned. The item conflicts with a more recent project direction.
This item routes every board-field write through
RoadmapStore, so that theJob recordcompare of ADR 0002 holds on each write path. Its constraint is "ADR 0001 and ADR 0002 stand".On 2026-10-28 the owner decided that labels and milestones hold the Status, Priority, Value and Effort of an item, and that no roadmap job reads or writes the project board. The roadmap service moves to the
devops-roadmapGitHub App (#1647), and a GitHub App gets the Projects permission only at organization level, so it cannot reach board 12.#2399 delivers that decision. It deletes the board code of the store,
board_read.py, theboardkey and theJob recordfield check, and it amends ADR 0001. After #2399, no store writes a board field, so the premise of this item does not stay.No code was written for this item.