Skip to content

red-check-skips-deleted-test-files/1: The red check and the push gate give the runner only files the tests commit leaves in place - #984

Merged
bwmatson merged 4 commits into
mainfrom
spec/red-check-skips-deleted-test-files/1
Nov 17, 2026
Merged

bwmatson merged 4 commits into
mainfrom
spec/red-check-skips-deleted-test-files/1

Conversation

@bwmatson

Copy link
Copy Markdown
Owner

Start here

Already verified by the pipeline

  • Tests were committed first and seen to fail first.
  • unit-test result: passed
  • Review took 2 review rounds

Review tier: light — the planned estimate is light

Why

The unit di-repo-tidy/1 failed its red check three times with "nothing failed at the tests commit". Its tests commit deleted tests/integration/test_date_order_test_finds_scripts.py and added tests/extraction/test_date_order_finds_scripts.py. The red check lists the files of the tests commit with git show --name-only, which names a deleted file as well as an added one. Both runs of the red command (the one narrowed to the changed tests and the retry with the files whole) named the deleted path.

… The full reason is in openspec/changes/red-check-skips-deleted-test-files/proposal.md.

What this pull request does

The red check and the push gate no longer give the test runner a test file that the tests commit deleted, or the old path of a renamed one.

  • The red command for a tests commit lists only test files that still exist at that commit. Deleted files and the old paths of renames are dropped before the runner sees them, so a red run cannot fail just because a file is missing.
  • This filter sits inside the one function that builds the red command, so the red check and the push gate's red line apply it the same way, together with the existing filter for files the runner can run.
  • In a project below the root (a workspace member or a node project in a sub-folder), files are checked against the commit under the project's path, and the runner still gets them relative to the project.
  • The listing uses NUL-separated git ls-tree output, so unusual path characters are compared exactly.
  • Tests cover deletion and rename for a python project at the root and a node project in a sub-folder, through both the red check and the push gate. The changelog and the toolchain-profiles doc describe the new behaviour.

Based on main, with nothing unmerged beneath it — ready to merge whenever the checks look right.

Unit red-check-skips-deleted-test-files/1 of change red-check-skips-deleted-test-files, task group(s) 1.
Spec: openspec/changes/red-check-skips-deleted-test-files/ in the planning repo.

Assumptions

This unit assumes nothing unmerged: everything it builds on is already in main.

Verification

This is a unit-test unit: everything it needs is fakes, fixtures or throwaway containers, so GitHub Actions runs the whole of it. No e2e-test run was required.

Left for later

Approved, with these recorded rather than blocking:

  • _files_of in pipeline/gate.py still lists files with git ls-tree without -z, so a path with an unusual character is quoted there while _left_in_place reads it raw. The builder left it alone because it predates this change and affects commit classification. It could be aligned in a later unit.

How this was built

Tests were committed first and seen to fail before any implementation existed; the commit order is checked mechanically; lint, formatting and types pass at the tip.


Opened by the spec-driven pipeline. The build agent never merges. The pipeline merges only
a unit review classified auto and policy allowed; a person merges any other, after checking
the stack order above.

…tests commit leaves in place

The tests come first and fail until the implementation.

The unit `di-repo-tidy/1` failed its red check three times with "nothing failed at the tests commit".

Unit: red-check-skips-deleted-test-files/1
…tests commit leaves in place

With this in, the tests of the previous commit pass.

The unit `di-repo-tidy/1` failed its red check three times with "nothing failed at the tests commit".

Unit: red-check-skips-deleted-test-files/1
…ests commit leaves in place (checks, round 1)

Unit: red-check-skips-deleted-test-files/1
…ests commit leaves in place (review round 1)

Unit: red-check-skips-deleted-test-files/1
@bwmatson bwmatson added change-red-check-skips-deleted-test-files The change this pull request belongs to checking In review, but its checks are still running review-light Review asks for a light look from a person in-review Built and waiting for human review and removed checking In review, but its checks are still running labels Nov 17, 2026
@bwmatson
bwmatson merged commit 18e4119 into main Nov 17, 2026
5 checks passed
@bwmatson bwmatson added settling Merged; waiting for its checks to complete and removed in-review Built and waiting for human review settling Merged; waiting for its checks to complete labels Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change-red-check-skips-deleted-test-files The change this pull request belongs to review-light Review asks for a light look from a person

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant