OpenWriterControle/evals/framework/test-event-inspector.js
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

30 lines
975 B
JavaScript

import { TestRunner } from './dist/sdk/test-runner.js';
import { loadTestCase } from './dist/sdk/test-case-loader.js';
async function inspectTest() {
const testCase = await loadTestCase('../agents/openagent/tests/developer/ctx-code-001.yaml');
const runner = new TestRunner({
debug: true,
runEvaluators: false,
defaultModel: 'opencode/grok-code-fast',
});
await runner.start();
const result = await runner.runTest(testCase);
await runner.stop();
console.log('\n=== EVENT DETAILS ===');
console.log(`Total events: ${result.events.length}`);
result.events.forEach((event, idx) => {
console.log(`\n${idx + 1}. ${event.type}`);
console.log(` Properties:`, JSON.stringify(event.properties, null, 2));
});
console.log('\n=== TEST RESULT ===');
console.log(`Passed: ${result.passed}`);
console.log(`Approvals: ${result.approvalsGiven}`);
console.log(`Errors: ${result.errors.length}`);
}
inspectTest().catch(console.error);