Skip to content

docs(openspec): plan #2777 Label the stage and implement pull requests - #3169

Merged
dan-petty merged 4 commits into
mainfrom
feat/2777-the-stage-and-implement-jobs-label
Nov 2, 2026
Merged

dan-petty merged 4 commits into
mainfrom
feat/2777-the-stage-and-implement-jobs-label

Conversation

@devops-cli-service

@devops-cli-service devops-cli-service Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Plans #2777

The stage job and the implement job open and update pull requests through their own client, so their pull requests get no type/* or scope/* label. Of the latest 100 pull requests, the 43 of the App hold 0 labels.

The plan labels both jobs from the title, with the pieces of #2748. The stage job adds the labels after it records the item. A refused label becomes a note in its comment, and the branch, the draft and the record stay. The implement job adds the labels of the new title and removes the labels of the staging title that do not fit. It reads the old title and the held labels in one request, and keeps the labels of a person. Rejected credentials still stop both jobs. The dry runs list the new requests.

Change: openspec/changes/2777-the-stage-and-implement-jobs-label/

🤖 Generated with Claude Code

https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW

Copy link
Copy Markdown
Owner

Review of the plan for #2777.

CI: all 18 checks green or skipped on 78f61fa (Static Analysis, Tests & Coverage, Semantic PR title pass). Premise: holds in part. #2748 is closed and merged (#2782), and read_title_labels/add_pull_labels exist in src/devops_cli/roadmap/pull_labels.py. The claim "no code removes a label" is wrong (finding 1).

  1. The Feasibility claim "search_code for unlabel and label_issue found no removal of a label" is false. InMemoryRoadmapStore.remove_label exists at src/devops_cli/roadmap/memory_store.py:265 (it records roadmap.issue.unlabel). resolve_updated_labels at src/devops_cli/github/issues.py:575-596 and src/devops_cli/commands/gh.py:1363-1415 also remove labels. Task 1.2 adds unlabel_issue to the in-memory store beside a method that already does the job, so the store has two names for one act. Fix: rename remove_label to unlabel_issue in the in-memory store (and its callers) or reuse it, and correct Feasibility with a command that can run again (git grep -n "remove_label\|unlabel" src/). The tool names read_file/search_code/list_files are not commands a reader can repeat.
  2. Task 4.2 needs "the labels of the old title", but _pull_request (src/devops_cli/roadmap/implement_run.py:580-591) never reads the old title. It only calls client.update_pull. GitHubClient.get_pull exists (src/devops_cli/github/client.py:282), but no task reads it before the update, and test 4.1 does not say how it doubles it. Also decide the source: the old title, or the labels the pull request holds now. The held labels are safer, because a stage-time label failure leaves the old title's labels unset.
  3. The store contract is under-scoped. unlabel_issue needs a request builder in github_store.py (beside label_args at line 489, a DELETE repos/{repo}/issues/{n}/labels/{label}), which Impact and task 1.2 do not list. It also needs: the write name in WRITES in tests/roadmap_faults.py:20-28; a contract test next to tests/roadmap/test_roadmap_store_contract.py:921-930; and the request_plan.py pairing used by intake_requests.py:150 if the jobs use it. Add these files to Impact and to group 1. A DELETE of a label the pull request does not hold returns 404, so say how that case is handled (ignore, or report).
  4. Stage ordering. In _stage_one (src/devops_cli/roadmap/stage.py:1119-1146) _open_pull runs inside with _worktree(...), and set_marks and the comment run after it. Task 3.2 says "after _open_pull returns" without saying where. Put the label call after set_marks, so no error in the label path can skip the marks. Say so in the design, and add the new MESSAGES.roadmap string for the comment to Impact (lang/en/). The text of the failure comment is not named anywhere.
  5. Spec delta: both deltas use ADDED on existing capabilities, which is right (no matching requirement exists in openspec/specs/roadmap-stage or roadmap-implement-job). But the new implement requirement overlaps the existing title requirement at openspec/specs/roadmap-implement-job/spec.md:334. Say in design that it adds to it and does not change it. The stage scenario "The label call fails" has three THEN clauses; one scenario for the comment and one for the branch and marks would be easier to assert.
  6. The PR is not a draft (draft: false). AGENTS.md rule 6 asks for drafts. Not verified whether the service bot is exempt.
  7. Low: ## Workflow follow-up holds only the Pending a person: ... tuicr bullet. openspec/config.yaml:39 allows it for a code change, so it is not a defect, but it adds nothing.

Title (54-char summary), Plans #2777, body and Existing Tool Considered (no new tool, about 10 lines) are acceptable. Task order is test first with a fail-on-base step in each behavior group. One PR is plausible once finding 3 is counted.

Related issues:

Verdict: hold until findings 1 to 4 are fixed in the plan (reuse the existing remove_label, source of the old labels, full file list for the store, label call after set_marks).


Generated by Claude Code

Check the premise against main 6923473 and rewrite the change folder. Add the
store write unlabel_issue, the labels field of the pull request read, the
store-taking pull_labels functions, the dry-run requests and the job documents.
Keep the stage label failure out of the branch and the record, and keep rejected
credentials as a stop. Read the held labels and the old title in one request.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PeiMDoPafqUWqpk1WxhaYW
@dan-petty
dan-petty merged commit 5ca957c into main Nov 2, 2026
20 checks passed
@dan-petty
dan-petty deleted the feat/2777-the-stage-and-implement-jobs-label branch November 2, 2026 19:18
dan-petty added a commit that referenced this pull request Nov 7, 2026
Staging a plan cannot see the registries and ratchet tests that a new
constant, setting, metric or job write needs, so the entries are missed
and the suite fails later (#3254). Evidence: the limit-class ratchet in
`tests/roadmap/test_roadmap_limit_classes.py` (#3174), the job-write
registries of #3169, and the `INSTRUMENTS` registry whose documented
test path is stale (#3173).

Closes #3254

Change:
`openspec/changes/archive/2026-11-07-3254-list-the-registry-and-ratchet-entries/`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants