Keep the bug.
Keep a useful reproduction, so the failure does not have to introduce itself twice.
A report gives you a symptom; a fixture gives you a repeatable input. Ask your AI coding assistant to help shrink the failing case while preserving the behavior that caused it. Store the result with the relevant test, not only in a conversation.
Preserve the trigger.
Record the input shape, the operation, and the unexpected result. Include ordering or repeated actions when they matter. Remove credentials and personal data while keeping the structural detail responsible for the failure.
Trigger: a second item has no optional label.
Expected: both items still render.
Observed: formatting the missing label throws.
Fixture: two synthetic items; only one has a label.Remove one thing at a time.
Trim unrelated fields, network dependencies, and setup steps. Rerun the reproduction after each meaningful reduction. If the failure disappears, restore the last relevant detail. Keep the smallest understandable case, not an unreadable puzzle that happens to fail.
Control the moving parts.
Pin the clock, random input, or ordering only when it affects this behavior, using the repository's established test helpers. Confirm the fixture fails on the old behavior and passes with the fix. Give it a name that explains the regression.
- Use synthetic data with the same relevant shape.
- Keep a nearby valid case for comparison.
- Explain any non-obvious fixture field in a short note.
Before moving on