Skip to content

Commit abb0f0b

Browse files
authored
docs(agents): clarify regression-focused tests (#1290)
1 parent 93fdb1e commit abb0f0b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,12 @@ bunx prek install -t pre-push
271271

272272
If any check fails, the push is blocked until the issues are fixed.
273273

274+
**Docs-only exception:**
275+
For changes that only touch documentation, comments, or repository instructions and cannot affect runtime behavior, push with `--no-verify` to skip the full pre-push suite:
276+
```bash
277+
git push --no-verify
278+
```
279+
274280
**Manual run (without pushing):**
275281
```bash
276282
bunx prek run --all-files --hook-stage pre-push
@@ -337,9 +343,11 @@ This does not apply to lightweight LLM-only targets (azure, openai, gemini, open
337343
Tests should be lean and focused on what matters. Follow these principles:
338344

339345
- **Only test new or changed behavior.** Don't write tests for existing behavior that's already covered by the 1600+ core tests. If you fix a bug, test the fix and its edge cases — not the surrounding module.
346+
- **Protect stable core contracts, not every new detail.** Tests should primarily prevent regressions in existing core behavior: data formats, scoring semantics, routing, persistence, provider contracts, and CLI/API outcomes users depend on. Experimental features, early UI flows, and behavior expected to churn do not need detailed test matrices until the contract stabilizes.
340347
- **One test per distinct behavior.** Don't write separate tests for trivially different inputs that exercise the same code path.
341348
- **No tests for obvious code.** If a function returns `undefined` for missing input and that's a one-line null check, you don't need a test for it unless it's a regression risk.
342349
- **Regression tests > comprehensive tests.** A test that would have caught the bug is worth more than five tests that exercise happy paths.
350+
- **Document churny end-user behavior instead of over-testing it.** When behavior matters to users but changes frequently, prefer updating the Astro docs in `apps/web/src/content/docs/` over locking presentation details, migration variants, or temporary workflows into brittle tests.
343351
- **Tests are executable contracts.** When a module's behavioral contract changes, the tests must reflect the new contract — not just the happy path. If you change what a function promises, update its tests to assert the new promise.
344352

345353
### Verifying Grader Changes

0 commit comments

Comments
 (0)