Skip to content

fix(roadmap): refine skips an item that changed during the write #5299

Closed

Description

@dan-petty

Problem

When an item changes while refine writes it, refine records a job error and the Service batch fails. Intake records the same race as a skip.

Evidence (release 0.124.0, 2026-11-12T23:58:53Z, Loki {namespace="devops", service_name="roadmap-service"}):

  • Refine wrote nothing more for #5213 in dan-petty/devops-cli: the write failed (RoadmapItemChangedError). (WARNING)
  • roadmap job result: job=refine repo=dan-petty/devops-cli item=#5213 result=error success=false class=head_moved infra=false
  • Service job execution failed for dan-petty/devops-cli: Roadmap jobs failed: refine: refine could not write 1 item(s), and went on: #5213 (ERROR, RoadmapRunError from run.py _raise_for_rows)

The cause of the change: #5279 merged at 23:40Z and closed #5213 while the refine round held it. In the same 6 hours, intake recorded 25 results skipped for the same class of race.

Effect: the refine grade falls under 80 % (12 of 16, in place of 12 of 15) for a race that no fix can prevent, and the Service logs an ERROR with a full traceback for a normal event.

Proposed solution

Make refine treat RoadmapItemChangedError (class head_moved) like intake does: record result=skipped, do not count the item as a write failure in raise_for_failures, and let the next round read the item again. Keep a real write failure as an error.

Acceptance

  • A test where the item changes between read and write gives result=skipped class=head_moved success=true and no RoadmapRefineError.
  • A test where the write fails for another reason still raises.
  • The job grade of refine (feat(roadmap): track job grades for each agentic workflow #5164) counts skipped as an intended result, as it does for intake.

Activity

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

    @dan-petty
    OwnerAuthor
  3. added
    priority/p2-medium
    owner/agent
    on Nov 13, 2026
  4. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor

    Design note for the build of this issue (branch fix/5299-refine-skips-an-item-that-changed, not pushed yet).

    The premise is correct. Loki shows the same race for #5213, #5100 and one item of another repository in the last 48 hours: result=error class=head_moved, then RoadmapRunError with a traceback.

    One acceptance item has a false premise. The issue says that intake counts skipped as an intended result. SUCCESS_RESULTS of intake holds only placed and duplicate, so intake logs skipped with success=false. The rule of the project for this race is in docs/roadmap/job-success.md: an alternatives check whose body changed since the read writes no line. #5166 plans the same for intake. The effect in this issue (12 of 15, not 12 of 16) is also the count with no line.

    So the change writes no result line for a changed refine item, in place of result=skipped success=true. The round does not fail, logs one INFO line, and the next round reads the item again. A write that fails for another reason still fails the round. The proposal (Feasibility) and the design of the change folder give the evidence.

  5. added
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 13, 2026
  6. removed
    status/in-review
    owner/agent
    on Nov 13, 2026
  7. devops-cli-service commented on Nov 13, 2026

    @devops-cli-service
    Contributor
  8. devops-cli-service commented on Nov 13, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-13 12:38 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