Repository navigation
Description
Problem Description
write_status (src/devops_cli/roadmap/status_sync.py) compares the derived Status with the label of the Item that its caller read. When they are equal, it writes the marks and the body with set_marks. set_marks has no ADR 0002 guard. So when another writer changed the label after the caller read the Item, the write of the marks and the body is not refused, and the caller does not know that its decision is old.
Before #5109, refine and the returns of stage called set_field for each write. set_field read the issue and raised RoadmapItemChangedError when the Status changed since the read. #5109 moved these calls to write_status, and the equal path lost that guard.
Refine reads its items, calls a model for minutes, and then writes (refine.py, _apply_refined). In that time, the sweep (Ready to Planned), devops pr create (In Progress), devops roadmap return, a stage return or a person can change the label. Refine then writes its marks and its body, posts its Ready comment and counts readied=1. The label stays as the other writer set it. The marks of refine replace the marks of a stage return (BLOCKED_BY, NEXT_STEP). The lost write is silent, which is the opposite of the goal of #5018.
Reproduction Steps
- In a test with
InMemoryRoadmapStore, seed an item whose Status a job wrote as Ready. - Read the Item.
- As a person, move the label to
status/new. - Call
write_status(store, item, StatusFacts(), marks={...}, body="...")with the Item of step 2.
Expected vs Actual Behavior
Expected: RoadmapItemChangedError, and no mark and no body is written, as set_field did before #5109.
Actual: the writer returns StatusWrite(before='Ready', status='Ready'), writes the marks and the body, and raises no error. The label stays New.
Environment Diagnostics
main at 77bdb1f, after the merge of #5109.
Logs, Traces, or Terminal Output
FAILED tests/roadmap/test_roadmap_status_sync.py::test_the_status_writer_refuses_the_marks_when_another_writer_changed_an_equal_label - Failed: DID NOT RAISE RoadmapItemChangedError
Found by the review of #5109.
Source: #5109
Activity
dan-petty commentedon Nov 12, 2026
Both concern the Status writer in status_sync.py, but #5018 asked for the consolidation refactor while the candidate asks for a missing concurrency guard in that result.devops-cli-service commentedon Nov 12, 2026
Released in v0.120.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.120.0
devops-cli-service commentedon Nov 12, 2026
Live since 2026-11-12 16:17 UTC