# stop-gate.sh: Stop (run in a throwaway copy)

## Suite green, stop_hook_active=false
input : {"hook_event_name":"Stop","stop_hook_active":false,"last_assistant_message":"Done."}
stdout: (empty)
stderr: (empty)
exit  : 0

## Suite red (>= changed to >), stop_hook_active=false
input : {"hook_event_name":"Stop","stop_hook_active":false,"last_assistant_message":"Done."}
stdout: {"decision":"block","reason":"The test suite is red. Fix it before finishing:\n[ERROR] Failures: \n[ERROR]   OrderControllerTest.createThenFetch:27 JSON path \"$.total\" expected:<90.0> but was:<100.0>\n[ERROR]   OrderServiceTest.tenUnitsGetTenPercentOff:23 \nexpected: 90.00\n but was: 100.00\n[ERROR] Tests run: 9, Failures: 2, Errors: 0, Skipped: 0"}
stderr: (empty)
exit  : 0

## Suite still red, stop_hook_active=true (Claude was already pushed back once)
input : {"hook_event_name":"Stop","stop_hook_active":true,"last_assistant_message":"Done."}
stdout: (empty)
stderr: (empty)
exit  : 0

