Skip to content

Add read-only experiment and evaluator commands - #7

Merged
mathieuripert merged 3 commits into
mainfrom
mathieuripert/add-evaluator-experiment
Nov 18, 2026
Merged

mathieuripert merged 3 commits into
mainfrom
mathieuripert/add-evaluator-experiment

Conversation

@mathieuripert

Copy link
Copy Markdown
Contributor

Summary

Adds read-only commands for online model experiments and workload evaluators, using the organization's customer API (/customer/v1). They never create, activate, stop, or change experiments or evaluators, and send no inference.

Command Reads
experiments list [--project --workload --status] Experiments visible to the org, newest first
experiments show <id> Models, candidate share, audience, status
experiments results <id> [--from --to] Control vs candidate from the workload's evaluator summary
evaluators list [--project --workload] Visible evaluators with 30-day results
evaluators show [id] [--project --workload] Active version, judge, rubrics (incl. code checks)
evaluators summary <id> [--from --to] Results by model, rubric, and experiment arm
evaluators scores <id> [filters] [--include-reasons] Per-trace verdicts (org admins only)

Safety

  • Browser OAuth only, matching the platform's customer API; organization keys are refused before any request.
  • experiments results reports what the platform measured and never computes its own rates: below 30 rated traces per arm, rates and the difference stay null. A draft, or a workload with no visible evaluator, is reported as unmeasurable. Output notes that results cover the evaluator's current version only and that fallback responses count in their assigned arm.
  • Judge reasons can quote the organization's traces, so evaluators scores omits them from text and JSON unless --include-reasons is passed.
  • Experiment tag values are summarized as a count in human output (JSON includes them).
  • IDs, ranges (ISO, max 90 days), verdicts, rubric names, and page sizes are validated locally before any request. Responses are checked for repeated ids and for belonging to the requested experiment or evaluator; 403/404 get specific messages.

Testing

  • npm run check: 711 tests pass (16 new), public boundary check passes.
  • New tests use wholly invented fixtures and mocked HTTP responses; not exercised against the live API.

🤖 Generated with Claude Code

Add `experiments list|show|results` and `evaluators list|show|summary|scores`
over the organization's customer API. These are reads only: they never
create, activate, stop, or change experiments or evaluators.

- Browser OAuth only; organization keys are refused before any request.
- `experiments results` joins the experiment to its workload's evaluator
  summary over the experiment's life (bounded to 90 days) and reports each
  arm's sample size, pass rate with interval, cost per trace, and the
  candidate-minus-control difference. Missing evaluators, drafts, and arms
  below 30 rated traces are reported, never filled in.
- `evaluators scores` omits judge reasons unless --include-reasons, since
  they can quote the organization's traces.
- Inputs are validated locally; responses are checked for repeated ids and
  for belonging to the requested experiment or evaluator.

Tests use invented fixtures and mocked HTTP responses only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mathieuripert
mathieuripert requested a review from aamir November 13, 2026 13:53
mathieuripert and others added 2 commits November 14, 2026 00:42
Live testing showed evaluator score cursors contain a space, so the
"More results" hint broke when pasted into a shell. Quote it.

The platform can return more scores than --limit so that one trace's
rubric verdicts stay on the same page; say so in help and docs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The "More results" hint embedded the server-provided cursor in single
quotes without escaping quotes inside it, so a crafted cursor could turn
a pasted hint into extra shell commands. Quote it as one POSIX shell word
with a shared shellQuote helper, and prove the round trip through /bin/sh
for quotes, command substitution, and variables.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mathieuripert
mathieuripert merged commit 2e2952b into main Nov 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant