Skip to content

Add test-size guidelines and sharpen the simplifier - #112

Merged
diegoferigo merged 4 commits into
mainfrom
diegoferigo/test-signal-guidelines
Nov 12, 2026
Merged

diegoferigo merged 4 commits into
mainfrom
diegoferigo/test-signal-guidelines

Conversation

@diegoferigo

Copy link
Copy Markdown
Owner

What change is being made

Four changes to the agent guidelines, one commit each:

  • Add test-size principles to the Tests section of coding-style.md.
  • Add a Measure and size section to the simplifier-reviewer agent.
  • Request a Copilot review on a layer only when its own diff changed.
  • State in SKILL.md that a ready PR is never put back to draft.

Why this change is being made

Test suites written by agents kept growing, and cuts guided by test count shortened the count while lengthening the code. The simplifier also judged by eye and could trade reviewability for fewer lines. The review loop requested a fresh review after a rebase that changed no diff.

Tested

  • pixi run -q hooks: all hooks passed.
  • pixi run -q test: 389 passed.

The Tests section said what to test but not how much. Test suites kept
growing with cases that restate the code, and cuts guided only by test
count shortened the count while lengthening the code.

Add principles for tests that keep a suite small and high-signal: test
caller-relied behavior, table-driven families, one whole-structure
assertion, hand-written contract tests, dedicated tests for the risky
categories, and size measured in lines read.
The simplifier judged by eye and could trade reviewability for fewer
lines. Eyeballed cuts also removed elements with a unique effect.

Add a section that puts the reviewability of non-test code first,
asks to measure before judging, to keep the unique effect of an element,
to measure what a reader must read, to state the loss budget and to
leave concurrency, formats on disk and hand-written contracts alone.
The loop requested a fresh review whenever the head moved. A rebase of
an unchanged layer onto a changed lower layer moves its head without
changing its diff, so it asked for a review with nothing new to read.

Define a moved head as a change in the content of the PR's own diff
against its base, and request only on the layers whose diff changed.
A PR that is ready was marked ready by Diego. Putting it back to draft
while fixing review comments fights his action.

State the rule in SKILL.md, with the same single exception that
github-writing.md already has for an accidental flip.
@diegoferigo diegoferigo self-assigned this Nov 12, 2026
@diegoferigo
diegoferigo marked this pull request as ready for review November 12, 2026 10:48
@diegoferigo
diegoferigo merged commit 2acd305 into main Nov 12, 2026
4 checks passed
@diegoferigo
diegoferigo deleted the diegoferigo/test-signal-guidelines branch November 12, 2026 10:49
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