Skip to content

feat(roadmap): check each behavior group fails on base before the change - #3602

Merged
dan-petty merged 11 commits into
mainfrom
feat/3042-behavior-group-fail-to-pass-check
Nov 5, 2026
Merged

dan-petty merged 11 commits into
mainfrom
feat/3042-behavior-group-fail-to-pass-check

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

A behavior group adds behavior, so its new tests must fail before the change. The implement step now checks this.

For a behavior group, the step runs the test files of the group on the base commit of the group. The tests of the head are overlaid on the base. The step records the outcome of each test and the exit status of pytest, as a check event of the trace.

A group whose tests pass on the base is refused. A group whose tests stop with an error on the base is refused too. Such a refusal starts a repair round, in which the agent may change only test files.

A group that changes no test file is refused, with no repair round.

The PR comment shows the fail-to-pass result of each behavior group. A group of kind other records the masked, bounded output of its verify command in the step outcome and in the PR comment.

Closes #3042

Change: openspec/changes/archive/2026-11-05-3042-behavior-group-fail-to-pass-check/

The change folder plans the check that a behavior group's tests fail on
the base commit of the group, and pass after the change. It names the
trace event, the PR comment line and the recorded output of a group of
kind other. The proposal records the premise check and the open tool
that the check reuses.
The implement step replays the test files of a behavior group on the base
commit of the group, with the head's tests overlaid. A group is accepted
only when one of its tests fails in its call phase there. A test that
passes on the base, or that cannot be collected there, stops the step
with a message. One repair round may change only the test files. A group
that changes no test file stops with no repair round.

The replay reuses the base worktree and the JUnit run of
devops_cli.ci.fail_to_pass. The result is kept on the step outcome, and
the trace holds a check event for the run.

Tasks of group 1 are ticked.
The trace holds a check event for each replay of a behavior group on its
base commit. The PR comment of a step shows one line for each behavior
group with the result of the replay and the tests that failed on the base.

The tests of the replay now cover every change since the base commit, so
a test that a wip commit of the keeper folded is still found. A shared
support module holds the JUnit report and the tasks of a behavior group,
and the job support stages extra files on the branch.

Tasks of group 2 are ticked.
…3042)

The implement guide lists the replay of a behavior group on its base
commit among the exit checks. It states the repair round that a refused
replay gets, and the lines that the comment of the pull request holds.
The output of the verify commands of a group of kind other is kept in
the same comment.

Tasks of groups 3 and 4 are ticked. The output of a group of kind other
came with the exit checks of group 1, and its comment line with group 2.
A replay that could not run, a replay that collects no test, and a group
that says it is a behavior group now have tests. The PR comment maps each
result of a replay to its words with a lookup, and the step matches the
results without a catch-all, so mypy checks that every result is handled.
The change folder moves to the archive, and the spec of the implement step
takes the requirements of the check: a behavior group's tests fail on the
base commit, the trace holds the replay, the PR comment shows it, and a
group of kind other keeps the output of its verify commands.
The PR comment test checked one behavior group. Add a change whose two
groups are behavior groups, and check that each group has its own
fail-to-pass line. Also check that the output of a verify command of a
group of kind other is in the comment.
A test that stops with an error on base can fail in a setup or teardown
phase, as well as in collection. The message said that the tests cannot
be collected, which was wrong for those cases. It now says that they stop
with an error before an assertion runs. The PR comment and the docs use
the same wording.
…#3042)"

This reverts commit 5a8d47b8855b3a2e7d123e5bf078605bc88de76a.
The repair round of a refused behavior group is the shared budget
roadmap.implement.repair_rounds. A base error is an error before an
assertion, not only a collection error. A PR comment line is shown for
each behavior group the step replayed, also when the group then stops.
@dan-petty dan-petty added type/feature Type feature: a new function scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 5, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Finish notes for #3042

Local CI result

Command: uv run devops ci, on branch feat/3042-behavior-group-fail-to-pass-check at b8fdc611, after the rebase onto origin/main at d254410c.

  • Result: 18648 tests passed, 2 skipped, 4 failed, 1 error. The pytest job took 6 min 43 s.
  • The 4 failures and the 1 error are the known host failures of fix(ci): host state fails four tests and one case #3585. They are these tests:
    • tests/crypto/test_ssh.py::test_get_ssh_key_prefix_resolution
    • tests/telemetry/test_config_env_overrides.py::test_find_project_config_path_skips_directory
    • tests/commands/test_devcontainer_install_tools_dry_run.py::test_mark_only_commands_under_global_dry_run
    • tests/ai/test_tool_executor_contract.py::test_the_direct_executor_refuses_a_network_profile_before_it_starts_the_tool[direct] (the failure, and the error of the same case)
  • These failures depend on host state. They were not re-run on a clean origin/main in this session.
  • Coverage: 94.51% total. The required value is 85.0%.
  • All other checks pass: format, lint, typecheck, audit, security, actionlint, zizmor, docs, uv check, lockfile, build, outdated, deps, and the others in the summary.
  • Timing: the pytest job is over the 5 minute budget. The open issue fix(ci): the pytest step of devops ci exceeds the 5-minute budget #3593 covers this.

Fail-to-pass result

  • devops ci fail-to-pass did not run. The gate runs only for a fix title, and this title is a feat.
  • The change adds its own check. Ten test cases in tests/roadmap/test_roadmap_implement_step_fail_to_pass.py cover each refusal, the trace event, the PR comment line and the output of a group of kind other.
  • A narrowed run of tests/roadmap, tests/ci, tests/invariants and tests/openspec after the rebase gave 4695 passed and 1 skipped.

Deviations

  • None from the change plan. The archive is the last commit. Earlier history holds a revert of the first archive and a corrected plan.

Open items

  • The change lists one open step for a person: review the diff in tuicr (tuicr -r origin/main..HEAD). The pull request stays a draft until that review ends.
  • The GitHub checks are still running at the time of this comment.

@dan-petty
dan-petty marked this pull request as ready for review November 5, 2026 12:08
@dan-petty
dan-petty merged commit 7b8a4a1 into main Nov 5, 2026
23 checks passed
@dan-petty
dan-petty deleted the feat/3042-behavior-group-fail-to-pass-check branch November 5, 2026 12:08
dan-petty pushed a commit that referenced this pull request Nov 5, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.61.0](v0.60.0...v0.61.0)
(2026-11-05)


### Features

* **roadmap:** check each behavior group fails on base before the change
([#3602](#3602))
([7b8a4a1](7b8a4a1))
* **roadmap:** the inbox lists every person wait of each service repo
([#3616](#3616))
([b81913b](b81913b))
* **telemetry:** measure how long roadmap items wait in each state
([#3601](#3601))
([05c9ebd](05c9ebd))


### Bug Fixes

* **github:** send a GET again when its connection is lost
([#3608](#3608))
([4528f49](4528f49))
* **roadmap:** accept a clean merge by a person on a branch
([#3603](#3603))
([4fff490](4fff490))
* **roadmap:** the stage job waits for an open plan that creates a path
([#3613](#3613))
([7e66373](7e66373))

---
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/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(roadmap): behavior groups run fail-to-pass and record the result

1 participant