Repository navigation
Description
Problem
In .github/workflows/pr-title.yml, the job plan-check has:
plan-check:
name: Plan Check
needs: semantic-title
if: "${{ always() && github.event.pull_request.user.login == 'devops-cli-service[bot]' && startsWith(github.event.pull_request.title, 'docs(openspec): plan #') }}"In GitHub Actions, the expression always() evaluates to true immediately, bypassing the completion wait of needs: semantic-title. GitHub Actions starts plan-check concurrently with semantic-title.
When plan-check runs devops roadmap plan-check, _check_problems checks the check runs of the pull request for Semantic PR title. Because semantic-title is still running, Semantic PR title has status in_progress, causing plan-check to fail with:
checks: semantic-pr-title: The check Semantic PR title has the state in_progress, and it needs success.
Expected
plan-check waits for semantic-title to complete before executing. The condition uses !cancelled() and checks the result of needs.semantic-title instead of unconditional always().
Acceptance criteria
- The
plan-checkjob does not start whilesemantic-titleis still running. - When
semantic-titlefails,plan-checkstill runs and reports the failure. - When
semantic-titlesucceeds,plan-checkreadsSemantic PR titleassuccesswithout race conditions.
Existing tool considered
Standard GitHub Actions workflow expressions (!cancelled()).
Related
Proposed design
Problem statement
The plan-check job fails on some plan pull requests of the Service with checks: semantic-pr-title: The check Semantic PR title has the state in_progress, and it needs success. The command reads the Semantic PR title check run before that check completes. The change makes the job run only after semantic-title, and makes the command wait a bounded time for the title check to reach a terminal state.
Acceptance criteria
Requirement: Plan check job condition
The plan-check job SHALL keep needs: semantic-title and SHALL use !cancelled() in its if condition in place of always().
Scenario: Workflow condition holds no always()
- WHEN A test parses
.github/workflows/pr-title.yml. - THEN The test asserts that
plan-checklistssemantic-titleinneeds, that itsifholds!cancelled(), and that itsifholds noalways().
Requirement: Failed title check is reported
The plan-check command SHALL report a Semantic PR title check with the state failure as a problem.
Scenario: Failed title check
- WHEN The check summary holds
semantic-pr-titlewith the statefailure. - THEN
_check_problemsreturns a problem that namessemantic-pr-titleand its state.
Requirement: Wait for a pending title check
The plan-check command SHALL poll the Semantic PR title check until its state is terminal or the wait limit elapses.
Scenario: Pending check becomes success
- WHEN The first read gives
in_progressand the next read givessuccess. - THEN The command makes no problem for
semantic-pr-titleand exits with status 0.
Requirement: Pending check at the wait limit
The command SHALL report a check that is still pending at the wait limit as a note and SHALL NOT fail on it.
Scenario: Pending check stays pending
- WHEN Every read within the wait limit gives
in_progress. - THEN The output holds a note for
semantic-pr-titleand_check_problemsreturns no problem for it.
Requirement: Successful title check
The command SHALL report no problem for Semantic PR title when its state is success.
Scenario: Successful title check
- WHEN The check summary holds
semantic-pr-titlewith the statesuccess. - THEN
_check_problemsreturns no problem that namessemantic-pr-title.
Existing Tool Considered
No alternatives check has run. GitHub Actions status functions (!cancelled(), the needs context) and the existing src/devops_cli/github/check_verdict.py module cover the need, so the change adds no library and no dependency. GitHub Actions lacks a primitive that waits for a named check run, so the command needs a short poll of its own.
Key questions
- Where does the plan-check command read the state of the
Semantic PR titlecheck?:src/devops_cli/roadmap/plan_check.py:226builds the problems from aCheckVerdictSummary._check_problemsat line 230 turns a state that is not success into a problem.src/devops_cli/github/check_verdict.pyholds the states,in_progressincluded. [sources: src/devops_cli/roadmap/plan_check.py:226, src/devops_cli/roadmap/plan_check.py:230, src/devops_cli/github/check_verdict.py] - How does the command avoid a false failure on a pending
Semantic PR titlecheck?: The command polls theSemantic PR titlecheck until its state is terminal. The wait limit is 120 s and the poll interval is 5 s. A check that is still pending at the limit gives a note and no problem. (best practice) [sources: src/devops_cli/roadmap/plan_check.py:226, src/devops_cli/github/check_verdict.py, .github/workflows/pr-title.yml]- Rejected: Change the job condition only.
needsalready makes the job wait, andalways()only lets the job run after a failed needed job. The condition cannot stop a read of a title check that another workflow run holds in progress. - Chosen: Bounded wait in the command. It removes the false failure whatever the cause, and it keeps the report of a failed title check.
- Rejected: Job concurrency with cancel-in-progress. It cancels the run that holds the required
Semantic PR titlecheck, and a cancelled required check can block the merge (ADR 0014).
- Rejected: Change the job condition only.
- Which status function does the
plan-checkjob condition use?: The condition uses!cancelled(). It runs the job after a failedsemantic-titlejob and skips the job in a cancelled workflow run. (best practice) [sources: .github/workflows/pr-title.yml]- Rejected: always(). It runs the job in a cancelled workflow run, and the issue reports it as the cause of the race.
- Chosen: !cancelled(). It runs the job after a failed needed job and skips the job in a cancelled run.
- Rejected: success(). It skips the job when the title check fails, so the job never reports the failure.
- What does the command do when the title check is still pending at the wait limit?: It prints a note for the check and reports no problem.
plan-checkis advisory, and the requiredSemantic PR titlecheck gates the merge on its own. (best practice) [sources: .github/workflows/pr-title.yml, docs/adr/0004-ci-is-the-authoritative-gate.md]- Rejected: Fail at the wait limit. The false failure returns whenever a title check is slow.
- Chosen: Note and pass. The check is advisory, and the required
Semantic PR titlecheck gates the merge on its own.
- Which wait limit and poll interval does the command use?: The command uses a wait limit of 120 s and a poll interval of 5 s. The job has
timeout-minutes: 10. (best practice) [sources: .github/workflows/pr-title.yml]- Chosen: 120 s with a 5 s interval. It is under the 10-minute job timeout and longer than a title check takes on a cold runner.
- Rejected: 30 s with a 5 s interval. A queued runner can take longer than 30 s to start the other title check.
- Rejected: 600 s with a 5 s interval. It is close to the job timeout and leaves no time for the rest of the command.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-09: partly.
Tool: lewagon/wait-on-check-action (https://github.com/lewagon/wait-on-check-action), MIT, last activity 2026-08-09, maintained.
Activity
dan-petty commentedon Nov 7, 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.The race causes false CI failures on every plan pull request, but the check still runs and no data is lost.Developers see incorrect failures on every plan pull request, which wastes review time and erodes trust in CI.The fix replaces one expression in the workflow file and adjusts the condition to read needs.semantic-title.Both fix the plan-check job in pr-title.yml, but #3829 fixes stale title data while this fixes the job starting before semantic-title completes.devops-cli-service commentedon Nov 8, 2026
Status set to Ready at 1f03ee3 (see proposed design in issue body).
devops-cli-service commentedon Nov 9, 2026
Alternatives check: partly
Reason: The main fix is a one-line change to the workflow condition, from
always()to!cancelled(). Built-in GitHub Actions expressions already cover it, and no tool is needed. The optional poll for a pendingSemantic PR titlecheck is partly covered by lewagon/wait-on-check-action, which is maintained and MIT-licensed. It is a workflow step, so it cannot replace the polling inside the Pythonplan-checkcommand. The "note and pass at the limit" behaviour is also something it does not offer.Tool: lewagon/wait-on-check-action (https://github.com/lewagon/wait-on-check-action)
Covers:
Lacks:
!cancelled()job condition, which is plain workflow syntaxdevops roadmap plan-checkcommandTools considered:
Searches run:
Sources:
Checked on 2026-11-09. A person decides what this means for the item. The check changes no label and closes no issue.
docs(openspec): plan #3975 wait for the title check
fix(ci): wait for the semantic title check before the plan check (#3975)
docs(openspec): archive #3975 wait for the title check
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