diff --git a/kipina-codebench/benchmark.mjs b/kipina-codebench/benchmark.mjs index dd5342f..29d6ef1 100644 --- a/kipina-codebench/benchmark.mjs +++ b/kipina-codebench/benchmark.mjs @@ -447,16 +447,16 @@ async function runPipeline(model, scenario, round = 1) { files = parseGeneratedFiles(codeResp.text); } - const missing = LCONF.required.filter(f => !files[f]); - if (missing.length > 0) { result.error = `Puuttuvat: ${missing.join(', ')}`; return result; } - - // Go: korvaa/generoi go.mod golden examplen versiolla + // Go: generoi go.mod golden examplen versiolla (ennen missing-tarkistusta) if (LANG === 'go') { const goldenMod = readFileSync(join(GOLDEN_DIR, 'todo-go', 'go.mod'), 'utf-8'); const modName = (files['go.mod']?.match(/^module\s+(\S+)/m)?.[1]) || spec.project_name?.replace(/[^a-z0-9-]/gi, '-') || 'generated-api'; files['go.mod'] = goldenMod.replace(/^module\s+\S+/m, `module ${modName}`); } + const missing = LCONF.required.filter(f => !files[f]); + if (missing.length > 0) { result.error = `Puuttuvat: ${missing.join(', ')}`; return result; } + // 4. Validointi + korjaussilmukka let fixRound = 0; if (LANG === 'rust') {