Skip to content

fix(roadmap): a merged staging pull request ships as a fix and stage stages the item again #2714

Description

@dan-petty

Problem or Motivation

A person merged the draft pull request that the stage job opened for #2656 (pull request 2697). The squash commit on main is 676d505e, "fix: report a clear error for a merge-key unset (#2697)". It holds only the plan files in openspec/changes/2656-devops-config-unset-stops-with-a/, no code. Three things went wrong, each seen on 2026-10-29:

  1. The plan ships as a fix. The stage job gives the pull request the type of the issue, fix. release-please reads the squash commit and release pull request 2711 lists "report a clear error for a merge-key unset" under Bug Fixes of 0.21.0. No fix is in 0.21.0. The project's own rule for a plan-only pull request is the type docs(openspec) with "Plans #N" (CONTRIBUTING.md, section 5: only the first five types add a changelog line).
  2. Stage stages the item a second time. devops roadmap stage --plan after the merge says "To stage: fix(config): devops config unset stops with a TypeError for a key that a YAML merge key gives #2656 ... branch fix/2656-devops-config-unset-stops-with-a". The branch is deleted, so the held-issue rule no longer holds the item. A second run would write the same change folder, which main already has, in a second pull request.
  3. Implement cannot use the merged plan. devops roadmap implement --plan says "Left out: fix(config): devops config unset stops with a TypeError for a key that a YAML merge key gives #2656 ... Its staged branch is not on origin". The item stays Ready with stage.pr 2697 in its record, and nothing implements it.

Proposed Solution & Architectural Design

  • The staging pull request has the title docs(openspec): plan #<issue> <summary>, and its squash commit has the same type. The pull request that later delivers the code has the type of the issue.
  • Stage leaves out an item whose change folder openspec/changes/<issue>-* is on origin/<default branch>. The plan names the reason: "Its plan is on ".
  • Implement takes a Planned item as well as a Staged one: an item with a Ready Status whose change folder is on origin/<default branch> and whose issue is open. For a Planned item, the job makes the branch <type>/<issue>-<slug> at origin/<default branch>, with the change folder already there. It runs the groups of that change, archives it, and opens the pull request with Closes #<issue>. The job record keeps implement.branch and implement.pr.
  • A person who merges the staging pull request early then loses nothing, and a second pull request is never opened.

Target Subsystem

src/devops_cli/roadmap/stage.py, src/devops_cli/roadmap/implement.py, src/devops_cli/roadmap/implement_run.py, CONTEXT.md (the term "Planned").

Existing Tool Considered

release-please and its Conventional Commit types (release-please-config.json lists the types that add a changelog line), the OpenSpec change folder as the plan, and git ls-tree for the folder on origin/<default branch>. Nothing new is built but the two checks.

Acceptance criteria

  • With GitHub and git faked at the process edge, the title and the squash type of a staging pull request are docs(openspec), for an issue of type bug and of type feature.
  • A stage plan leaves out an item whose change folder is on the default branch, and the reason is named.
  • An implement plan of a Planned item makes a new branch at the default branch, runs the groups, archives, and the pull request closes the issue. A Staged item with an open branch is unchanged.
  • uv run devops ci passes, and devops docs generate --sync-readme is run.

Evidence: pull request 2697, commit 676d505, release pull request 2711, and the two plans quoted above.

Activity

  1. added
    source/agent
    type/bug
    status/new
    value/medium
    effort/medium
    on Oct 29, 2026
  2. dan-petty commented on Oct 29, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The title uses the fix prefix and the body describes three defects in the existing staging and implement workflow.
    • Priority: P2-Medium. The bug corrupts release notes and blocks implementation, but a person can work around it manually. The regression commit 676d505 does not set P0: the author has no write access, and no caller attached it as evidence. A person can set P0 with the label priority/p0-critical.
    • Value: Medium. It stops incorrect changelog entries and unblocks items whose plan was merged early.
    • Effort: Medium. Three distinct fixes across stage.py, implement.py, implement_run.py, and CONTEXT.md with tests.
    • Related: feat(roadmap): devops roadmap implement runs every group of a staged change, archives it, fixes a failed check once and marks the pull request ready #2665, which asks for a different change. Both extend the implement command, but #2665 runs groups of a staged change while the candidate handles a Planned item whose plan is already merged to main.
  3. added
    priority/p2-medium
    on Oct 29, 2026
  4. added 2 commits that reference this issue on Oct 29, 2026
    043463b
    279b3d0
  5. removed
    status/new
    on Oct 30, 2026
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/p2-mediumsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions