Skip to content

Add "testing" review stage - #485

Closed
kees wants to merge 2 commits into
sashiko-dev:mainfrom
kees:stage/testing
Closed

Add "testing" review stage#485
kees wants to merge 2 commits into
sashiko-dev:mainfrom
kees:stage/testing

Conversation

@kees

@kees kees commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

This adds a missing review stage persona: "testing". There are a few interesting pieces here, and I'm not sure the right way to approach them:

  1. The style guides need to be included in the prompt verbatim, and asking the LLMs nicely to read the files didn't seem to work, so I explicitly inject their contents. This creates a dependency on the harness for the prompts if they get moved to the upstream prompts collection.

  2. I had to renumber everything. I think this is okay, but wow was it a lot of churn. Maybe the stages need to be refactored in some way to avoid the explicit numbering?

What do folks think about this approach? It worked well for a few series I tested it on.

kees added 2 commits September 5, 2026 03:28
Nothing in the prompt set asks whether a change is testable, or how to
review a test that a patch brings with it. selftests.md covered the
selftest build system; KUnit was absent entirely.

Add testing.md for the general case: when a missing test is worth raising
and when it is routine, and how to judge a test that is present. Add
kunit.md for the framework semantics that make a test silently wrong rather
than merely unidiomatic. Extend selftests.md with the result protocol and
the harness APIs.

Neither framework guide restates naming, Kconfig entries or file placement.
Documentation/dev-tools/kunit/style.rst and Documentation/dev-tools/
kselftest.rst carry those in the tree under review, where they cannot
drift, so the guides instead enumerate the questions those documents answer
and require each to be answered against them. Both phrase some rules as
recommendations, which the guides call out, since a review honouring only
the requirements skips file placement.

These belong upstream in the review-prompts project. Until they land there
this vendored snapshot has diverged, so REVISION carries a local suffix.
That suffix is load-bearing: the bundle installs to a directory named for
REVISION and short-circuits on a completion marker, so an existing install
would otherwise never see the new files.

Signed-off-by: Kees Cook <kees@kernel.org>
The analysis stages cover intent, implementation, control flow, resources,
locking, security and hardware. None asks whether a change is testable, or
reviews the tests a patch brings with it.

Add a test engineer persona to the parallel analysis fan-out. It runs for
every patch rather than being chosen by the planning stage, since a change
that should have had a test and does not is the case with nothing to match
on.

It goes in at 8, ahead of the consolidation stages, which renumber to 9
through 12. Nothing persists a stage number: the "stage" field attached to
a concern is read only by the deduplication prompt, to say which analyst
raised it. Inserting it there rather than appending keeps the numbering in
execution order.

The general testing guide loads for every patch; the framework guides load
when the patch text names that framework. All three are kept out of the
pre-screen's broadcast set, so they reach this stage alone.

The same triggers name the framework's in-tree style document, which is
read from the worktree and rendered into the prompt rather than left for
the stage to fetch: asked to fetch it, the stage answered without calling a
tool at all. A tree without the document contributes nothing.

The stage also receives the follow-up series context that verification
already gets, since where a test belongs in a series is only answerable
from the patches that come after it.

Signed-off-by: Kees Cook <kees@kernel.org>
@kees

kees commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

I've got a much better series coming. Closing this in favor of that one.

@kees kees closed this Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant