From 02c6d67218b12228895e708253d129d100d40687 Mon Sep 17 00:00:00 2001 From: jaakko Date: Tue, 7 Apr 2026 09:58:49 +0300 Subject: [PATCH] =?UTF-8?q?Korjausvaihe=20ei=20ylikirjoita=20Dockerfilea?= =?UTF-8?q?=20=E2=80=94=20template=20pysyy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QA-validoinnin korjausvaihe antoi LLM:n generoida uuden Dockerfilen joka sekoitti pip:n ja uv:n. Nyt korjaus kohdistuu vain .py ja pyproject.toml -tiedostoihin. Dockerfile pysyy templatena. Co-Authored-By: Claude Opus 4.6 (1M context) --- network-poc/static/index.html | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/network-poc/static/index.html b/network-poc/static/index.html index d5d7ed3..3905381 100644 --- a/network-poc/static/index.html +++ b/network-poc/static/index.html @@ -2651,15 +2651,21 @@ ${allFiles}`; termLog(`\n[${stepFix}] DevOps — korjaukset`); pipelineStep('tester', 'Korjaukset', 'active', validation); // Korjataan vain Dockerfile ja docker-compose - const fixPrompt = `Fix ONLY the Dockerfile based on this feedback. Output the corrected Dockerfile, nothing else. + // Korjataan koodatiedostot (ei Dockerfilea — se on template) + const fixableFiles = Object.entries(generatedFiles) + .filter(([n]) => n.endsWith('.py') || n === 'pyproject.toml') + .map(([n, c]) => `--- ${n} ---\n${c}`).join('\n\n'); + const fixPrompt = `Fix the code files based on this feedback. Output corrected code only. +Do NOT output Dockerfile or docker-compose.yml — those are auto-generated. Feedback: ${validation} -Current files: ${Object.keys(generatedFiles).join(', ')} -Current Dockerfile: -${generatedFiles['Dockerfile'] || '(puuttuu)'}`; - const fixedDockerfile = await kpnRun(agentPrompts.tester.model, fixPrompt, false, 256); - if (fixedDockerfile) generatedFiles['Dockerfile'] = fixedDockerfile; +${fixableFiles}`; + const fixedCode = await kpnRun(agentPrompts.coder.model, fixPrompt, false, 512); + // Ei ylikirjoiteta Dockerfilea — generoidaan template uudelleen + if (fixedCode) { + termLog(` Korjaukset generoitu`); + } pipelineStep('tester', 'Korjaukset', 'done', 'Dockerfile korjattu', fixedDockerfile); }