Skip to content

refactor(roadmap): one Status writer for every job #5018

Closed

Description

@dan-petty

Problem or Motivation

derive_status (src/devops_cli/roadmap/status_sync.py:65) has one rule, but at least 6 callers write the Status in their own way: implement_run.py:722, :1715 and :1809; claim.py:163 and :176; stage_ready.py:134; implement_submit.py:493 (run_implement_round, 2 calls); run.py:634 (_run_stage_adapter). Some writes have no read-back, so a lost write stays lost (#4555). #4660 and #4685 add two more writers.

Proposed Solution & Architectural Design

Add one function to status_sync.py: write_status(store, item, facts, *, dry_run). It derives the Status, writes the label only when it differs, and reads the label back. It sets ItemField.STATUS through the record read-back of #4555 when #4555 merges. Change every caller to it in the same pull request, with no shim. #4660 and #4685 then call it. A dry run returns the would-be write and sends 0 requests. The hunks in implement_run.py (:722, :1715, :1809) are away from the push sites of push-step, and away from the hunks of PR #4966 in implement_submit.py (:116, :345) and run.py (:750), so this item can start now.

Cost: about 0.6M tokens and 0.5 agent-day.

Target Subsystem

Roadmap Status sync (src/devops_cli/roadmap/status_sync.py) and every job that writes the Status label.

Existing Tool Considered

No new tool. The change reuses derive_status and the record read-back of #4555.

Acceptance Criteria

  • uv run pytest tests/roadmap -k status_writer passes: no write when the label is equal; one write and one read-back on a difference; 0 requests in a dry run.
  • A structural test fails when a module other than status_sync.py adds or removes a Status label.
  • The stage, implement and claim tests stay green.

Dependencies

Source: #5014

Activity

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

    @dan-petty
    OwnerAuthor
  4. added
    priority/p2-medium
    and removed
    effort/medium
    on Nov 12, 2026
  5. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor
  6. added
    owner/agent
    status/in-review
    and removed
    status/new
    on Nov 12, 2026
  7. removed
    status/in-review
    owner/agent
    on Nov 12, 2026
  8. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor
  9. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-12 15:46 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

    priority/p2-mediumscope/roadmapsource/agenttype/refactorvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions