Skip to content

fix(roadmap): a step may not lose a test that existed - #2807

Merged
dan-petty merged 9 commits into
mainfrom
fix/2804-step-keeps-existing-tests
Oct 31, 2026
Merged

dan-petty merged 9 commits into
mainfrom
fix/2804-step-keeps-existing-tests

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

A step of devops roadmap implement kept no check on the tests of a file. In #2801 the agent replaced a test file and deleted seven tests. All checks passed, because a deleted test cannot fail.

This change adds an exit check. For each test file that the step changed, every test that the file held at the start must still be in that file, by qualified name (test_x or Class.test_x). The standard library ast lists the names. When a test is lost, the step stops. The reason names the file and the tests. A rename, a deletion and a move to another file all count as a loss. A new file and a file that does not parse do not crash the check. The agent instructions, the help text and the roadmap-implement-step spec state the rule.

Closes #2804

@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Oct 30, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Test results (worktree, after rebase on origin/main):

  • Fail-to-pass: uv run devops ci fail-to-pass --base origin/main reports 10 failed on base (1 errored), 3 passed on base. Those 3 are the "adds a test", "syntax error at start" and "syntax error after run" cases, which must pass before and after.
  • Full uv run devops ci: all checks pass except audit (uv audit found 5 known vulnerabilities in the lockfile). This change touches no dependency, so the audit failure is not from it. The test check took 261 s (4m 21s).

Review findings:

  • Fixed: a byte order mark at the start of a test file made the check skip the file. defined_tests now removes it. Tests: a unit case and a step-level case.
  • Fixed (major): a move to a file that pytest does not collect (for example tests/conftest.py) excused the loss. The issue says every test stays in its file. The cross-file excuse is removed. A move now counts as a loss. This also removes the stub-excuse case. Tests: unit and step-level cases, including conftest.py.
  • Fixed: the archived design and tasks named test_names. They now name defined_tests, lost_tests and lost_since.
  • Fixed: known limits (body not checked, if False: hides a test) are now in the module docstring, the design and a spec scenario.
  • No fix needed: the attacks that the guard already catches.

@dan-petty
dan-petty marked this pull request as ready for review October 31, 2026 00:20
@dan-petty
dan-petty merged commit 7d104a5 into main Oct 31, 2026
19 checks passed
@dan-petty
dan-petty deleted the fix/2804-step-keeps-existing-tests branch October 31, 2026 00:21
dan-petty pushed a commit that referenced this pull request Oct 31, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.23.0](v0.22.7...v0.23.0)
(2026-10-31)


### Features

* **review:** confirm finding on human VERIFIED verdict
([#2813](#2813))
([26203af](26203af)),
closes [#2414](#2414)
* **roadmap:** intake runs in triage lane on devops-triage model
([#2816](#2816))
([35e6172](35e6172)),
closes [#1534](#1534)
* **roadmap:** link candidate from source as a sub-issue
([#2812](#2812))
([aee2c85](aee2c85)),
closes [#2035](#2035)
* **service:** each subscribed webhook event runs its scoped update
([#2811](#2811))
([0564c08](0564c08)),
closes [#1533](#1533)


### Bug Fixes

* **k8s:** bound the test workers and log the command of a step
([#2809](#2809))
([2314ef9](2314ef9)),
closes [#2806](#2806)
* **roadmap:** a step may not lose a test that existed
([#2807](#2807))
([7d104a5](7d104a5)),
closes [#2804](#2804)
* **security:** lock graphql-core at 3.3.1 and pyasn1 at 0.6.5
([#2814](#2814))
([8234a83](8234a83)),
closes [#2808](#2808)


### Code Refactoring

* **ai:** seams and fakes for Valkey, Qdrant and embedder
([#2815](#2815))
([1e03417](1e03417)),
closes [#1317](#1317)

---
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/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(roadmap): an implement step may not remove a test that existed before it

1 participant