Skip to content

[Task]: make the Claude pair the eval default and point every doc, skill, agent and hook at it #682

Closed

Description

@sumithr

Priority / sequencing

P1 / priority: next

Suggested labels

documentation

Roadmap fields

Status: Ready; Priority: P1; Size: M; Depends on: none (#679 merged). Parent epic: #680.

Problem

#679 put the promptfoo matrix on the Claude subscription behind SUMO_EVAL_BACKEND=claude / npm run eval:claude, but the defaults still point at OpenAI: run-eval.sh defaults BACKEND to cloud, npm run eval and npm run eval:all call promptfoo eval with the configs' pinned openai:chat:* providers, and the docs, agent, skill and hook that describe the eval gate still name npm run eval:all and OPENAI_API_KEY. Epic #660 retired the OpenAI gate, so running the default command today bills OpenAI or fails without a key.

Expected outcome

Decision (recorded on #680, 2026-09-14): the Claude pair becomes the default, the OpenAI cloud tier is removed, and the local OpenWebUI tiers stay as an unmetered iteration option that is documented as not a merge gate.

  • run-eval.sh defaults to the claude backend; the cloud backend branch and the cloud-* provider YAMLs are removed. SUMO_EVAL_BACKEND=local TIER=... keeps working.
  • npm run eval and npm run eval:all run through run-eval.sh on the Claude backend (single config and full matrix). Decide whether eval:claude stays as an alias; keep one obvious gate command.
  • Nothing in the default path reads OPENAI_API_KEY. The local tier keeps its OPENWEBUI_API_KEY export.
  • Every doc, skill, agent and hook in Scope names the Claude gate command.

Scope

  • tests/evals/promptfoo/run-eval.sh, package.json scripts, tests/evals/promptfoo/providers/cloud-*.yaml.
  • Whether the per-config providers: pins stay as documentation, move to the Claude pair, or go (the Claude backend overrides them with --providers / --grader). Pick the option that keeps a bare promptfoo eval -c <config> from silently billing OpenAI, and say why.
  • .claude/agents/eval-failure-diagnoser.md, .claude/skills/regen-eval-baseline/SKILL.md and scripts/run_baseline.py (the OPENAI_API_KEY precondition), .claude/hooks/route-qa-runners.py (the eval / eval:all script detection, plus tests/test_route_qa_runners.py and tests/test_claude_hooks.py), .claude/README.md, docs/DEVELOPMENT.md, tests/evals/promptfoo/README.md (setup / keys / run commands sections only; the reference-pair and baseline rewrite belongs to the terminal slice), tests/scenarios/SCENARIOS.md, tests/scenarios/TOOL-SELECTION.md.
  • The local gitignored /finish-pr, /work-issue, /finish-pr-batch evals slots are edited in the primary checkout by the orchestrator, not in this PR; list the exact wording change in the PR body.

Run budget

Eval runs are proportionate to the change (set 2026-09-14). Never run or start the full matrix here. Prove wiring statically before any real call. Rerun only the failing cases of the configs this issue names, single pass; add a repeat only for a specific case whose result is borderline or differs from the #679 run, to tell variance from a real failure. Report exactly which eval runs were made.

Acceptance criteria

  • git grep -nE "eval:all|OPENAI_API_KEY" on the branch returns only the local OpenWebUI tier and lines that describe removed history, each justified in the PR body.
  • npm run eval with no env vars resolves to claude-haiku-4-5 / claude-opus-5 (static evidence of the resolved providers; at most one real single-config run, only if static evidence cannot show it).
  • npm run eval:all resolves to the full Claude matrix (dry listing only; never started).
  • SUMO_EVAL_BACKEND=local TIER=cheap bash tests/evals/promptfoo/run-eval.sh still resolves its providers (argument and preflight path; the fleet need not be online).
  • SUMO_EVAL_BACKEND=cloud fails with a clear message naming the valid backends.
  • Hook tests updated and green; full pytest suite green.

Test plan

Update tests/test_route_qa_runners.py / tests/test_claude_hooks.py for the renamed commands first (red), then change the hook. Show the resolved Claude providers for npm run eval statically; no full-matrix run. Full uv run pytest.

Context

Child of #680 (epic), under #660. Memory constraint: the eval gate runs on the Claude subscription through claude -p, never a billed API key, and code comments must not frame usage as a trade-off.

Activity

  1. added
    documentation
    enhancement
    priority: next
    on Sep 14, 2026
  2. sumithr commented on Sep 14, 2026

    @sumithr
    OwnerAuthor

    Drift found while reconciling this issue against origin/main (6467d0f), implementing against the live code:

    1. AC "git grep -nE "eval:all|OPENAI_API_KEY" returns only the local tier and history". The Expected outcome keeps npm run eval:all as the Claude full-matrix command, so the branch still has eval:all lines that name the Claude gate command itself (package.json, hook detection, docs). Those are the intended gate command, not leftovers; each is justified in the PR body. OPENAI_API_KEY remains only in the local OpenWebUI tier (run-eval.sh local branch, _owui-env.sh, bakeoff/run-bakeoff.sh) and in a test asserting its absence.
    2. "Update the hook tests for the renamed commands". No command was renamed: eval and eval:all keep their names and now wrap run-eval.sh. eval:claude is removed (one obvious gate command), and the hook never detected it. The real hook gap was that direct bash tests/evals/promptfoo/run-eval.sh runs and eval:local:* were not routed, and that a Claude-backend [eval] ABORT: (provider or judge error, exit 3) would have been routed to the SKILL.md diagnoser; both are fixed with tests.
    3. Per-config pins. 61 configs: 51 inline openai:chat:* candidate + gpt-5.5 judge pins, 10 .ab configs defaulting to the cloud-* provider files. The local tier's cheap/reasoning split was keyed on the gpt-5-mini pin, so repinning to the Claude pair moves that split to an explicit # local-tier: reasoning marker on the same 33 configs.
    4. run-eval.sh claude branch defaulted to all. For npm run eval to run one config, the no-argument default is now skill-implementing-with-tdd.yaml; all stays explicit.
  3. sumithr commented on Sep 14, 2026

    @sumithr
    OwnerAuthor

    Verification of #682 on PR #692 (head fe74450)

    All six acceptance criteria are met on the branch and ticked above. Evidence below was observed on the real scripts, npm commands and hook in real checkouts of this repository (the finish clone, and disposable worktrees of fe74450 and origin/main 6467d0f registered to it, one of them under a directory whose path contains a space). No full matrix was run or started.

    Acceptance criteria

    AC Met Evidence on the branch
    git grep -nE "eval:all|OPENAI_API_KEY" returns only the local tier and justified lines yes Remaining eval:all lines are the Claude full-matrix gate command itself (package.json, hook detection, docs), which the Expected outcome keeps; recorded as AC drift on this issue. OPENAI_API_KEY remains only in the local OpenWebUI tier (_owui-env.sh, bakeoff/run-bakeoff.sh, the run-eval.sh local branch) and in tests asserting its absence.
    npm run eval with no env vars resolves to claude-haiku-4-5 / claude-opus-5 yes Provider files pin both models; dry run and stand-in claude below; plus one real single-config run.
    npm run eval:all resolves to the full Claude matrix, dry listing only yes 61 dry-run commands, all 61 with both Claude provider files, 0 OpenAI or gpt ids, out of 61 configs.
    SUMO_EVAL_BACKEND=local TIER=cheap still resolves its providers yes Dry run exit 0, 28 configs, candidate gemma4-e4b-bounded, judge gemma4-12b-bounded; identical to origin/main apart from one banner line.
    SUMO_EVAL_BACKEND=cloud fails with a clear message yes [eval] ERROR: SUMO_EVAL_BACKEND must be claude|local (got 'cloud'). The OpenAI cloud backend was removed; the Claude pair (default) is the merge gate. exit 1
    Hook tests updated and green; full suite green yes uv run pytest at fe74450: 3696 passed, 6 skipped, 1 xfailed, coverage 100%. CI 33/33 checks pass on fe74450.

    Behaviour ledger (observed output)

    # Expected behaviour Real call and input Observed output Met
    1 run-eval.sh defaults to the Claude backend, one config SUMO_EVAL_DRY_RUN=1 npm run eval [eval] backend=CLAUDE (merge gate; subscription via claude -p) repeat=1 -j 1 then one command: promptfoo eval -c <root>/tests/evals/promptfoo/skill-implementing-with-tdd.yaml --no-cache --providers file://<root>/tests/evals/promptfoo/providers/claude-candidate.yaml --grader file://<root>/tests/evals/promptfoo/providers/claude-judge.yaml --repeat 1 -j 1 --output <root>/tests/evals/results/claude-reports/skill-implementing-with-tdd.json, exit 0 yes
    2 npm run eval calls only the Claude pair, no OpenAI key npm run eval, OpenAI vars unset, stand-in claude logging --model exit 1 (stand-in judge fails every rubric); calls: 5 claude-haiku-4-5, 5 claude-opus-5; 0 openai/gpt- in output yes
    3 npm run eval end to end on the real Claude backend npm run eval, no env vars, real claude CLI, at d7b819b (run-eval.sh, package.json and configs are byte-identical at fe74450) Loaded provider from config file ... "providerId": "python:providers/claude_cli.py", Running 5 test cases (up to 1 at a time), 5 passed (100%) 0 failed (0%) 0 errors (0%), Total Tokens: 111,834, Duration: 8m 47s, exit 0 yes
    4 npm run eval:all is the full Claude matrix SUMO_EVAL_DRY_RUN=1 npm run eval:all exit 0, 61 commands, 61 with both Claude files, 0 OpenAI/gpt, 61 configs yes
    5 Cloud backend removed SUMO_EVAL_BACKEND=cloud bash tests/evals/promptfoo/run-eval.sh message quoted in the AC table, exit 1 yes
    6 One gate command, eval:claude gone npm run eval:claude npm error Missing script: "eval:claude" yes
    7 Dry-run switch cannot silently disable the gate SUMO_EVAL_DRY_RUN=0 bash tests/evals/promptfoo/run-eval.sh [eval] ERROR: SUMO_EVAL_DRY_RUN accepts only '1' ... (got '0'). exit 1 yes
    8 Local tier keeps working SUMO_EVAL_BACKEND=local TIER=cheap SUMO_EVAL_DRY_RUN=1 bash tests/evals/promptfoo/run-eval.sh exit 0, 28 commands, candidate=gemma4-e4b-bounded judge=gemma4-12b-bounded via OWUI ... yes
    9 A bare promptfoo eval -c <config> never reaches OpenAI promptfoo eval -c skill-reviewing-before-merge-feedback-memory.ab.yaml --no-cache, stand-in claude exit 100; calls: 2 claude-haiku-4-5, 2 claude-opus-5; 0 OpenAI/gpt yes
    10 eval:generate uses the Claude candidate npm run eval:generate, stand-in claude 1 call claude-haiku-4-5, "providerId": "python:providers/claude_cli.py", 0 openai; exit 1 because the stand-in answer is not a persona list yes
    11 Hook routes a direct run-eval.sh FAIL to the diagnoser real PostToolUse payload from bash tests/evals/promptfoo/run-eval.sh (stand-in judge fails), checkout path with a space exit 1; hook: promptfoo reported a FAIL. Route the failure through the eval-failure-diagnoser agent. ... yes
    12 Provider/judge abort is not a skill verdict CLAUDE_STUB_MODE=error npm run eval exit 3, [eval] ABORT: skill-implementing-with-tdd had provider or judge errors (errors=5); hook: run-eval.sh aborted on provider or judge errors: this is not a skill verdict, so do not diagnose it as a skill failure or edit a SKILL.md. ... yes
    13 Harness/config error is exit 4 with its own reminder bash tests/evals/promptfoo/run-eval.sh tests/evals/promptfoo/skill-implementing-with-tdd.yml exit 4, [eval] ERROR: <checkout>/tests/evals/promptfoo/skill-implementing-with-tdd.yml produced no readable report; hook: run-eval.sh stopped with an [eval] ERROR: line: the eval did not run to a verdict ... yes
    14 An earlier real FAIL survives a later abort or error run-eval.sh skill-strategising.yaml; CLAUDE_STUB_MODE=error npm run eval and the same with the .yml error exit 3 / exit 4; hook: Before the run stopped, these configs finished with a skill FAIL: skill-strategising. Those are skill verdicts: route them through the eval-failure-diagnoser agent ... followed by the abort / error reminder yes
    15 Mixed ERROR and ABORT in one command run-eval.sh ...yml; CLAUDE_STUB_MODE=error npm run eval exit 3; hook: The eval output carries both an [eval] ERROR: line and an [eval] ABORT: line: neither is a skill verdict ... yes
    16 Quoted marker text is not a runner marker SUMO_EVAL_DRY_RUN=1 npm run eval; printf '%s\n' 'example: [eval] ABORT: usage limit' exit 0; hook silent yes
    17 Baseline preflight is the claude CLI, not OPENAI_API_KEY run_baseline.py --skill implementing-with-tdd --label ledger --force with PATH /usr/bin:/bin claude CLI not on PATH. The skill configs pin the Claude eval pair, which runs through claude -p ... exit 2 yes
    18 Clean baseline captured through the real promptfoo same, real promptfoo 0.121.20, stand-in claude answering Running: npx promptfoo eval ... --output <wt>/docs/qa/runs/eval-baselines/.partial/2026-09-14-skill-implementing-with-tdd__ledger.json, Snapshot captured: docs/qa/runs/eval-baselines/2026-09-14-skill-implementing-with-tdd__ledger.json, 0 passed, 5 failed, exit 100; no .partial/ left yes
    19 Provider errors are never kept as a baseline same with --force, stand-in claude erroring every call The run had provider or judge errors (errors=5): not a skill verdict, so it was not kept as a baseline ..., exit 3, .json.rejected written, kept snapshot byte-identical (cmp) yes
    20 No report is a harness error, exit 4 run_baseline.py --config skill-zz-ledger-malformed.yaml, real promptfoo promptfoo exited with code 1 and wrote no report at .../.partial/...json: a harness or config error, not a skill verdict. exit 4, nothing captured yes
    21 Prior-baseline delta ignores scratch and rejected files prior 2026-09-13-...__ledger.json (2 passed, 3 failed) beside a .json.rejected, then a clean capture Prior baseline: 2026-09-13-skill-implementing-with-tdd__ledger.json, Delta: passed -2, failed +2, exit 100 yes

    Supporting slots

    • real_repo: the finish clone sumo-qa-finish-692 of this repository and disposable git worktrees of fe74450 and origin/main 6467d0f registered to it (one at a path containing My Projects), with real history and the repo's real configs, provider files, node_modules promptfoo 0.121.20 and hook.
    • real_surface: this change is not reachable through the sumo-qa MCP server (eval harness scripts, npm scripts, a Claude Code hook, a dev-only skill script, docs), so every row was driven through the real run-eval.sh, npm scripts, run_baseline.py, real promptfoo, and the real hook fed real PostToolUse payloads built from real run output. A stand-in claude was used wherever a row did not need a real model, per the run budget.
    • existing_flow: local tier SUMO_EVAL_BACKEND=local TIER=cheap run for real on origin/main and on fe74450 with a stand-in promptfoo and curl (the fleet offline): both exit 0, 28 promptfoo calls each, the same configs and the same generated OpenWebUI provider YAMLs; the only diff is the intended banner line (NOT merge-authoritative ... cloud stays the gate became NOT a merge gate: relative lift only; the Claude pair (npm run eval) is the gate.). Hook on both refs with the same payloads: mutmut run survivors, npx promptfoo eval FAIL, pytest, and clean mutmut run produce identical output.
    • evals: one real single-config run, row 3 (npm run eval, 5 passed, exit 0). All other rows used dry runs or a stand-in claude. No full matrix was run or started.

    Verification

    • CI on fe74450: 33/33 checks pass. Scoped mutation gate (mutation.yml on the branch) passed on fe74450 (run 34891144971); the first dispatch on e994baa had failed because package.json was missing from the mutmut copy, fixed in c3f85a5.
    • Local suite at fe74450: 3696 passed, 6 skipped, 1 xfailed, coverage 100%.
    • Per-file sumo-qa review at merge: every changed file reviewed on its own at e994baa; the files touched by later fixes re-reviewed at d7b819b and fe74450. Final verdict SAFE, low findings only.
    • Adversarial review: codex reviewed every commit up to a706c77, and 053315c and fe74450. For d7b819b codex hit its usage limit and gave no verdict, so the built-in /code-review (high effort) reviewed that commit instead, with no findings: codex is UNVERIFIED for d7b819b only.
    • Fixes made at finish: c3f85a5 (baseline exit 4 on a missing report; mutmut copy), a706c77 (earlier FAIL survives a later abort), d7b819b (paths with spaces), 053315c (baseline scratch path promptfoo accepts), fe74450 (non-skipping guard for that path). Review misses are logged on [Quality]: reviewing-before-merge passed four mode/outcome classification defects codex caught on #682 #690.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationenhancementpriority: next

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions