Skip to content

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

Closed

Description

@dan-petty

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

  1. In a test with InMemoryRoadmapStore, seed an item whose Status a job wrote as Ready.
  2. Read the Item.
  3. As a person, move the label to status/new.
  4. 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

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    on Nov 12, 2026
  2. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor
  3. added
    priority/p2-medium
    owner/agent
    on Nov 12, 2026
  4. removed
    owner/agent
    on Nov 12, 2026
  5. added
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 12, 2026
  6. removed
    status/in-review
    on Nov 12, 2026
  7. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-12 16:17 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions