Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ The `api/` module has the strongest stability guarantees — breaking changes ar

### Testing

**Write the test plan before the tests.** State in the PR description what behavior needs verifying and why each case matters — a few lines, not a document.

- Test the behavior in the plan. Coverage is not a target.
- Test the behavior this change adds or modifies. Don't assert the correctness of components this code merely calls.
- One behavior per test method. No omnibus tests asserting several unrelated things.
- Don't add a test whose failure would not indicate a user-visible regression.
- Don't add tests for unreachable states, or tests that only restate the implementation.
Comment on lines +142 to +146

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good set of instructions. I would add this.

  • Do not add excessive comments in tests when the intention is clear from the test method name.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this covered by #18167 in a more general way?

- Don't write a comment that restates the method name, the condition, or the next line.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then general one works. Thanks.

- Minimal test setup: `PartitionSpec.unpartitioned()` when partitioning isn't needed.
- Test classes and methods should be package private unless required by inheritance.
- Compute expected values, don't hardcode. Tests belong in the module that owns the code.
Expand Down
Loading