From 01364b70318d498723e777e24b6220459508b5b7 Mon Sep 17 00:00:00 2001 From: jaakko Date: Tue, 14 Apr 2026 19:27:19 +0300 Subject: [PATCH] =?UTF-8?q?CodeBench:=20korjaa=20Go-pipeline=20=E2=80=94?= =?UTF-8?q?=20tiedostoparseri=20+=20go=20mod=20tidy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - parseGeneratedFiles regex: lisätty .go ja .mod päätteet - Markdown fence strippaus: lisätty go/gomod - Dockerfile.go-test: go mod tidy ennen testejä (go.sum generoidaan) - Testattu: 6/6 golden example ilman go.sum --- kipina-codebench/Dockerfile.go-test | 2 +- kipina-codebench/benchmark.mjs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kipina-codebench/Dockerfile.go-test b/kipina-codebench/Dockerfile.go-test index e0a00a5..e402339 100644 --- a/kipina-codebench/Dockerfile.go-test +++ b/kipina-codebench/Dockerfile.go-test @@ -1,4 +1,4 @@ FROM golang:1.23-alpine RUN apk add --no-cache gcc musl-dev WORKDIR /work -ENTRYPOINT ["sh", "-c", "cp -r /src/* . && go test -v -count=1 ./... 2>&1"] +ENTRYPOINT ["sh", "-c", "cp -r /src/* . && go mod tidy 2>&1 && go test -v -count=1 ./... 2>&1"] diff --git a/kipina-codebench/benchmark.mjs b/kipina-codebench/benchmark.mjs index 1ed6c01..cff00d0 100644 --- a/kipina-codebench/benchmark.mjs +++ b/kipina-codebench/benchmark.mjs @@ -225,11 +225,11 @@ function parseTestOutput(output) { // === Tiedostoparseri LLM-vastauksesta === function parseGeneratedFiles(text) { const files = {}; - const sections = text.split(/===\s*(\S+\.(?:py|toml|rs))\s*===/); + const sections = text.split(/===\s*(\S+\.(?:py|toml|rs|go|mod))\s*===/); for (let i = 1; i < sections.length - 1; i += 2) { const name = sections[i]; let content = sections[i + 1].trim(); - content = content.replace(/^```(?:python|toml|rust)?\s*\n?/m, '').replace(/\n?```\s*$/m, '').trim(); + content = content.replace(/^```(?:python|toml|rust|go|gomod)?\s*\n?/m, '').replace(/\n?```\s*$/m, '').trim(); if (content) files[name] = content + '\n'; } return files;