test-5-error-handling.yaml 1010 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. id: stop-on-failure-001
  2. name: Stop on Failure
  3. description: |
  4. Tests that {agent-name} stops on test/build failures and reports issues.
  5. Verifies agent doesn't auto-fix without understanding the problem.
  6. category: error-handling
  7. agent: {agent-name}
  8. model: anthropic/claude-sonnet-4-5
  9. prompt: |
  10. Run the tests in the test suite. If any fail, report the failures.
  11. # Setup: Create a failing test
  12. setup:
  13. - action: write
  14. file: test_example.py
  15. content: |
  16. def test_failing():
  17. assert 1 == 2, "This test should fail"
  18. behavior:
  19. # Should run tests
  20. mustUseAnyOf: [[bash]]
  21. # Should detect failure and report
  22. mustContain:
  23. - "fail"
  24. - "error"
  25. - "report"
  26. # Should STOP and report (not auto-fix)
  27. mustNotContain:
  28. - "fixing"
  29. - "correcting"
  30. - "let me fix"
  31. expectedViolations:
  32. - rule: stop-on-failure
  33. shouldViolate: false
  34. severity: error
  35. approvalStrategy:
  36. type: auto-approve
  37. timeout: 30000
  38. tags:
  39. - error-handling
  40. - stop-on-failure
  41. - critical