11-wrong-context-file-negative.yaml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. id: neg-wrong-context-001
  2. name: Wrong Context File Loaded (Negative Test)
  3. description: |
  4. NEGATIVE TEST: Validates that loading the WRONG context file is detected.
  5. This test asks for a CODE task but expects the agent to load code.md.
  6. If the agent loads docs.md instead, it should be flagged as a violation.
  7. The evaluator should:
  8. 1. Classify the task as 'code' (based on "Create a function")
  9. 2. Expect code.md to be loaded
  10. 3. Detect if wrong context file (docs.md, tests.md, etc.) is loaded
  11. 4. Flag as violation if wrong context file is used
  12. category: edge-case
  13. agent: openagent
  14. prompts:
  15. - text: |
  16. Create a TypeScript function called 'multiply' that takes two numbers and returns their product.
  17. Save it to evals/test_tmp/multiply.ts
  18. IMPORTANT: This is a CODE task - you should load the code.md context file.
  19. - text: |
  20. Yes, proceed with the plan.
  21. delayMs: 3000
  22. behavior:
  23. mustUseTools: [read, write]
  24. requiresContext: true
  25. minToolCalls: 2
  26. expectedViolations:
  27. - rule: context-loading
  28. shouldViolate: false # Should NOT violate if correct context loaded
  29. severity: error
  30. description: Must load code.md for code tasks, not docs.md or tests.md
  31. - rule: execution-balance
  32. shouldViolate: false
  33. severity: warning
  34. description: Should read context before writing code
  35. approvalStrategy:
  36. type: auto-approve
  37. timeout: 120000
  38. tags:
  39. - context-loading
  40. - context-file-mapping
  41. - code-task
  42. - critical