OpenAgent requires text-based approval before executing write/edit tools. Updated tests to use multi-turn prompts: 1. First prompt: Request the task 2. Second prompt: 'Yes, proceed' to approve Also added TESTING_CONFIDENCE.md documenting current test reliability: - Opencoder: HIGH confidence (4/4 tests passing) - OpenAgent: MEDIUM confidence (multi-turn works, context loading needs verification)
56 lines
1.5 KiB
YAML
56 lines
1.5 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
|
|
model: anthropic/claude-sonnet-4-5
|
|
|
|
# Multi-turn: OpenAgent requires text approval before writing
|
|
prompts:
|
|
- text: |
|
|
Write a test for the add function in evals/test_tmp/math.ts.
|
|
Create the test file at evals/test_tmp/math.test.ts
|
|
expectContext: true
|
|
contextFile: ".opencode/context/core/standards/tests.md"
|
|
|
|
- text: |
|
|
Yes, proceed with the plan. Execute it now.
|
|
delayMs: 2000
|
|
|
|
# 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: 120000
|
|
|
|
tags:
|
|
- workflow-validation
|
|
- context-loading
|
|
- tests-task
|
|
- critical-rule
|
|
- v2-schema
|