Conversation
There was a problem hiding this comment.
Pull request overview
Adds explicit, agent-facing testing guidelines to ensure changes are validated with readable, requirement-led tests and to discourage flaky-test or “green-at-all-costs” practices.
Changes:
- Introduces a new Testing Approach (Required for Agents) section in
AGENTS.md. - Defines principles for readable tests, requirement-driven coverage, and red→green→refactor workflow.
- Sets guardrails for flaky tests and requires hermetic integration tests (isolated DB/env + cleanup).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - Feature tests should validate behavior users/business care about. | ||
| - Keep lower-level/unit tests for mechanics, but feature coverage must stay requirement-led. | ||
|
|
||
| 3. **Do not “game” tests.** |
There was a problem hiding this comment.
This line introduces a curly quote character (“ ”). The rest of AGENTS.md appears to use plain ASCII punctuation, so keeping straight quotes avoids encoding/grep/copy-paste issues in terminals and tooling.
| 3. **Do not “game” tests.** | |
| 3. **Do not "game" tests.** |
| - When tests fail, first verify whether requirements are correct and still desired. | ||
| - Never patch tests with hacks that hide real regressions. | ||
|
|
||
| 4. **Default to red → green → refactor.** |
There was a problem hiding this comment.
This heading uses a Unicode arrow (→). Consider using ASCII (e.g., "->" or words like "then") to keep the document consistent and avoid display issues in some environments.
| 4. **Default to red → green → refactor.** | |
| 4. **Default to red -> green -> refactor.** |
Summary\n- add a dedicated
Testing Approach (Required for Agents)section toAGENTS.md\n- codify principles for readable, requirement-led tests\n- add explicit guardrails against gaming tests and shipping flaky-test hacks\n- require hermetic integration tests (isolated DB/env + cleanup)\n- clarify placeholder-test policy on feature branches and before merge\n\n## Notes\n- docs-only change\n