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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. approvalStrategy:
  32. type: auto-approve
  33. timeout: 120000
  34. tags:
  35. - context-loading
  36. - context-file-mapping
  37. - code-task
  38. - critical