Repository navigation
Description
Problem or Motivation
Three paths open a draft pull request: stage.py:2438 (_open_pull), implement_run.py:1398 and :1479 (_publish, _pull_request), and src/devops_cli/commands/pr.py:1246 with a REST fallback (:1007). Three sites add labels (stage.py:2570, :2583 and the implement Job). The Status is set in two ways, and stage sets none. A crash between the push and the open leaves a branch with no pull request, which stage.py:1973 cleans later. #3599 (retry a refused text) and #4127 (sync the title and type) each fix one copy.
Proposed Solution & Architectural Design
steps/open.py open_or_update(request) returns the number and created, updated or unchanged. First it looks up the open pull request of the head and the base (the logic of pr.py:937). It takes the title and body from the pull_form rules, adds the title labels as a set, sets In Progress for a delivery through the Status writer, records .pr and upserts one marked comment. When GitHub refuses the text, it tries one more time with the form-checked text (#3599). When the pull request exists, it changes only the fields that differ (#4127).
CLI devops roadmap step open. Stage, the implement Job and devops pr create call it in the same pull request. #3599 and #4127 fold here; #4045 and the metadata part of #3991 then change only steps/open.py. #4713 then moves only the call site of the implement Job to its end.
Open tool: the GitHub pulls API with head and base filters (gidgethub).
Timeouts: request 30 s with one retry < step 120 s.
Cost: about 1.2M tokens and 1 agent-day.
Target Subsystem
Roadmap steps (src/devops_cli/roadmap/steps/), stage, the implement runner Job and devops pr create.
Existing Tool Considered
The GitHub pulls API with head and base filters, through gidgethub.
Acceptance Criteria
- A test with the fake GitHub: a second run makes no second pull request; a refused text is sent again one time; an update changes only the fields that differ.
- A dry-run test sees 0 requests.
- The
devops pr createtests stay green. - A structural test fails when a module other than steps/open.py calls create_draft_pull.
Dependencies
- fix(roadmap): the final push of the implement Job can miss the latest main #4957 (push-step: fix(roadmap): one push step holds main at every push)
- refactor(roadmap): one Status writer for every job #5018 (status-writer: refactor(roadmap): one Status writer for every job)
- Part of feat(roadmap): track the Service step jobs #5014 (track the Service step jobs).
Source: #5014
Owner decision 2026-11-13
The approved pipeline split (tracker #5482, Phase 1) adds to this scope:
-
steps/open.pyis also a sweep step that recovers a PR that a killed unit did not open. Due: the branch head equals thechecked_shaof its producer in the record, and no open PR exists for that head and base. At most 3 requests. -
It refuses a second open PR for an issue.
-
It refuses a checked head whose commit message holds
[skip ci]. -
The person path of
devops pr create(feat(pr): pr create gates the change and pushes once #4708) uses this module when it merges first. -
Tests for the recovery, the second-PR refusal and the marker refusal.
-
Live proof: after the merge and the release, stage and the implement Job open their PRs as the App through
steps/open.py. A comment gives the result lines, and one recovery from a branch with no PR if one occurs in 7 days.
Alternatives check of 2026-11-15: not-applicable.
Class: refactor, no search.
Tool: none found.
Activity
dan-petty commentedon Nov 12, 2026
Both concern how the implement Job opens its pull request; the candidate creates the unified open_or_update function while #4713 moves the call site to the end of the Job.devops-cli-service commentedon Nov 15, 2026
Alternatives check: not-applicable
Class: refactor. The check makes no search and no model call for an item of this class.
Tool: none found
Checked on 2026-11-15. A person decides what this means for the item. The check changes no label and closes no issue.
docs(openspec): archive 5020-open-step (#5020)
chore(main): release 0.159.0 (#5869)
devops-cli-service commentedon Nov 15, 2026
Released in v0.159.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.159.0
devops-cli-service commentedon Nov 15, 2026
Live since 2026-11-15 23:51 UTC