From 25b7c7b05b5fa38a42fcbf3d6dcff3cf1de7a068 Mon Sep 17 00:00:00 2001 From: haosenwang1018 Date: Sun, 12 Apr 2026 04:51:56 +0000 Subject: [PATCH] fix: enforce strict schema for debug workflow tester --- .../base-templates/debug-workflow.json | 1 + tests/template-resolver.test.js | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/cluster-templates/base-templates/debug-workflow.json b/cluster-templates/base-templates/debug-workflow.json index 7925fb51..4f02e636 100644 --- a/cluster-templates/base-templates/debug-workflow.json +++ b/cluster-templates/base-templates/debug-workflow.json @@ -232,6 +232,7 @@ "modelLevel": "{{tester_level}}", "timeout": "{{timeout}}", "outputFormat": "json", + "strictSchema": true, "jsonSchema": { "type": "object", "properties": { diff --git a/tests/template-resolver.test.js b/tests/template-resolver.test.js index 85df7891..7812fc47 100644 --- a/tests/template-resolver.test.js +++ b/tests/template-resolver.test.js @@ -109,6 +109,23 @@ describe('TemplateResolver', function () { }); describe('resolve', function () { + it('should keep strictSchema enabled for the debug-workflow tester', function () { + const resolved = resolver.resolve('debug-workflow', { + task_type: 'DEBUG', + complexity: 'SIMPLE', + max_tokens: 100000, + max_iterations: DEFAULT_MAX_ITERATIONS, + investigator_level: 'level2', + fixer_level: 'level2', + tester_level: 'level2', + }); + + const tester = resolved.agents.find((agent) => agent.id === 'tester'); + assert.ok(tester, 'tester agent should exist'); + assert.strictEqual(tester.outputFormat, 'json'); + assert.strictEqual(tester.strictSchema, true); + }); + it('should resolve single-worker template', function () { const resolved = resolver.resolve('single-worker', { task_type: 'TASK',