From 75870c11006c82cd33275cba834e46ba91732846 Mon Sep 17 00:00:00 2001 From: jaakko Date: Tue, 14 Apr 2026 12:18:36 +0300 Subject: [PATCH] =?UTF-8?q?CodeBench:=20korjaa=20aikaleima-s=C3=A4=C3=A4nt?= =?UTF-8?q?=C3=B6=20=E2=80=94=20ei=20lis=C3=A4=C3=A4=20ylim=C3=A4=C3=A4r?= =?UTF-8?q?=C3=A4isi=C3=A4=20kentti=C3=A4,=20func=20import?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit func.now() aiheutti NameError koska mallit eivät importanneet func:ia. Uusi lähestymistapa: kielletään ylimääräiset kentät, ja JOS speksissä on aikaleimat niin käytetään server_default + func import. --- kipina-codebench/prompts/code.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kipina-codebench/prompts/code.md b/kipina-codebench/prompts/code.md index 7e8f99f..1aef484 100644 --- a/kipina-codebench/prompts/code.md +++ b/kipina-codebench/prompts/code.md @@ -31,9 +31,9 @@ RULES: - Python type unions: str | None (not Optional[str]) - Tests: unique descriptive data per test, NOT generic "test_title" strings - Tests: PUT/update test data MUST include ALL required (non-nullable) fields, not just the field being updated -- Timestamp fields (created_at, updated_at): ALWAYS use server_default=func.now() so they are NOT required in Create schema - Do NOT add filter/search endpoints — only standard CRUD (create, list, get, update, delete) -- Do NOT add fields beyond what the spec defines — no extra created_at/updated_at unless in spec +- Do NOT add fields beyond what the JSON spec defines — no extra created_at, updated_at, or other fields not in spec +- If the spec includes timestamp fields: use server_default=func.now() (import func from sqlalchemy) and make them Optional in Create schema - Absolute imports only (from models import ..., from schemas import ...) - NO markdown fences inside file content — just raw code - Only test endpoints that exist in main.py — no extra tests