diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 12bf26d..a3c09fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,12 +35,32 @@ jobs: EVO_TEST_DATABASE_URL: postgresql://postgres:evoforge-ci-only@localhost:5432/postgres api: runs-on: ubuntu-latest + # Leave time to upload diagnostics after the bounded test step fails. + timeout-minutes: 75 steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: { python-version: '3.12' } - run: pip install -r services/api/requirements.txt - - run: pytest -q services/api/tests + - name: API regression tests + timeout-minutes: 60 + shell: bash + run: | + set -o pipefail + mkdir -p artifacts + python -u -m pytest services/api/tests -vv --durations=25 \ + -o faulthandler_timeout=120 --junitxml=artifacts/api-junit.xml \ + 2>&1 | tee artifacts/api-pytest.log + - name: Save API test diagnostics + if: always() + uses: actions/upload-artifact@v4 + with: + name: api-test-diagnostics + path: | + artifacts/api-pytest.log + artifacts/api-junit.xml + if-no-files-found: warn + retention-days: 7 - run: python -c "from main import app; from fastapi.testclient import TestClient; c=TestClient(app); assert c.get('/healthz').status_code==200" working-directory: services/api web: diff --git a/apps/web/app/[locale]/arena/page.tsx b/apps/web/app/[locale]/arena/page.tsx index 9aa9079..2faa074 100644 --- a/apps/web/app/[locale]/arena/page.tsx +++ b/apps/web/app/[locale]/arena/page.tsx @@ -19,7 +19,21 @@ import { SandboxedPreview } from "../../../components/SandboxedPreview"; import { PromptBar } from "../../../components/PromptBar"; import { shareUrl } from "../../../lib/share"; -const BENCHMARK_TASKS: Record<"v1" | "v2" | "v3" | "v4" | "v5", { id: string; goal: string }[]> = { +const BENCHMARK_TASKS: Record<"v1" | "v2" | "v3" | "v4" | "v5" | "v6", { id: string; goal: string }[]> = { + v6: [ + { id: "SV6-AO-01", goal: "In semver_range.py, check if a version satisfies an npm-style range" }, + { id: "SV6-AO-02", goal: "In intervals.py, merge labelled half-open intervals by priority" }, + { id: "SV6-CD-01", goal: "In reassemble.py, rebuild chat messages from out-of-order chunks" }, + { id: "SV6-CD-02", goal: "In retry.py, compute backoff waits with cap, jitter and budget" }, + { id: "SV6-CI-01", goal: "In shard_plan.py, split CI tests across shards with pinning" }, + { id: "SV6-CI-02", goal: "In junit_merge.py, merge CI attempts into final suite results" }, + { id: "SV6-PM-01", goal: "In tokens.py and calc.py, tokenize and evaluate expressions" }, + { id: "SV6-PM-02", goal: "In money.py and invoice.py, price invoice lines with tax" }, + { id: "SV6-SEC-01", goal: "In path_guard.py, join user paths safely under a root" }, + { id: "SV6-SEC-02", goal: "In jwt_lite.py, verify HS256 JWTs and return payload" }, + { id: "SV6-SS-01", goal: "In duration.py, parse and format durations like 1h30m" }, + { id: "SV6-SS-02", goal: "In slugify.py, make URL slugs like cafe-au-lait" }, + ], v5: [ { id: "SV5-AO-01", goal: "In semver_range.py, check if a version satisfies an npm-style range" }, { id: "SV5-AO-02", goal: "In intervals.py, merge labelled half-open intervals by priority" }, @@ -102,8 +116,8 @@ export default function ArenaPage() { const t = useTranslations("arena"); const locale = useLocale(); const tp = useTranslations("plan"); - const [suiteVersion, setSuiteVersion] = useState<"v1" | "v2" | "v3" | "v4" | "v5">("v5"); - const [selectedTaskId, setSelectedTaskId] = useState("SV5-AO-01"); + const [suiteVersion, setSuiteVersion] = useState<"v1" | "v2" | "v3" | "v4" | "v5" | "v6">("v6"); + const [selectedTaskId, setSelectedTaskId] = useState("SV6-AO-01"); const [customTaskId, setCustomTaskId] = useState(""); const [feedback, setFeedback] = useState<"heldout" | "critic">("critic"); const [starting, setStarting] = useState(false); @@ -383,13 +397,14 @@ export default function ArenaPage() {