← plans · eval-gate-split · NOS-21623 juil. 2026

Eval gate split — implementation plan

Status: In progress · Author: Claude (NOS-216 orchestrator) · Date: 2026-07-23 · Repo: north-os
Related: Linear NOS-216; design spec 2026-07-23-eval-gate-split-design.html

Superseded 2026-08-26: the agent-quality gate was removed from the deploy path and the ratchet, its weekly runner, and its baseline were deleted.

Order of work

  1. Measure the five cheap batteries. Run each locally, record cost, wall time and today's score. This decides which can run on a hosted runner and which need the corpus, and gives the PR gate a known-green starting point.
  2. Battery report contract. scripts/eval-battery-report.tsBatteryReport/EvalBaseline types plus pure buildBaseline, compareToBaseline, formatRatchet. Pure and DB-free so it unit-tests without a runner.
  3. --report / --only on eval-agent-quality.ts. Per-case verdicts to JSON (a case passes only if it passed every run) and a case filter for the confirmation re-run. No change to how any case is judged.
  4. scripts/eval-ratchet.ts. Check mode and --record mode, with the confirmation re-run and the refusal to lower the bar without --allow-regression --reason. Scripts: eval:ratchet, eval:baseline:record.
  5. Unit tests. eval-battery-report.test.ts + eval-ratchet.test.ts.
  6. Runner setup. deploy/ci-runner/{install.sh,north-os-ci-runner.service,README.md}. Committed and documented, never a manual folk step.
  7. Workflow rewrite. changes / cheap-gate / corpus-gate / eval-gate plus .github/scripts/eval-changed-batteries.sh.
  8. Deploy gate. deploy/preprod/deploy.sh step 4d (ratchet) and 4e (opt-in trajectory smoke), EVAL_CORPUS_DATABASE_URL in env.preprod.example, README runbook.
  9. Record the baseline. One full eval:baseline:record run; commit the JSON.
  10. Gates, PR, CI green, merge.

Files

PathChange
.github/workflows/eval-gate.ymlrewritten — four jobs (shared edit point: keep additions on their own lines, rebase before final gates)
.github/scripts/eval-changed-batteries.shnew — per-battery path filter
deploy/ci-runner/install.shnew — idempotent runner install
deploy/ci-runner/north-os-ci-runner.servicenew — systemd user unit template
deploy/ci-runner/README.mdnew — runbook, security posture, uninstall
deploy/preprod/deploy.shsteps 4d + 4e before the fleet restart
deploy/preprod/env.preprod.exampleEVAL_CORPUS_DATABASE_URL
deploy/preprod/README.mdgate documentation
packages/agent-runtime/scripts/eval-battery-report.tsnew — report/baseline contract + pure comparison
packages/agent-runtime/scripts/eval-ratchet.tsnew — the gate runner
packages/agent-runtime/scripts/eval-agent-quality.ts--report, --only
packages/agent-runtime/eval/baselines/agent-quality.jsonnew — the committed contract
package.json (root)eval:gate:cheap extracted, eval:gate composed from it, eval:ratchet (shared edit point)

Verification

Risks