From 178bef127740d444a2153f883efd2d1682f7308c Mon Sep 17 00:00:00 2001 From: jaakko Date: Tue, 14 Apr 2026 23:14:07 +0300 Subject: [PATCH] =?UTF-8?q?CodeBench:=20korvaa=20go.mod=20aina=20golden=20?= =?UTF-8?q?versiolla=20=E2=80=94=20pienet=20mallit=20tuottavat=20v=C3=A4?= =?UTF-8?q?=C3=A4ri=C3=A4=20moduulipolkuja?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kipina-codebench/benchmark.mjs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kipina-codebench/benchmark.mjs b/kipina-codebench/benchmark.mjs index a68c491..5731c56 100644 --- a/kipina-codebench/benchmark.mjs +++ b/kipina-codebench/benchmark.mjs @@ -411,12 +411,11 @@ async function runPipeline(model, scenario, round = 1) { const missing = LCONF.required.filter(f => !files[f]); if (missing.length > 0) { result.error = `Puuttuvat: ${missing.join(', ')}`; return result; } - // Go: korjaa go.mod jos malli tuottaa viallisen (puuttuvat versiot) - if (LANG === 'go' && files['go.mod'] && !/v\d+\.\d+/.test(files['go.mod'])) { + // Go: korvaa go.mod aina golden examplen versiolla (pienet mallit eivät tuota luotettavaa go.modia) + if (LANG === 'go' && files['go.mod']) { const goldenMod = readFileSync(join(GOLDEN_DIR, 'todo-go', 'go.mod'), 'utf-8'); const modName = files['go.mod'].match(/^module\s+(\S+)/m)?.[1] || 'generated-api'; files['go.mod'] = goldenMod.replace(/^module\s+\S+/m, `module ${modName}`); - console.log(` [3/5] ⚠ go.mod korjattu (puuttuvat versiot)`); } // 4. Validointi + korjaussilmukka