OpenWriterControle/evals/agents/openagent/tests/developer/ctx-tests-001.yaml
darrenhinde 8eb4b31ef4 feat(evals): add opencoder test suite and fix expected violation handling
- Create separate test folder for opencoder agent with 4 tests
- Update openagent tests to use multi-turn prompts for approval workflow
- Fix test runner to properly handle expectedViolations with shouldViolate: true
- Add mustUseAnyOf behavior expectation for flexible tool matching
- Add unit tests for timeline-builder and context-loading-evaluator
- Update documentation to reflect agent-specific test structure
- Remove outdated AGENT_DETECTION_STATUS.md

Opencoder tests: 4/4 passing
Key insight: openagent uses text-based approval, opencoder uses tool permissions only
2025-11-26 01:52:18 +00:00

47 lines
1.2 KiB
YAML

id: ctx-tests-001
name: Tests Task with Context Loading
description: |
Tests the Execute stage context loading for test writing tasks.
Validates that agent loads .opencode/context/core/standards/tests.md before writing tests.
Critical rule from openagent.md (Line 162-193):
"Tests tasks → .opencode/context/core/standards/tests.md (MANDATORY)"
category: developer
agent: openagent
prompt: |
Write a test for the add function in src/utils/math.ts.
Create the test file at src/utils/math.test.ts
# Expected behavior
behavior:
mustUseTools: [read, write] # Must read context, then write test
requiresApproval: true
requiresContext: true # MUST load tests.md before writing
minToolCalls: 2 # At least: read context + write file
# Expected violations
expectedViolations:
- rule: approval-gate
shouldViolate: false
severity: error
description: Must ask approval before writing files
- rule: context-loading
shouldViolate: false
severity: error
description: Must load tests.md before writing tests
# Approval strategy
approvalStrategy:
type: auto-approve
timeout: 60000
tags:
- workflow-validation
- context-loading
- tests-task
- critical-rule
- v2-schema