Repository navigation
Description
Friction
The fail-to-pass check runs on every pull request. It carries an escape: a line in the PR body, Fail-to-pass: not applicable: <reason>. The rule of the owner (2026-10-20) is: a check that does not apply is not run there. The workflow scopes the trigger. The project builds no escape to make the check pass.
Evidence
src/devops_cli/ci/fail_to_pass.pyhas 401 lines, includingextract_escape_reason.tests/test_fail_to_pass.pyhas 711 lines..github/workflows/fail-to-pass.ymlhas 92 lines. Itsself-checkjob needs two historical commit hashes and exact output text (test_workflow_contract_fail_to_pass,test_workflow_contracts.py:426).- AGENTS.md:100 and CONTRIBUTING.md:11 say all work is test-first. That cannot hold for a deletion or a documentation change. The recent commits at HEAD are deletions.
mutmut==3.8.0is already a dev dependency for the mutation side of test quality.
Proposed remedy
- Trigger the workflow only for titles that start with
fix. - Delete the escape parser and the convention of the body line.
- Replace the self-check that needs two hashes with a test over a
tmp_pathgit repository. - Apply pair A23 and O01. Write the pasted text in ASD-STE100 Simplified Technical English.
What it deletes
- About 150 lines of
fail_to_pass.pyand about 250 lines of its tests. The pull request measures the exact numbers.
Tests
- The existing replay tests keep running.
- A new test checks that the workflow condition matches
fix(scope):titles and no other title.
Dependencies
- docs(agents): a convention yields to an open tool, and instructions with no check or with a contradiction are pruned
- docs(agents): agents and devops ai write in ASD-STE100 Simplified Technical English
Acceptance criteria
- On a
docs:orrefactor:pull request the check does not run. - On a
fix:pull request the result is the same as before. - No code reads a PR body syntax.
uv run devops cipasses.
Size: M.
Rescope notes from the 2026-10-22 survey
A survey of this issue ran on release tip 3ef69850. The remedy is not built. The premise is still true. The workflow ran on every pull request into release/** (.github/workflows/fail-to-pass.yml:3-8). Since #1952, it runs on every pull request into main. The escape parser and the --body option still exist.
The survey found two wrong claims, one gap and one conflict. This section adds to the text above and changes nothing in it. The decisions are at the end.
Wrong criterion: the escape is the only way out for three recent fix pull requests
The last four fix pull requests merged into release/v0.2.39 are #1896, #1897, #1900 and #1901. Three of them passed the check only through the escape line.
| Pull request | Files it changes | How the check passed |
|---|---|---|
#1896 fix(tests) |
tests/test_kb_manuals_metadata.py, tests/test_ui_reactive.py, a task file, a fragment |
The job log prints Fail-to-pass: not applicable: the change removes wall-clock assertions.... |
#1897 fix(test) |
tests/test_process.py, a task file, a fragment |
The job log prints the escape line. |
#1900 fix(deps) |
pyproject.toml, uv.lock, three files under src/devops_cli/ai/knowledge_base/, a task file, a fragment |
The job log prints the escape line. It changes no test file. |
#1901 fix(devcontainer) |
workflows, actions, tests/test_ci.py and four more test files |
No escape line. The replay reports 18 tests that fail on base. |
Without the escape, these three pull requests fail. The body of #1896 says that both changed tests pass on base. The body of #1897 says that its tests pass on a quiet host. A defect with no failing test is not satisfied (src/devops_cli/ci/fail_to_pass.py:146). #1900 changes no test, so its report has no outcome (fail_to_pass.py:334-341). That report is also not satisfied.
So the acceptance criterion "On a fix: pull request the result is the same as before" is false. The proposed remedy leaves these pull requests with no way to pass. Dependency-only and test-only fixes need a scope, not an escape.
Evidence method: devops gh api repos/dan-petty/devops-cli/pulls/<n>/files for the files, and devops gh runs view <run> --log --job <job> for the job logs.
Proposed change: scope by path with the native workflow filter
Add paths: under on.pull_request in .github/workflows/fail-to-pass.yml. This needs no new tool. The GitHub documentation says that the filter reads the changed files of the pull request. A ! pattern after a positive match excludes the path. The filter needs at least one pattern without !.
Add a job-level if: for the title. The proposed expression is startsWith(github.event.pull_request.title, 'fix(') || startsWith(github.event.pull_request.title, 'fix:') || startsWith(github.event.pull_request.title, 'fix!'). GitHub ignores case in startsWith, as _DEFECT_TITLE_RE does (re.IGNORECASE). Keep the edited trigger, so a new title evaluates the condition again. The expression also accepts a few titles that CONST_DEFECT_TITLE_PATTERN rejects, such as fix(x. The test compares the expression with that pattern (src/devops_cli/config/constants.py:3871).
The three path choices give these results on the four pull requests:
Choice of paths: |
#1896 | #1897 | #1900 | #1901 |
|---|---|---|---|---|
A: src/** |
skipped | skipped | runs and fails (knowledge-base files are under src/) |
runs and passes |
B: src/** and !src/devops_cli/ai/knowledge_base/** |
skipped | skipped | skipped | runs and passes |
C: src/**/*.py |
skipped | skipped | skipped | skipped |
Choice C also skips #1901, whose 18 failing tests are real proof. Choice A still blocks #1900.
Two facts about skipped checks, both from the GitHub documentation:
- A job that a condition skips reports Success. It does not block a merge.
- A workflow that a path filter skips creates no check run. A required check of that workflow stays Pending and blocks the merge.
ADR 0012 lists the required checks: Static Analysis, Tests & Coverage and Semantic PR title. Fail-to-Pass Check is not in the list. So the workflow-level filter is safe. If the owner ever requires Fail-to-Pass Check, the path scope must move into a job-level condition.
ADR 0011 item 10 names dorny/paths-filter for the changed-path block of fail-to-pass.yml. That block is the step "Detect Fail-to-Pass Implementation Changes" in the self-check job (fail-to-pass.yml:61-78). This item deletes the job, so the tool is not needed for this workflow.
Gap: a replay that could not run on base (#1669)
Today the report tells the author to use the escape. The text is in src/devops_cli/lang/en/messages.py:1235-1238. The escape also wins over a replay that could not run (fail_to_pass.py:324-332, tests/test_fail_to_pass.py:685).
Without the escape, a pull request whose replay cannot run has no way to pass. The case is real. Issue #1721 reports a replay that failed with an ImportError after #1312 changed the test harness. That was a release pull request into main. The check finds nothing to do on a release pull request, because its title is not a fix title. A fix that changes src/** and the test harness together would hit it again. The report text must then say what the author does instead.
Wrong numbers: the size of the deletions
The issue says about 150 lines of fail_to_pass.py and about 250 lines of tests. The numbers on the tip are smaller.
src/devops_cli/ci/fail_to_pass.pyhas 401 lines. The escape needs about 25 of them. They are the import (line 31),_ESCAPE_RE(47) andextract_escape_reason(51-54). They also include theescape_reasonfield (120), the branch insatisfied(142-143) and thebodyparameter (320). The last parts are the early return (324-332), the branch in the report (370-371) and two docstring lines (9, 140).tests/test_fail_to_pass.pyhas 711 lines. The escape needs about 60 of them. They are the test at lines 248-273, the test at lines 685-711, one assertion (385), one import (17) and one report key (170).- The title and label classification is optional extra deletion, about 50 lines with the CLI options and help strings. It is
parse_pr_labels,_parse_json_labels,_is_enforced_defectandis_defect. - The workflow loses the
self-checkjob (fail-to-pass.yml:49-92) and thePR_BODYline (44).
The pull request measures the exact numbers, as the issue says.
More places that teach the escape
The issue names none of these. All line numbers are on tip 3ef69850.
AGENTS.md:106: the sentence "Such a PR declaresFail-to-pass: not applicable: <reason>in its body". The sentence before it needs a new wording after question 3.src/devops_cli/ai/instruction_generator.py:382: the same sentence, in the generated instruction text.src/devops_cli/lang/en/messages.py:1222(fail_to_pass_not_applicable),:1228-1230(fail_to_pass_no_tests) and:1235-1238(fail_to_pass_could_not_run).src/devops_cli/lang/en/help.py:690-691(fail_to_pass_body) andsrc/devops_cli/config/constants.py:2462-2464(CONST_FAIL_TO_PASS_ESCAPE_PATTERN).docs/commands/ci.md:351anddocs/CLI_REFERENCE.md:2887. Both are generated. Regenerate them withdevops docs generate --sync-readme.tests/__snapshots__/test_fail_to_pass.ambr: ten snapshot entries (lines 5-70) hold the could-not-run text with the escape.tests/test_workflow_contracts.py:426: the contract test asserts the self-check, the two hashes andPR_BODY.docs/agent/tasks/task-844-fail-to-pass.md:9-10anddocs/agent/tasks/task-1669-ci-runner-never-stalls.md:28and:30. They describe the escape and the self-check.docs/agent/tasks/task-1825-kb-metadata-test-asserts-no-wall-clock-time.md:32anddocs/agent/tasks/task-1888-process-group-timeout-waits-for-the-child.md:34repeat the phrase. They record what those two pull requests did. A person decides whether to edit them.CHANGELOG.md:162and:188describe released history. A topic pull request does not edit them.
Conflict with ADR 0011 step 5 (#1861)
#1861 is closed. It moved fail-to-pass.yml to main, so this conflict is gone.
Proposed acceptance criteria
These criteria follow the decisions below.
- On a
docs:,refactor:orfeat:pull request the check does not run. - On a
fix:pull request that changes none of the chosen paths, the check does not run. - On a
fix:pull request that changes a chosen path, the replay runs as before. At least one changed test fails on base. No body line changes the result. - No code reads a PR body syntax.
git grep -n "PR_BODY\|extract_escape_reason" -- src tests .githubfinds nothing. - A test shows that the workflow condition matches
fix(scope):titles and no other title. uv run devops cipasses.
Decisions (owner, 2026-10-22: follow best practices)
- Which paths scope the check? Choice A, B or C in the table above. Decided: B. It skips fix(tests): two tests no longer assert elapsed wall-clock time #1896, fix(test): the process-group timeout test starts its timeout after the child exists #1897 and fix(deps): opentelemetry 1.45.1 and gitpython 3.2.1 clear two advisories that fail every devops ci audit #1900, and it keeps the replay on fix(devcontainer): the published image applies the devcontainer features again, so remoteUser vscode exists #1901.
- Does the check classify a pull request by title only, or by title and by the labels
type/bugandtype/security? Todayis_defect_pruses both. Decided: title only. The five recent fix pull requests (fix(roadmap): refine --dry-run makes no request and no model call (#1867) #1875, fix(tests): two tests no longer assert elapsed wall-clock time #1896, fix(test): the process-group timeout test starts its timeout after the child exists #1897, fix(deps): opentelemetry 1.45.1 and gitpython 3.2.1 clear two advisories that fail every devops ci audit #1900, fix(devcontainer): the published image applies the devcontainer features again, so remoteUser vscode exists #1901) carry no label. Then thelabeledtype,PR_LABELS,--labelsandparse_pr_labelsgo. - What happens when a replay cannot run on base? Option (a): the check fails. The report tells the author to land the harness or dependency change first, in a separate pull request that is not a fix. Option (b): the check passes with a warning. Option (c): a new escape, which the owner rule of 2026-10-20 forbids. Decided: (a).
- Does this pull request also delete the title, label and
is_defectclassification offail_to_pass.py? Decided: yes. The workflow owns the scope, so that code becomes a dead second copy. The local command then always enforces the replay, as it does today when no title is given (fail_to_pass.py:304-310). - Does one test over a
tmp_pathgit repository replace the self-check? The existing replay tests fake the pytest child. A real nested pytest run is new CPU cost for the 5-minute gate budget. Decided: yes, one test. The pull request records its run time in the task file. - What is the order with feat(release): release-please opens the release pull request, topic pull requests target main, and its merge publishes #1861? Decided: ci(fail-to-pass): the check runs only for fix pull requests and the body-line escape is deleted #1879 first, because it is small and independent. feat(release): release-please opens the release pull request, topic pull requests target main, and its merge publishes #1861 merged first, so no order remains.
- Which release carries ci(fail-to-pass): the check runs only for fix pull requests and the body-line escape is deleted #1879? The issue has no milestone today. A person plans its milestone on the board. The first release that release-please makes after the merge carries it.
Proposed design
Problem statement
The fail-to-pass CI check runs on every pull request into main and carries a body-line escape that the owner's rule of 2026-10-20 forbids. The check must be scoped to fix-titled pull requests that change relevant source paths. The escape parser, the label classification, and the self-check job that depends on two historical commit hashes must be deleted. The replay that cannot run on base must fail the check and tell the author to land the harness change first.
Acceptance criteria
- Criterion 1: On a docs:, refactor: or feat: pull request the check does not run.
Verification: Open a pull request with a title starting with docs:, refactor: or feat: and confirm the Fail-to-Pass Check job does not appear in the run. - Criterion 2: On a fix: pull request that changes none of the chosen paths, the check does not run.
Verification: Open a fix: pull request that changes only files outside src/** or inside src/devops_cli/ai/knowledge_base/** and confirm the check is skipped. - Criterion 3: On a fix: pull request that changes a chosen path, the replay runs and at least one changed test fails on base. No body line changes the result.
Verification: Open a fix: pull request that changes a file under src/** (not knowledge_base) and a test file. Confirm the replay runs, reports the failing test, and exits 0. Add the escape line to the body and confirm the result is unchanged. - Criterion 4: No code reads a PR body syntax.
Verification: Run git grep -n "PR_BODY|extract_escape_reason" -- src tests .github and confirm it returns no lines. - Criterion 5: A test shows that the workflow condition matches fix(scope): titles and no other title.
Verification: Run the new test and confirm it passes. The test compares the workflow if expression against CONST_DEFECT_TITLE_PATTERN. - Criterion 6: uv run devops ci passes.
Verification: Run uv run devops ci and confirm exit code 0.
Key questions
- Which paths scope the check?: Choice B: src/** and !src/devops_cli/ai/knowledge_base/**. It skips PRs fix(tests): two tests no longer assert elapsed wall-clock time #1896, fix(test): the process-group timeout test starts its timeout after the child exists #1897 and fix(deps): opentelemetry 1.45.1 and gitpython 3.2.1 clear two advisories that fail every devops ci audit #1900, and it keeps the replay on fix(devcontainer): the published image applies the devcontainer features again, so remoteUser vscode exists #1901. (proposed)
- Does the check classify a pull request by title only, or by title and labels?: Title only. The five recent fix pull requests carry no label. The labeled type, PR_LABELS, --labels and parse_pr_labels are deleted. (proposed)
- What happens when a replay cannot run on base?: Option (a): the check fails. The report tells the author to land the harness or dependency change first in a separate pull request that is not a fix. (proposed)
- Does this pull request also delete the title, label and is_defect classification of fail_to_pass.py?: Yes. The workflow owns the scope, so that code becomes a dead second copy. The local command always enforces the replay. (proposed)
- Does one test over a tmp_path git repository replace the self-check?: Yes, one test. The pull request records its run time in the task file. (proposed)
- What is the order with feat(release): release-please opens the release pull request, topic pull requests target main, and its merge publishes #1861?: ci(fail-to-pass): the check runs only for fix pull requests and the body-line escape is deleted #1879 first because it is small and independent. feat(release): release-please opens the release pull request, topic pull requests target main, and its merge publishes #1861 merged first, so no order remains. (proposed)
- Which release carries ci(fail-to-pass): the check runs only for fix pull requests and the body-line escape is deleted #1879?: The first release that release-please makes after the merge carries it. (proposed)
- Is Fail-to-Pass Check a required check in the repository ruleset?: No. ADR 0012 lists Static Analysis, Tests & Coverage and Semantic PR title as required. Fail-to-Pass Check is not in the list, so the workflow-level path filter is safe. [sources: docs/adr/0004-ci-is-the-authoritative-gate.md]
- What does the workflow trigger on today?: It triggers on opened, synchronize, reopened, edited and labeled events for pull requests into main. [sources: .github/workflows/fail-to-pass.yml:3-8]
- Where is the escape parser in the code?: The import is at line 31, _ESCAPE_RE at line 47, and extract_escape_reason at lines 51-54 of fail_to_pass.py. The escape_reason field is at line 120, the branch in satisfied at lines 142-143, and the body parameter at line 320. [sources: src/devops_cli/ci/fail_to_pass.py:31, src/devops_cli/ci/fail_to_pass.py:47, src/devops_cli/ci/fail_to_pass.py:51-54]
- What does the self-check job do?: It detects changes to watched paths, then replays commit 5768cd9 against 36b2bee and asserts the output contains 16 failed and 24 passed in tests/test_ai_fixer.py. [sources: .github/workflows/fail-to-pass.yml:49-92]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsReady
- StatusShow more project fieldsNew
Activity
dan-petty commentedon Oct 22, 2026
Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.
The candidate is about CI configuration and workflow changes, which maps to type/infra.The change affects CI behavior and workflow triggers, which is important but not critical.Improves CI efficiency and reduces noise for non-fix pull requests.Involves modifying workflow triggers, removing code, and updating tests.dan-petty commentedon Oct 28, 2026
Status set to Ready at 4da1e34 (see proposed design in issue body).