diff --git a/kipina-codebench/benchmark.mjs b/kipina-codebench/benchmark.mjs index f17069f..f37108d 100644 --- a/kipina-codebench/benchmark.mjs +++ b/kipina-codebench/benchmark.mjs @@ -409,6 +409,14 @@ 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'])) { + 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 let fixRound = 0; if (LANG === 'rust') {