Skip to content

fix(roadmap): the Status writer guards an equal label - #5116

Merged
dan-petty merged 2 commits into
mainfrom
fix/5114-the-status-writer-guards-an-equal
Nov 12, 2026
Merged

dan-petty merged 2 commits into
mainfrom
fix/5114-the-status-writer-guards-an-equal

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

When the label equals the derived Status, write_status writes only the marks and the body of its caller with set_marks, which had no ADR 0002 guard. So refine, which calls a model for minutes between its read and its write, wrote its marks, its body and its Ready comment for an item whose Status another writer changed in that time. Before #5109, set_field refused that write.

set_marks gets the keyword unchanged. The store compares that field at its read before the write with the value that it read, as set_field does, and raises RoadmapItemChangedError before any write. write_status gives unchanged=ItemField.STATUS on the equal path. That path still writes no label and records no Status, and the guard sends no new request.

Both stores implement the guard, and the store contract test runs it on both.

Closes #5114

Change: openspec/changes/archive/2026-11-12-5114-the-status-writer-guards-an-equal/

When the label equals the derived Status, `write_status` writes only the
marks and the body of its caller with `set_marks`. `set_marks` had no
ADR 0002 guard, so refine wrote its marks, its body and its Ready comment
for an item whose Status another writer changed during the model call,
and the lost write was silent.

`set_marks` gets the keyword `unchanged`. The store compares the field
of its read before the write with the value that it read, as `set_field`
does, and raises `RoadmapItemChangedError` before any write. The writer
gives `unchanged=ItemField.STATUS` on the equal path. It still writes no
label and records no Status there, and it sends no new request.
@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 12, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Evidence for the fix of #5114 (found by the review of #5109).

uv run devops ci fail-to-pass --base origin/main on the head:

failed on base: tests.roadmap.refine.test_roadmap_refine_one_write::test_a_ready_item_whose_status_a_person_changed_during_the_round_gets_no_write (Failed: DID NOT RAISE RoadmapItemChangedError)
failed on base: tests.roadmap.stores.test_roadmap_store_contract::test_marks_on_a_field_a_person_changed_since_the_read_are_refused[github] (TypeError: GitHubRoadmapStore.set_marks() got an unexpected keyword argument 'unchanged')
failed on base: tests.roadmap.stores.test_roadmap_store_contract::test_marks_on_a_field_the_jobs_own_store_wrote_since_the_read_go_ahead[github] (TypeError: GitHubRoadmapStore.set_marks() got an unexpected keyword argument 'unchanged')
failed on base: tests.roadmap.test_roadmap_status_sync::test_the_status_writer_refuses_the_marks_when_another_writer_changed_an_equal_label (Failed: DID NOT RAISE RoadmapItemChangedError)
4 failed on base (4 failed and 210 passed in tests/roadmap/refine/test_roadmap_refine_deferred.py, tests/roadmap/refine/test_roadmap_refine_gateway_failures.py, tests/roadmap/refine/test_roadmap_refine_one_write.py, tests/roadmap/stage/test_roadmap_stage_item_

All four pass on the head. Covering tests on the head: tests/roadmap/refine, tests/roadmap/stage, tests/roadmap/implement, tests/roadmap/stores, tests/roadmap/intake, the repair, return, status and stop-clear tests, the dry-run tests and tests/invariants/test_architectural_invariants.py: 5602 passed, 1 skipped. After the rebase over #5111: 478 passed in the status sync, claim, store contract, refine one-write, stage item-write, stop-clear and invariant tests. Static rows (lint,format,docs,constructs,openspec,test-tree) pass, and mypy passes on the changed source files.

The Service runs this code, so this pull request waits for the owner's "safe and vetted" call before it merges.

@dan-petty
dan-petty marked this pull request as ready for review November 12, 2026 15:36
@dan-petty
dan-petty merged commit aaf3eaf into main Nov 12, 2026
24 checks passed
@dan-petty
dan-petty deleted the fix/5114-the-status-writer-guards-an-equal branch November 12, 2026 15:40
dan-petty pushed a commit that referenced this pull request Nov 12, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.120.0](v0.119.0...v0.120.0)
(2026-11-12)


### Features

* **agents:** remote agent sessions install the git hooks
([#5126](#5126))
([a04e7a9](a04e7a9))


### Bug Fixes

* **k8s:** give the ollama-16gib tier a memory limit
([#5117](#5117))
([22176a0](22176a0))
* **roadmap:** the Status writer guards an equal label
([#5116](#5116))
([aaf3eaf](aaf3eaf))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(roadmap): the Status writer guards an equal label

1 participant