Repository navigation
Description
Problem
When a repository holds each template file, row 9 opens no template pull request, and row 10 takes the check runs of the head of the newest template pull request, merged included (src/devops_cli/github/onboard/template_pr.py, module docstring and ctx.reported_checks = checks.passed). A merged template pull request is history: its check names come from the workflows of that time. After a later change of the workflows, _with_required_checks (settings_rows.py) adds a name that no workflow reports any more, and each new pull request of the repository waits on it forever.
Evidence
2026-11-27, devops repos onboard dan-petty/devtools --confirm (devops-cli at main, template v0.25.3):
- Row 9
present: the newest template pull request is ci: add the files of the repository template devtools#99, merged 2026-11-26, head54ba00a. On it the old title workflow of devtools reportedSemantic PR titlewithsuccess. - chore: re-adopt the infra repository template at v0.25.3 devtools#115 (merged 2026-11-27 18:10) re-adopted the template: the title check is now
PR title / Semantic PR title(reusable workflow of infra). chore(ci): core dependency ecosystem alignment and lockfile synchronization #115 reports only that name. - Row 10
applied: the rulesetmainnow requiresSemantic PR titleandPR title / Semantic PR title. No workflow reportsSemantic PR title, so each new pull request of devtools is blocked until a person removes the check.
Expected
Row 10 reads check runs only from a template pull request that is open (the one that row 9 opened or that still waits). Once a template pull request merged, the first confirmed run already wrote its checks into the live ruleset, so a later run keeps the live checks and the checks of github/repository.yaml and adds no name from history.
Done when
- A test: a repository that holds each template file, a merged template pull request whose head reported
successfor a check name that the live ruleset does not require, and--confirm: row 10 adds no such name. The test fails onmain. - A run of the open template pull request (row 9 opens one) still gives its checks to row 10 (D3).
Source
Source: dan-petty/devtools#99
Proposed design
Problem statement
Row 10 reads check names from the newest template pull request, merged included. A merged pull request can name a check that no workflow reports after a workflow change. The ruleset then requires that stale name and blocks each new pull request. The fix reads template checks only from an open template pull request. When none is open, row 10 keeps the live ruleset checks and the checks of github/repository.yaml.
Acceptance criteria
Requirement: Row 9 reads only an open template pull request
The template row SHALL read check runs only from an open template pull request.
Scenario: Merged template pull request only
- WHEN The repository holds every template file, no template pull request is open, and a merged template pull request head reported success for a check name.
- THEN The template row returns PRESENT and leaves the successful and skipped check names empty.
Requirement: Row 10 keeps live and repository checks
Row 10 MUST keep the live ruleset checks and the checks of github/repository.yaml when no template pull request is open.
Scenario: No open template pull request
- WHEN The live ruleset requires ci / test, github/repository.yaml requires docs / build, and a merged template pull request head reported success for Semantic PR title.
- THEN Row 10 requires exactly ci / test and docs / build and does not include Semantic PR title.
Requirement: Row 10 uses an open template pull request
Row 10 MUST keep the check names of an open template pull request.
Scenario: Open template pull request
- WHEN The repository holds every template file, an open template pull request head reported success for PR title / Semantic PR title, and no other template pull request is open.
- THEN Row 10 requires PR title / Semantic PR title.
Requirement: Regression test fails on main
The change MUST add a regression test that fails on main and passes after the fix.
Scenario: Regression test on main
- WHEN The new test in tests/commands/test_repos_onboard.py runs on main before the fix.
- THEN The test fails because row 10 adds Semantic PR title from the merged template pull request.
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers this need. The change corrects the existing onboard logic in src/devops_cli/github/onboard/template_pr.py. The written cost to build and keep this fix is about 2,000 tokens and under 30 minutes.
Key questions
- What does the no-missing branch of template_row do now?: It calls _last_template_pull, reads the head checks of the newest template pull request whatever its state, and sets ctx.successful_checks and ctx.skipped_checks from that head. [sources: src/devops_cli/github/onboard/template_pr.py]
- Which template pull request gives check runs to row 10?: Only an open template pull request. When no template pull request is open, row 10 keeps the live ruleset checks and the checks of github/repository.yaml and adds no name from history. (best practice) [sources: src/devops_cli/github/onboard/template_pr.py, src/devops_cli/github/onboard/settings_rows.py:688, src/devops_cli/github/onboard/settings_rows.py:763]
- Chosen: Open template pull request only. It keeps the evidence of a pull request that still waits and drops history that a later workflow change can invalidate.
- Rejected: Newest template pull request, merged included. It adds a check name from history and blocks each new pull request, which is the defect.
- Rejected: No template pull request checks. It breaks D3: an open template pull request must still give its checks to row 10.
- Where does the code change go?: In src/devops_cli/github/onboard/template_pr.py, template_row. In the no-missing branch, call _open_pull instead of _last_template_pull. Read checks only when an open pull request exists. Remove _last_template_pull when no other caller uses it. (best practice) [sources: src/devops_cli/github/onboard/template_pr.py, src/devops_cli/github/onboard/settings_rows.py:763]
- Chosen: Change template_row. It is the single place that fills the check names from a template pull request before row 10.
- Rejected: Change _with_required_checks. It cannot tell an open template pull request from a merged one, so it cannot remove the stale source.
- Rejected: Filter in row 10. It keeps the stale names in the context and hides the cause.
- How do we prove the fix?: Add a regression test in tests/commands/test_repos_onboard.py first. The test fails on main and passes after the change. It covers a merged template pull request and an open template pull request. (best practice) [sources: AGENTS.md, tests/commands/test_repos_onboard.py]
- Chosen: Regression test first. AGENTS.md rule 4 requires a test for new behavior, and the issue names a test that fails on main.
- Rejected: Manual check only. It does not prove the defect and does not fail on main.
- Which checks does row 10 start from?: Row 10 starts from the live ruleset checks and the checks of github/repository.yaml. _with_required_checks adds the check names that the template row reports. [sources: src/devops_cli/github/onboard/settings_rows.py:688, src/devops_cli/github/onboard/settings_rows.py:763]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 27, 2026
New pull requests are blocked until a person manually removes the stale check name, requiring repeated manual intervention.Both fix _with_required_checks in settings_rows.py producing a stale check name, but #7318 fixes skipped-as-passed logic while this fixes reading checks from a merged (historical) PR.devops-cli-service commentedon Nov 27, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
fix(repos): onboard requires checks of a merged template pull request
devops-cli-service commentedon Nov 27, 2026
Released in v0.229.5: https://github.com/dan-petty/devops-cli/releases/tag/v0.229.5
devops-cli-service commentedon Nov 28, 2026
Live since 2026-11-28 02:40 UTC