Skip to content

fix(roadmap): start a new job record for an item that came by transfer #7347

Done

Description

@dan-petty

Problem Description

An issue that a person transfers to a repository keeps its body. The body holds the job record of the roadmap Service from the repository that the issue left: branch names, pull request numbers and Job names. The rows of the new repository read that record as their own.

Seen on 2026-11-26 on the live Service (v0.223.2): the stage row fails for such an item in each round, about every 4 minutes, with step=apply class=ci_infra, and writes stage.failed_error = GitHubNotFoundError into the item each time. staged_plans and closed_plans (src/devops_cli/roadmap/stage/stage_rejected.py) read the pull request of stage.pr, and the repository has no pull request with that number. The conditions of staged_plans do not change, so nothing ends the loop.

Reproduction Steps

  1. With GitHubFake, give an open item with Status New a record with stage.branch = feat/<another number>-x, stage.pr and stage.ready of a number that the repository does not have.
  2. Run the stage round two times.

Expected vs Actual Behavior

  • Expected: a record that was written for another repository gives no value to a row or a Job. The item starts as a new item of its repository, and one write removes the old keys from the body.
  • Actual: the round records a failure for the item at each run.

Proposed Fix

  • The read of the record (decode_job_record in src/devops_cli/roadmap/stores/store.py) gives an empty record when a recorded branch (stage.branch, implement.branch, the branch of stage.pending) names another issue number.
  • One write resets the whole record of such an item, because a later write merges into the raw block.
  • The record holds the repository that it was written for, so a record with no branch key, or an item that keeps its number, is found too.
  • A row that takes a pull request number from the record first checks that the head branch of that pull request is the recorded branch (_find_plan_item in src/devops_cli/roadmap/watch_row.py, _remove_staged in src/devops_cli/roadmap/stage/stage.py).

Acceptance Criteria

  • Test first: a stage round with one such item and one other item ends with no failure, and the body of the item holds no old key after it. The test fails on the base.
  • A test: the record of an item whose branch names its own number is read as before.
  • A test for each of the two rows above: a pull request whose head branch is not the recorded branch is not the pull request of the item.
  • A test: a record with the stamp of another repository is empty for each reader.

Environment Diagnostics

devops-cli 0.223.2.

Activity

  1. dan-petty commented on Nov 26, 2026

    @dan-petty
    OwnerAuthor
    • Priority: The stage row fails for the item in each round on the live Service every four minutes.
    • Related: fix(roadmap): a row goes on when an item left the repository #7337, which asks for a different change. Both deal with transfer causing repeated stage round failures, but 7337 drops an item that left the repo while the candidate resets a stale record on an item that arrived.
  2. added
    type/bug
    source/agent
    scope/roadmap
    status/new
    effort/medium
    value/high
    priority/p0-critical
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 26, 2026
  3. dan-petty commented on Nov 27, 2026

    @dan-petty
    OwnerAuthor

    Scope change, 2026-11-27

    The third point of the proposed fix and the fourth acceptance criterion (the record holds the repository that it was written for) are not part of this item. A rename of a repository, or its move to another owner, would make each record with the old name read as empty, and the next write would reset it. The pull request #7361 keeps the other three points.

    Checks of the live data on 2026-11-26 (open issues of the Service repositories, read-only):

    • 0 of 826 open issues hold a record whose branch names another issue number, so the new read resets no record of today.
    • 27 open items hold stage.pr, and each of them also holds stage.branch, so the check of the head branch leaves out no plan of today.
  4. added
    status/in-review
    and removed
    status/in-progress
    on Nov 27, 2026
  5. removed
    status/in-review
    owner/agent
    on Nov 27, 2026
  6. devops-cli-service commented on Nov 27, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-27 01:39 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/mediumpriority/p0-criticalscope/roadmapsource/agenttype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions