Skip to content

feat(roadmap): the implement Job opens its PR at the end #4713

Not planned
1 of 1 issue completed
Not planned

Description

@dan-petty

Problem or Motivation

In the census week (2026-11-04 to 2026-11-11), implement pull requests got 3.41 CI runs each. The Job pushed 19 wip heads to open pull requests, and all 7 format failures came from wip heads. The Job edits the title and body of the pull request after the open. The owner decided on 2026-11-11 that the implement Job opens its pull request at the end (OD3 a).

Proposed Solution & Architectural Design

  1. _publish pushes the branch with no pull request. A push to a branch with no pull request starts 0 runs (the triggers of all 10 workflows).
  2. Wip and checkpoint pushes go through the push gate of feat(git): refuse a push that does not hold origin/main #4670. A rebase conflict skips a wip push.
  3. The end push opens the draft with the final title and body.
  4. The run table, the branch and a compare link go into one issue comment, through the helper of feat(ci): show the gate result on the issue #4702.
  5. A stop opens no pull request. The issue comment names the branch.
  6. After the merge, close fix(roadmap): WIP keeper must test packages before pushing WIP commits #4068, fix(roadmap): comment on pull request when implement stops #3997 and fix(roadmap): update pull request metadata when archiving a change #3991 as superseded. The pull request body names only its own issue.

Target Subsystem

SDLC, Git & PR Governance (src/devops_cli/roadmap/implement/).

Existing Tool Considered

GitHub compare links and the issue note helper of #4702 cover the status view. Cost (estimate): about 300,000 tokens and 5 hours to build, about 10,000 tokens a month to keep, about 40,000 tokens to fix.

Acceptance Criteria

Dependencies

#4078, #4670, #4702.

Source: #4667

Owner decision 2026-11-13

The implement Job opens its PR at its end through steps/open.py (#5020). Source: tracker #5482, Phase 3.

  • Live proof: after the merge and the release, the next implement Job opens its PR as the App at its end. A comment gives the result lines.

Alternatives check of 2026-11-29: none.
Tool: none found.
Reason: Searches found only generic PR automation and whole coding-agent platforms, which open a PR when told to but do not change when this project's implement Job opens it, and hold neither the push step of #4670 nor the note helper of #4702.

Covers:

  • Creates a branch and pull request from a workflow step
  • Sets draft state, title and body on create
  • Pushes commits to a branch on demand

Lacks:

  • No change to when the implement Job opens its draft
  • No wip or checkpoint push gate for the Job
  • No run table and compare link on the issue
  • No stop path that names the branch instead of opening a PR

Proposed design

Problem statement

The implement Job opens its draft pull request at the first push of a Planned item. Every later wip: push then starts the pull request workflows, and the Job edits the title and body after the open. In the census week, implement pull requests got 3.41 CI runs each, and all 7 format failures came from wip: heads. This change pushes the branch with no pull request, opens the draft at the end push with the final title and body, and writes the run table to the issue. Two parts wait on the merge: the live proof with the one-week CI measure, and the close of three superseded issues.

Acceptance criteria

Requirement: No pull request before the end push

The implement Job SHALL push the branch of a Planned item with no pull request until the end push.

Scenario: A wip push on a Planned item

  • WHEN A test runs the implement Job to the first wip: push of a Planned item.
  • THEN The test finds one push to the branch and no pull request for the branch.

Requirement: The end push opens the draft

The end push SHALL open one draft pull request through the open step of #5020, with the delivery title and a body that closes only its issue.

Scenario: A run that reaches the end push

  • WHEN A test runs the implement Job to a successful end push.
  • THEN The test finds one draft pull request with the delivery title and a body that holds Closes #<issue> for the item and no other closing keyword, and no later title or body write.

Requirement: One issue comment holds the run table

The Job SHALL write the run table, the branch and one compare link in one issue comment through the note helper of #4702.

Scenario: A run that ends

  • WHEN A test runs the implement Job to its end push.
  • THEN The test finds one issue comment with the run table, the branch name and one compare link.

Requirement: A wip push goes through the push step

The Job SHALL send each wip: and checkpoint push through the push step of #4670.

Scenario: A wip push

Requirement: A stop opens no pull request

A stopped run SHALL open no pull request and SHALL name the branch in its issue comment.

Scenario: A stop after a wip push

  • WHEN A test stops the implement Job after a wip: push reached the branch.
  • THEN The test finds no pull request for the branch, and one issue comment that names the branch.

Requirement: A conflicted end push keeps the commits

When the end push stops on a rebase conflict, the Job SHALL push the commits to the branch and SHALL open no pull request.

Scenario: A conflict on the end push

  • WHEN A test moves the file of a wip: commit on origin/main before the end push.
  • THEN The test finds the commits on the branch, no pull request, and one stop comment that names the branch and the conflicted files.

Existing Tool Considered

No alternatives check found an open, maintained tool or library that covers the need (verdict none, 2026-11-14). The check named only whole coding-agent platforms, such as OpenHands (MIT, last activity 2026-11-14), and generic branch-to-pull-request actions and GitHub API clients. None of them changes when this project's implement Job opens its pull request, and none holds the push step of #4670, the open step of #5020 or the note helper of #4702. The change builds the project's own workflow code. Written cost (estimate): about 300,000 tokens and 5 hours to build, about 10,000 tokens a month to keep, and about 40,000 tokens to fix.

Key questions

  • When and where does the implement Job open the draft pull request?: At the end push, through the open step of refactor(roadmap): one open step for every pull request #5020, with the delivery title and a body that closes only the issue of the item. _publish pushes the branch with no pull request. (best practice) [sources: src/devops_cli/roadmap/implement/implement_run.py, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md, openspec/changes/archive/2026-10-29-2714-planned-items/design.md]
    • Chosen: Open at the end push through the open step of refactor(roadmap): one open step for every pull request #5020. The owner decided this on 2026-11-13. The one open writes the final title and body, so the Job edits neither after it.
    • Rejected: Keep the open at the first push in _publish. Each later wip: push then starts the pull request workflows, and the title and body need a later edit.
    • Rejected: Open at the first push and edit the title and body at the end. This is the behavior today. The edits add work and do not stop the runs on the wip: heads.
  • What keeps the passed commits when the end push stops on a rebase conflict?: The Job aborts the rebase and pushes the head to the branch with no pull request. The next run takes the branch and its commits. (best practice) [sources: src/devops_cli/roadmap/implement/implement_run.py, CONTEXT.md]
    • Chosen: Push the head to the branch with no pull request. The branch keeps each passed commit, and a branch with no pull request starts no pull request workflow.
    • Rejected: Keep a git bundle on a volume. It needs a new volume in the runner, and the branch on origin already keeps the commits.
    • Rejected: Give the conflict one model fix step. A model step costs tokens and does not settle a conflict that stays.
  • How does the run table reach the item when no pull request exists?: The Job writes one issue comment through the note helper of feat(ci): show the gate result on the issue #4702. The comment holds the run table, the branch and one compare link. (best practice) [sources: src/devops_cli/roadmap/implement/implement_run.py, CONTEXT.md]
    • Chosen: One issue comment through the note helper of feat(ci): show the gate result on the issue #4702. No pull request exists before the end push, and a stop opens none. The issue comment holds the run table at each step.
    • Rejected: A comment on the draft pull request. The draft opens at the end, so most of the run has no pull request to comment on.
    • Rejected: No comment before the end push. A stop would leave no run table, and the branch name would be lost.
  • How does a wip: push avoid a workflow run on its head?: The Job sends each wip: and checkpoint push through the push step of feat(git): refuse a push that does not hold origin/main #4670. The step is the one place that holds the push rules, and every caller uses it. (best practice) [sources: docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md, CONTEXT.md]
  • Which account pushes the branch and opens the draft at the end?: The roadmap's GitHub App. The runner Job refuses to run unless the process acts as the App, and its installation token names one repository. [sources: docs/adr/0015-roadmap-jobs-act-as-a-github-app-on-the-personal-account.md, src/devops_cli/roadmap/implement/implement_run.py, CONTEXT.md]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#4078, #4670, #4702, #5020

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added
    source/agent
    on Nov 11, 2026
  2. added
    type/feature
    scope/roadmap
    status/new
    value/high
    effort/medium
    on Nov 11, 2026
  3. dan-petty commented on Nov 11, 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/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. It cuts implement CI runs from 3.41 to at most 1.5 per pull request, but it depends on three other items and was planned by the owner.
    • Value: High. It eliminates all wip-head format failures and halves the CI run count per pull request.
    • Effort: Medium. The body estimates about 300,000 tokens and 5 hours to build, covering the push gate, the end-push open, and the stop path.
    • Related: fix(roadmap): comment on pull request when implement stops #3997, which asks for a different change. Both deal with what happens when the implement Job stops, but the candidate prevents the pull request from opening at all while #3997 adds a comment to an already-open pull request.
  4. added
    priority/p2-medium
    on Nov 11, 2026
  5. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    Alternatives check: none

    Reason: The searches surfaced only whole coding-agent platforms (for example OpenHands, an MIT platform with its own agent loop and PR flow) and generic branch-to-PR actions or GitHub API clients; none of them is a component that changes when and how this project's own implement Job opens its pull request. The need is project-internal workflow logic — the push gate of #4670, the end push through steps/open.py (#5020) that opens the draft with the final title and body, the run-table issue comment through the helper of #4702, and the no-PR stop path — so no open tool covers it, and the issue's own "Existing Tool Considered" already points at the project's helpers.

    Tool: none found

    Lacks:

    Tools considered:

    Searches run:

    • GitHub App bot opens pull request with final title and body after agent job completes open source tool, results: 5
    • coding agent opens draft pull request at end of run instead of pushing wip commits, results: 5
    • github-actions bot open pull request at end of workflow instead of on each push draft PR, results: 5
    • OpenHands agent create pull request only after task completes GitHub, results: 5
    • "pull request" automation library open PR after changes complete with description changelog bot, results: 5
    • tool that delays pull request creation until coding agent finishes, avoids CI runs on work-in-progress branches, results: 5

    Sources:

    Checked on 2026-11-14. A person decides what this means for the item. The check changes no label and closes no issue.

  6. dan-petty commented on Nov 14, 2026

    @dan-petty
    OwnerAuthor

    Evidence from #1928 (2026-11-14): a rebase conflict that stays until the end of the run loses all the work of the run.

    Point 2 of this item says "A rebase conflict skips a wip push". When no other path keeps the commits, a conflict that does not go away loses all the passed groups. Possible fixes:

    1. Give a rebase conflict one fix step of the model, as a failed check gets one.
    2. Keep the passed commits where a retry can take them, for example a git bundle on a persistent volume, or a ref that starts no workflow.
    3. Name the conflicted files and the kept commits in the stop comment.
  7. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at cd3e0f9 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.

    The next refine round also looks at the item again when a commit on the default branch changes one of these files: src/devops_cli/roadmap/implement/implement_run.py.

  8. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at e5dfddb while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.

  9. dan-petty commented on Nov 20, 2026

    @dan-petty
    OwnerAuthor

    Frozen on 2026-11-20. The stage, implement and fix-checks jobs grade under 60%, so the owner rule asks for a re-architecture before more fixes inside the current design (tracker #6519). This item is incremental work on those jobs, so its Dependencies section now names #6521 first. Stage and implement leave this item while #6521 is open. When the experiments of #6519 decide, a person closes #6521 (this item can then continue) or closes this item as not planned.

  10. dan-petty commented on Nov 30, 2026

    @dan-petty
    OwnerAuthor

    Premise check after the release of the hold #6521 (2026-11-30): implement_phases.py now runs prepare, agent and publish; publish pushes once at the end and opens the draft through steps/open.py open_or_update. No wip or checkpoint push is left in src/devops_cli/roadmap/implement (#6790 removed the interim git controls). #4068, #3997, #3991 and #5020 are closed. What is left (run table and compare link) waits on #4702. Closed as not planned (AGENTS.md rule 2); file a new item from fresh evidence if needed.

  11. removed
    status/new
    on Nov 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-mediumscope/roadmapsource/agenttype/featurevalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions