Repository navigation
Description
Problem Description
Plan Check can judge a delivery pull request as if it were a plan. The plan-check job of .github/workflows/pr-title.yml decides to run from the title in the event payload (startsWith(github.event.pull_request.title, 'docs(openspec): plan #')). The command devops roadmap plan-check then reads the live title and body. The implement job turns the plan draft into the delivery pull request with one edit of the title and body. A run that the event started before that edit reads the delivery form and fails.
Evidence: run 42259947563 (Plan Check, head 3bf7e41 of #3808, 2026-11-06 17:16) printed title: The title is not docs(openspec): plan #3808 <summary>. and body: The body needs the line Plans #3808, and it has none., and exited 1. The pull request was a delivery pull request (fix(review): ..., Closes #3536) at that time. The Service answered in #3808 with a change that made the command judge only pull requests with a plan title or a Plans # line. That change also let a plan pull request with a wrong title and no Plans # line pass, so a person removed it from the pull request.
Reproduction Steps
- The Service opens a plan draft.
Plan Checkstarts on the event. - The implement job edits the title and the body to the delivery form while the run is in progress or queued.
- The command reads the new title and fails.
Expected vs Actual Behavior
Expected: the job judges the pull request as the event described it, or it does not run once the pull request is no plan.
Actual: a red Plan Check on a delivery pull request, and a fix attempt that weakens the check.
Environment Diagnostics
devops-cli 0.70.0, GitHub Actions, 2026-11-06.
Proposed Solution & Architectural Design
- Give the workflow a
concurrencygroup for the pull request withcancel-in-progress: true, so the event of the edit cancels the run that read the plan form. The later event skips the job through itsif. - If the cancel is not enough, pass the title of the event to the command with a
--titleoption and judge that text. Do not add a content test that makes the command skip a pull request. - Add a workflow test that checks the group key and
cancel-in-progress.
Existing Tool Considered
GitHub Actions concurrency covers the need. No code of the command changes for option 1.
Proposed design
Problem statement
Plan Check can fail on a delivery pull request. A plan-check run starts from a plan title in the event payload. The implement job then edits the live title and body to the delivery form. The stale run reads them and fails.
Acceptance criteria
Requirement: Plan-check concurrency group
The plan-check job SHALL declare a concurrency group keyed to the pull request number and set cancel-in-progress to true.
Scenario: Workflow declares cancellation
- WHEN the workflow contract test reads
.github/workflows/pr-title.yml - THEN it finds the plan-check concurrency group with
github.event.pull_request.numberandcancel-in-progress: true.
Requirement: Event-title job condition
The plan-check job MUST decide to run only from the title in the event payload.
Scenario: Delivery event skips the job
- WHEN the event payload title is not
docs(openspec): plan #... - THEN the job condition is false and the job does not start.
Requirement: No content-test weakening
The plan-check command MUST NOT skip a pull request because its live title and body look like a delivery pull request.
Scenario: Malformed plan still fails
- WHEN a plan pull request has a wrong title and no
Plans #line - THEN the command reports the title and body problems and exits with a non-zero status.
Requirement: Workflow contract test
The workflow contract test SHALL fail when the plan-check concurrency group or cancel-in-progress is absent.
Scenario: Missing cancellation fails
- WHEN the test reads a workflow with the plan-check job and no concurrency cancellation
- THEN the test reports a failure.
Existing Tool Considered
No alternatives check has run. GitHub Actions concurrency with cancel-in-progress: true covers the need. It cancels the stale run when the same pull request gets the edit event. It lacks nothing for this fix, so no new command code is necessary.
Key questions
- How does Plan Check stop a stale run after the implement job edits the pull request?: Use a job-level concurrency group
${{ github.workflow }}-${{ github.event.pull_request.number }}withcancel-in-progress: true. Keep the job condition on the event payload title. Do not add a--titleoption or a content test. (best practice) [sources: .github/workflows/pr-title.yml]- Chosen: GitHub Actions concurrency. Native workflow feature. It needs no command change and cancels the run that read the plan form.
- Rejected: Pass the event title with
--title. Adds a command option and a second title source for a race that concurrency removes. - Rejected: Add a content test in the command. The attempted fix let a malformed plan pass. It weakens the check.
- Does the
plan-checkjob condition read the title from the event payload?: Yes. The condition usesstartsWith(github.event.pull_request.title, 'docs(openspec): plan #'). [sources: .github/workflows/pr-title.yml] - Which test file holds workflow contract checks?:
tests/invariants/test_workflow_contracts.pyholds workflow contract checks. [sources: tests/invariants/test_workflow_contracts.py] - Should
devops roadmap plan-checkaccept a--titleoption for this fix?: No. The concurrency group cancels the stale run, so the command needs no second title source. (best practice) [sources: .github/workflows/pr-title.yml]- Chosen: Keep the command unchanged. The event cancellation removes the race, and the command keeps one live source.
- Rejected: Add a
--titleoption. It adds a parameter for a race that concurrency handles and creates a second title source.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 6, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(ci)scope of the title gives the scope.A false CI failure blocks a delivery pull request but does not corrupt data.The failed run 42259947563 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.It removes a recurring false failure that delays delivery pull requests.The fix is a concurrency block in one workflow file and an optional flag.Both concern the Plan Check CI job, but #3103 adds the job and the candidate fixes a race in it.devops-cli-service commentedon Nov 7, 2026
Status set to Ready at 734e060 (see proposed design in issue body).
devops-cli-service commentedon Nov 14, 2026
Released in v0.138.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.138.0
devops-cli-service commentedon Nov 14, 2026
Live since 2026-11-14 15:02 UTC