The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
test: add regression tests for empty frontmatter field rejection
Affaan Mustafae5f1c58c11d2
diff --git a/tests/ci/validators.test.js b/tests/ci/validators.test.jsindex 444a7e18f..65592ab45 100644--- a/tests/ci/validators.test.js+++ b/tests/ci/validators.test.js@@ -217,6 +217,24 @@ function runTests() {assert.ok(result.stdout.includes('skipping'), 'Should say skipping');})) passed++; else failed++;+ if (test('rejects agent with empty model value', () => {+ const testDir = createTestDir();+ fs.writeFileSync(path.join(testDir, 'empty.md'), '---\nmodel:\ntools: Read, Write\n---\n# Empty model');+ const result = runValidatorWithDir('validate-agents', 'AGENTS_DIR', testDir);+ assert.strictEqual(result.code, 1, 'Should reject empty model');+ assert.ok(result.stderr.includes('model'), 'Should mention model field');+ cleanupTestDir(testDir);+ })) passed++; else failed++;++ if (test('rejects agent with empty tools value', () => {+ const testDir = createTestDir();+ fs.writeFileSync(path.join(testDir, 'empty.md'), '---\nmodel: claude-sonnet-4-5-20250929\ntools:\n---\n# Empty tools');+ const result = runValidatorWithDir('validate-agents', 'AGENTS_DIR', testDir);+ assert.strictEqual(result.code, 1, 'Should reject empty tools');+ assert.ok(result.stderr.includes('tools'), 'Should mention tools field');+ cleanupTestDir(testDir);+ })) passed++; else failed++;+// ==========================================// validate-hooks.js// ==========================================