← TinyGPT · docs · devlog · roadmap · speedup
source: docs/prds/B32-eval-ci-gate.md · view on GitHub ↗

PRD — Reframe the eval harnesses as a developer-workflow gate

Status (updated 2026-06-18): scaffolding shipped. Pure gate logic (TinyGPTModel/EvalGate.swift: direction heuristic, pp thresholds, per-suite override, missing-baseline handling, K-pass mean + repeated-run stdev/stderr/95% CI + optional B23 budget metadata in gate-result.json) with unit tests in EvalGateTests.swift. CLI (Sources/TinyGPT/EvalGate.swift): --spec / eval-gate.json / tinygpt.project.json eval block resolution, --candidate (no-GPU path), --baseline, --threshold, --passes, --budget, --update-baseline, gate-result.json, exit 0/1. Action at .github/actions/tinygpt-eval-gate/ forwards spec, candidate, passes, and budget; recipe docs/recipes/eval-gate.md, smoke evals/eval-gate-smoke.sh (asserts both exit codes against committed fixtures, including repeated-row CI output). Remaining to flip to ✅: run a real specialist’s suites end to end through the gate (the command-driven path) on a self-hosted Mac runner — exercised by the user, not by CI.

Goal

Ship tinygpt eval-gate — a single command that runs a project’s declared eval suites against a model + adapter, compares to a stored baseline, and exits non-zero when any suite regresses past a threshold. Plus a GitHub Action wrapper and a pre-commit hook recipe.

The landscape finding (docs/sessions/2026-06-13-market-landscape-mac-first.md): BFCL and τ-bench are academic leaderboards with no product wrapping them into “gate my SLM in CI.” We already wrapped both (E1/E2 shipped). B32 is the framing work that turns a benchmark wrapper into a workflow primitive — near-zero new model code, high product leverage.

Why now

Scope — in

Scope — out

Files to touch

FileChange
Sources/TinyGPT/EvalGate.swiftnew — orchestrator + exit-code logic
Sources/TinyGPT/TinyGPT.swiftcase "eval-gate"
Sources/TinyGPTModel/ProjectManifest.swiftextend with an optional [eval] block (B31 schema addition)
.github/actions/tinygpt-eval-gate/action.ymlshipped — Action wrapper with --passes and optional --budget forwarding
evals/eval-gate-smoke.shnew — pass + fail cases assert correct exit codes
docs/recipes/eval-gate.mdnew — pre-commit + Action recipe
docs/PLAN.mdB32 ⬜ → ✅ on ship

Don’t touch

Acceptance criteria

Reference patterns

Open questions