Skip to content

fix(ci): replay a changed gate check in fail-to-pass - #4898

Merged
dan-petty merged 8 commits into
mainfrom
fix/4554-fail-to-pass-gate-checks
Nov 12, 2026
Merged

dan-petty merged 8 commits into
mainfrom
fix/4554-fail-to-pass-gate-checks

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

devops ci fail-to-pass listed only tests/**/test_.py files, so a manifest fix that a changed gate check proves always failed the replay, and its author wrote the k8s row runs by hand. The command now lists the changed check modules of tests/gate/_checks/, and runs the gate row of each on the base tree with the head tests and on the head tree. A case of a changed check module that fails on base and passes on head proves the fix, when both runs count the same cases. A row run that could not run, a change of the case count, or a base failure of a check module that the fix does not change refuses the replay. The dry run lists the gate row runs. The workflow also starts for a change under tests/gate/_checks/, and its comment, CONTRIBUTING.md and the command help name the gate replay.

Closes #4554

Change: openspec/changes/archive/2026-11-12-4554-fail-to-pass-skips-the-gate/

The tests describe the gate replay of #4554: a changed module of tests/gate/<row>_checks/ runs its row on the base and head trees, and a case that fails on base and passes on head proves the fix.
fail-to-pass listed only tests/**/test_*.py files, so a manifest fix that a changed k8s gate check proves always failed the replay. The command now lists the changed check modules of tests/gate/<row>_checks/, runs the row of each on the base tree with the head tests and on the head tree, and counts a case of a changed module that fails on base and passes on head as a proof. A row run that could not run, a change of the case count, or a base failure of a module that the fix does not change refuses the replay.
The workflow contract tests ask the path filter of fail-to-pass.yml to start for a module under tests/gate/*_checks/, and the comment of the workflow to name these modules.
The path filter of fail-to-pass.yml adds tests/gate/*_checks/**, so a manifest fix that a changed gate check proves gets the check. The comment no longer says that only a change under src/ can make a test fail on base.
CONTRIBUTING.md, the help of devops ci fail-to-pass, the generated command references and the Purpose of the ci-fail-to-pass spec name a changed module under tests/gate/*_checks/ as a proof that fails on base and passes on head.
The Feasibility section names the result of the gate replay of PR #4551 and of the same fix on this branch.
@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/ci GitHub Actions workflows, pre-commit hooks, CI gates, and runners labels Nov 12, 2026
@dan-petty

dan-petty commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner Author

Test record (head 9843fe1)

Local runs on the final code, after the rebase onto origin/main:

  • uv run devops ci test tests/ci/test_fail_to_pass.py: 56 passed.
  • uv run devops ci test tests/ci/test_fail_to_pass.py tests/invariants/test_workflow_contracts.py: 180 passed.
  • uv run devops ci test tests/commands/test_ci_gate_rows.py tests/commands/test_ci_dry_run.py tests/commands/test_ci.py tests/roadmap/implement/test_roadmap_implement_step_fail_to_pass.py tests/github/test_pr_evidence.py tests/commands/test_instruction_generator.py tests/invariants/test_skills.py tests/roadmap/test_roadmap_failure.py: 313 passed (before the rebase; the rebase changed none of these modules).
  • uv run mypy on the 5 changed source files: no issues.
  • uv run devops ci --check --only lint,format,docs,constructs,openspec,test-settings,test-tree,startup-imports,swallowed-failures,actionlint,zizmor: all rows pass.
  • uv run devops docs generate --check: all generated files are up to date.

Fail-to-pass: uv run devops ci fail-to-pass --base origin/main (exit 0)

  failed on base: tests.invariants.test_workflow_contracts::test_workflow_contract_fail_to_pass (AssertionError: assert (['opened', '...SE_REF'], ...) == (['ope
  failed on base: tests.invariants.test_workflow_contracts::test_the_fail_to_pass_comment_names_the_gate_checks (assert (False, True) == (True, False))
  failed on base: tests.invariants.test_workflow_contracts::test_fail_to_pass_starts_only_for_a_change_to_src_or_a_gate_check[tests/gate/tree_checks/fixture_nam
  failed on base: tests.invariants.test_workflow_contracts::test_fail_to_pass_starts_only_for_a_change_to_src_or_a_gate_check[tests/gate/k8s_checks/otel_collect
  failed on base: tests.ci.test_fail_to_pass::test_a_replay_that_could_not_run_keeps_the_last_whole_lines_within_the_bound[one-long-line] (AssertionError: asser
  failed on base: tests.ci.test_fail_to_pass::test_a_gate_row_that_could_not_run_on_base_refuses_the_fix[killed] (AssertionError: assert (False, '0 fa...on its 
  failed on base: tests.ci.test_fail_to_pass::test_a_replay_that_stopped_or_wrote_no_report_could_not_run[usage-error] (AssertionError: assert (False, {'mer...e
  failed on base: tests.ci.test_fail_to_pass::test_a_replay_that_could_not_run_keeps_the_last_whole_lines_within_the_bound[lines-filling-the-bound] (AssertionEr
  failed on base: tests.ci.test_fail_to_pass::test_fail_to_pass_dry_run_lists_the_replay_and_starts_nothing[False] (AttributeError: module 'devops_cli.ci.fail_t
  failed on base: tests.ci.test_fail_to_pass::test_fail_to_pass_materialises_base_and_overlays_head_tests (AttributeError: module 'devops_cli.ci.fail_to_pass' h
  failed on base: tests.ci.test_fail_to_pass::test_a_gate_replay_that_proves_nothing_refuses_the_fix[passes-on-both] (AssertionError: assert (False, 'The ...on 
  failed on base: tests.ci.test_fail_to_pass::test_the_check_directory_names_the_row_of_a_changed_module (AssertionError: assert [] == [('base', 'k8...ead', 'tr
  failed on base: tests.ci.test_fail_to_pass::test_a_gate_replay_that_proves_nothing_refuses_the_fix[case-count-changes] (AssertionError: assert (False, 'The ..
  failed on base: tests.ci.test_fail_to_pass::test_the_command_exits_0_for_a_gate_check_that_proves_the_fix (assert (1, False, True) == (0, True, False))
  failed on base: tests.ci.test_fail_to_pass::test_a_replay_that_stopped_or_wrote_no_report_could_not_run[internal-error-with-report] (AssertionError: assert (F
  failed on base: tests.ci.test_fail_to_pass::test_a_gate_check_that_fails_on_base_and_passes_on_head_proves_the_fix (AssertionError: assert (False, '0 fa...ts 
  failed on base: tests.ci.test_fail_to_pass::test_the_replay_reads_the_output_of_the_gate_runner (AttributeError: module 'devops_cli.ci.fail_to_pass' has no at
  failed on base: tests.ci.test_fail_to_pass::test_a_replay_that_stopped_or_wrote_no_report_could_not_run[interrupted] (AssertionError: assert (False, {'mer...:
  failed on base: tests.ci.test_fail_to_pass::test_a_gate_proof_satisfies_a_fix_whose_test_replay_refuses_nothing[test-passes-on-base] (assert False is True)
  failed on base: tests.ci.test_fail_to_pass::test_fail_to_pass_dry_run_and_no_changed_tests (assert (0, 1, False) == (0, 1, True))
  failed on base: tests.ci.test_fail_to_pass::test_a_replay_that_could_not_run_keeps_the_last_whole_lines_within_the_bound[whole-lines] (AssertionError: assert 
  failed on base: tests.ci.test_fail_to_pass::test_a_gate_row_that_could_not_run_on_base_refuses_the_fix[no-summary] (assert (False, '0 fa...on its base.') == (
  failed on base: tests.ci.test_fail_to_pass::test_fail_to_pass_dry_run_lists_the_replay_and_starts_nothing[True] (AttributeError: module 'devops_cli.ci.fail_to
  failed on base: tests.ci.test_fail_to_pass::test_a_named_head_runs_the_gate_row_in_a_worktree_of_that_head (StopIteration)
  failed on base: tests.ci.test_fail_to_pass::test_a_test_only_fix_starts_no_gate_row (AttributeError: 'FailToPassReport' object has no attribute 'gate_rows')
  failed on base: tests.ci.test_fail_to_pass::test_fail_to_pass_runs_the_processes_of_its_plan[gate-check] (IndexError: list index out of range)
  failed on base: tests.ci.test_fail_to_pass::test_a_gate_replay_that_proves_nothing_refuses_the_fix[fails-on-both] (AssertionError: assert (False, 'The ...on i
  failed on base: tests.ci.test_fail_to_pass::test_fail_to_pass_dry_run_of_a_head_lists_the_fallback_diff (AttributeError: module 'devops_cli.ci.fail_to_pass' h
  failed on base: tests.ci.test_fail_to_pass::test_a_replay_that_stopped_or_wrote_no_report_could_not_run[empty-report] (AssertionError: assert (False, {'mer...
  failed on base: tests.ci.test_fail_to_pass::test_a_replay_that_stopped_or_wrote_no_report_could_not_run[truncated-report] (AssertionError: assert (False, {'me
  failed on base: tests.ci.test_fail_to_pass::test_a_replay_that_stopped_or_wrote_no_report_could_not_run[killed-without-report] (AssertionError: assert (False,
  failed on base: tests.ci.test_fail_to_pass::test_a_gate_replay_that_proves_nothing_refuses_the_fix[unchanged-module-fails] (AssertionError: assert (False, 'Th
32 failed on base (32 failed and 148 passed in tests/ci/test_fail_to_pass.py, tests/invariants/test_workflow_contracts.py; 0 errored).

Real gate replay

Two local commits on top of this branch undo and do again the two file changes of PR #4551 (k8s/otel/values.yaml and tests/gate/k8s_checks/otel_collector.py). The replay ran the k8s row on both trees and exited 0:

  failed on base, passed on head: k8s otel_collector.check_the_trace_pipeline_deletes_gateway_key_data_before_tempo
k8s gate row: 1 of 107 cases failed on base, 0 of 107 on head (tests/gate/k8s_checks/otel_collector.py).

The replay of the merged pair (--base b835d3ca~1 --head b835d3ca) found the same case, but exited 1: deploy_stack.check_prometheus_operator_crds_install_before_every_service_monitor failed on both trees. Both runs import the devops_cli of today, and that check compares a table of the src/ of today with the old manifests. A pull request replays its own merge base and head, so its src/ and its manifests agree.

Notes

@dan-petty
dan-petty marked this pull request as ready for review November 12, 2026 02:44
@dan-petty
dan-petty merged commit 59bfc57 into main Nov 12, 2026
27 checks passed
@dan-petty
dan-petty deleted the fix/4554-fail-to-pass-gate-checks branch November 12, 2026 03:12
dan-petty pushed a commit that referenced this pull request Nov 12, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.115.0](v0.114.1...v0.115.0)
(2026-11-12)


### Features

* **design:** add the design tokens and their build
([#4811](#4811))
([db4b19a](db4b19a))
* **roadmap:** find symbol definitions with tree-sitter
([#4820](#4820))
([3b3fddc](3b3fddc))


### Bug Fixes

* **ai:** the gateway group that answered decides the local label
([#4907](#4907))
([0da637f](0da637f))
* **ci:** replay a changed gate check in fail-to-pass
([#4898](#4898))
([59bfc57](59bfc57))
* **config:** read each config file as YAML 1.2
([#4858](#4858))
([c3130a3](c3130a3))
* **roadmap:** loosen the caps that turn a stage refusal into a loss
([#4869](#4869))
([4492fc3](4492fc3))
* **roadmap:** refine reads a dependency named by title
([#4877](#4877))
([2829f9c](2829f9c))
* **roadmap:** refine sends a judge refusal to an agent round
([#4874](#4874))
([e4fc6a9](e4fc6a9))
* **tests:** refuse test writes under the real home
([#4857](#4857))
([0f6ac1b](0f6ac1b))
* **tests:** the plain-Python helper test keeps PYTHONPATH
([#4914](#4914))
([99c109d](99c109d))


### Performance Improvements

* **ci:** direct pytest runs wait for a gate slot
([#4901](#4901))
([e80db62](e80db62))
* **roadmap:** status lane reads the snapshot, skips idle stops
([#4887](#4887))
([f285cf8](f285cf8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/ci GitHub Actions workflows, pre-commit hooks, CI gates, and runners type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ci): fail-to-pass skips the gate checks of a manifest fix

1 participant