Skip to main content

Bugfix

Reproduce first, then fix.

When to use

When you have a bug report and want to enforce the “reproduce first, fix second” discipline. The workflow ensures a regression test exists before the fix is implemented.

The workflow

How it works

The “reproduce” step writes a test that exposes the bug — the gate checks that code compiles and tests exist, but not that tests pass (the bug is still present). The “patch” step reuses the session (session: from: reproduce) and fixes the bug. The compile + test gate verifies all tests pass, including the reproduction test.

Typical metrics

The cheapest workflow. Average cost: 0.200.20–0.80. Duration: 30s–2 minutes.

Customize

Add untouched: "*_test.*" to the patch gate.
Add context: [bash: "git log --oneline -20"] to the analyze step.