Skip to content

Commit 42caa29

Browse files
committed
Enforce hard stop when bug is already fixed on main
Subagent was ignoring the "stop and report back" instruction and still creating regression tests + PRs for bugs that no longer reproduce. - Harness: clarify definition of "not reproducible", replace soft "stop and report back" with explicit HARD STOP + forbidden actions - Skill: add CRITICAL instruction in subagent dispatch prompt so it sees the constraint before even reading the harness Signed-off-by: Heng Qian <qianheng@amazon.com>
1 parent 45bbb51 commit 42caa29

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

.claude/commands/ppl-bugfix.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ Agent(
7373
prompt: "Read .claude/harness/ppl-bugfix-harness.md and follow it to fix GitHub issue #<issue_number>.
7474
Follow Phase 0 through Phase 3 in order.
7575
Phase 0.3 defines TDD execution flow. Do NOT skip any phase.
76-
Post the Decision Log (Phase 3.4) before completing."
76+
CRITICAL: If Phase 0.1 determines the bug is already fixed on main, HARD STOP.
77+
Do NOT write tests, do NOT create a PR — just comment/close the issue and report back.
78+
If the bug IS reproducible, post the Decision Log (Phase 3.4) before completing."
7779
)
7880
```
7981

.claude/harness/ppl-bugfix-harness.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ Read the issue title, description, and any reproduction steps before proceeding.
1919
./gradlew :integ-test:integTest -Dtests.class="*<TestClass>" -Dtests.method="<testMethod>"
2020
```
2121

22-
**If not reproducible on latest `main`**:
22+
**If the bug does not reproduce on latest `main`** — meaning the test scenario runs but produces correct results instead of the reported error — the bug is already fixed. This is distinct from "can't set up the scenario" (which is an infra issue).
2323

2424
| Finding | Action |
2525
|---------|--------|
26-
| Already fixed by another commit | Comment with fixing commit hash, close as duplicate |
27-
| Only on older version | Comment with version where it's fixed, close as resolved |
26+
| Already fixed by another commit | `gh issue comment` with fixing commit/PR, then `gh issue close` |
27+
| Only on older version | `gh issue comment` with version where it's fixed, then `gh issue close` |
2828
| Intermittent / environment-specific | Label `flaky` or `needs-info`, do NOT close |
2929
| Insufficient info to reproduce | Comment asking for repro steps, label `needs-info` |
3030

31-
In all cases, **stop and report back** — do not proceed to Phase 1.
31+
**HARD STOP**: Do NOT proceed to Phase 1, 2, or 3. Do NOT write tests. Do NOT create a PR. Report back with the finding and the action taken (comment/close). Your job is done.
3232

3333
### 0.2 Classify and Route
3434

0 commit comments

Comments
 (0)