Files
computer-playbook/docs/contributing/actions/testing/regression.md
T
Environment TestandClaude Sonnet 4.6 83262816a3 docs(contributing): apply documentation.md rules across all staged files
- Move emojis after headline text (CONTRIBUTING.md, actions/, design/, tools/, tests/)
- Replace em dashes with colons, semicolons, or complete sentences throughout
- Add missing emojis to all headlines in exceptions.md, principles.md, services.md, shell.md, setup.md, pull-request.md, commit.md, act.md, docker.md, pr/README.md
- Update H1 titles to reflect renamed directories (actions/, design/)
- Fix broken relative links in workflow.md after directory moves
- Fix full-path link texts in services.md (style.css.md, javascript.js.md)
- Fix broken principles.md link to lint.md after testing/ → actions/testing/ move

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 21:06:17 +02:00

26 lines
1.3 KiB
Markdown

# Regression Guards 🛡️
This page is the SPOT for regression-guard rules in tests.
Use [Integration Tests](integration.md) as the SPOT for general integration-test requirements and structure.
## Rules 📏
- You MUST NOT add regression tests that only verify that code, YAML, Jinja, or other source text is still present.
- Tests that only assert that a file contains a string, task name, variable name, or template fragment are not allowed.
- If the only purpose of a test is to prevent removal of a specific code path, you SHOULD document that directly at the relevant code location with a short comment explaining why it must not be removed.
- Prefer behavior-based tests that verify the actual runtime effect of the protected code path.
## Preferred Approach ✅
Instead of adding a text-presence regression test:
1. Add a short comment at the sensitive code path.
2. Explain what would break if that code were removed.
3. Add or keep a behavior-level test only when the behavior can be verified meaningfully.
## Examples 💡
- Good: a test that verifies a bootstrap path creates the expected runtime artifact or unblocks a dependent service.
- Bad: a test that only checks whether a task still contains `migrate:fresh`.
- Bad: a test that only checks whether a template still contains a specific lookup expression.