8000 Web UI and deploy scripts: the Eval page reads /runs and shows status, error kind, metrics and withheld counts; the Fly smoke test PUTs runs by ynishi · Pull Request #43 · ynishi/evalhub · GitHub
[go: up one dir, main page]

Skip to content

Web UI and deploy scripts: the Eval page reads /runs and shows status, error kind, metrics and withheld counts; the Fly smoke test PUTs runs - #43

Merged
ynishi merged 1 commit into
mainfrom
feat/web-runs
Sep 26, 2026
Merged

ynishi merged 1 commit into
mainfrom
feat/web-runs

Conversation

@ynishi
@ynishi ynishi commented Sep 26, 2026
Copy link
Copy Markdown
Owner

Stage 8 of 9 of #24 (Runs as first-class rows), on top of stages 1–7 (#36–#42). web/, deploy/fly/smoke.sh, a Playwright test. No Rust change. Mergeable on its own; the version bump is stage 9 (#35).

What changed

  • Client (web/src/lib/api/client.ts): listRuns, getRun, putRun, putRuns (batch), archiveRun (PATCH), deleteRun, with the DTO types. schema.d.ts is unchanged: regenerating it from the OpenAPI snapshot gives an identical file (checked twice, by the implementer and in review).
  • Eval page (web/src/routes/evals/[ns]/[name]/+page.svelte): the Runs table reads GET …/runs one page at a time (limit=50, cursor stack for Previous / Next as RecordList does), keyed on ns / name and not on ?v= since runs belong to the record; columns Run, Status, Error (kind), Started, Ended, one per metric id present on the page (sorted union), and, when a Card is chosen from the comparison view's distinct Cards (#judge-card, one at a time → cards=), one judgement column per (Card, metric) with "not used" and "changed" marks and a line per Card with runs_used and changed_since_card. Non-live rows show a state tag. The "runs in this version" caption and the Outcome / Calls / Artifacts columns are gone; the header shows the envelope's runs summary ("N runs: ok, error, skipped", plus archived / deleted when present). A 404 from /runs renders as an error, not a crash. No record.runs or outcome remains in web/src.
  • Withheld.svelte (new): renders the withheld counts (relations, run_results) as a role="note", nothing at 0 / 0; used on the Card and Eval pages. Query result rows show a compact tag (RecordList.svelte); plain listings carry no withheld.
  • Query builder: RecordList / QueryBuilder read /schemas/eval-2 for Eval paths (/schemas/eval stays the 1.0 document this release). lib/paths.ts ARRAY_PATHS unchanged; record queries do not gain runs.
  • deploy/fly/smoke.sh: header POST (2.0, attachments = []) → PUT r1 from fixtures/run.json with the uploaded calls.jsonl / diff.patch on the run (hashes and sizes rewritten by jq, paths unchanged) → PUT r2 derived from it (status: error, error.kind: timeout, no attachments) → GET …/runs asserts r1 ok and r2 error / timeout → Eval GET asserts runs.count >= 2 → Card from card-run-results.json with relations[0].to set to the seq the POST returned (a missing seq now stops the script instead of citing @1) and run_results[].eval rewritten → GET …/runs?cards= asserts runs_used == 2, r1 pass, r2 fail → after publishing, anonymous …/runs?cards= and the Eval deep link are 200. Every POST / PUT accepts 200 so re-runs pass. Token handling is unchanged (header file in a mode-700 temp dir, never on the command line or stdout); the new echo lines print status codes and the first 300 bytes of envelopes that carry no credential. Reviewed by reading only; not run.
  • e2e/smoke.sh: unchanged (posts no Eval, reads no runs 8000 ).
  • Playwright (web/tests/browser/runs.spec.ts): seeds an Eval, two runs and a Card through the API with EVALHUB_E2E_TOKEN (skips without it, as orgs.spec.ts), waits on the /runs response, and asserts the header text, the core/tokens_out column, r1 / r2 cells, then after choosing the Card the core/pass column and cells, with no alert.

Verified

Command Outcome
corepack pnpm install --frozen-lockfile ok; pnpm-lock.yaml untouched
just web-check svelte-check 196 files, 0 errors, 0 warnings; prettier clean
client regeneration from the snapshot identical to the committed schema.d.ts
just e2e (release build, Docker Postgres, Playwright) e2e: 18 passed, 0 failed; Playwright 6 passed incl. runs.spec.ts (run by the implementer and again in review)
bash -n deploy/fly/smoke.sh e2e/smoke.sh ok

Not run: deploy/fly/smoke.sh (targets the hosted service), shellcheck (not installed on this host), Rust crate tests (no crate change).

Notes

  • The Fly smoke test PUTs two runs, not the one Web UI and deploy scripts: the Eval page reads /runs and shows status, error kind, metrics and withheld counts; the Fly smoke test PUTs runs #34 names, because card-run-results.json's attrs.runs names r1 and r2 and the store requires each to exist.
  • The Fly smoke header no longer carries attachments; the uploaded files sit on r1, where run.json declares them. The Card keeps its samples.jsonl attachment, so the download checks still apply.
  • Known and consistent with existing pages: no stale-response guard on in-flight /runs requests; a failed Next page hides the pager until the Card or page changes; after a ?v= change the chosen Card may not be among the new options while the table stays joined with it.

Refs #34

…, error kind, metrics and withheld counts; the Fly smoke test PUTs runs

Stage 8 of #24. The UI stops reading runs from the Eval body, which
no longer carries them, and reads GET /evals/{ns}/{name}/runs one
page at a time: columns Run, Status, Error, Started, Ended, one per
metric id present on the page, and one per judgement when a Card is
chosen from the comparison view (cards=), with a line per Card
giving runs_used and changed_since_card. The "runs in this version"
caption goes, since runs belong to the record and the page reloads
them on ns / name and not on ?v=; the header shows the envelope's
runs summary. The query builder reads /schemas/eval-2 for Eval
paths because /schemas/eval stays the 1.0 document this release.
withheld, in the GET and query envelopes since 0.1.4 and counting
run_results since stage 7, is now rendered on the Card and Eval
pages and as a tag on query results. client.ts gains the run calls;
schema.d.ts is unchanged (regenerated identical to the snapshot).

deploy/fly/smoke.sh posts the 2.0 header, PUTs r1 from
fixtures/run.json (with the uploaded calls / diff attachments on the
run, where run.json declares them) and an r2 derived from it with
status error, reads GET /runs, posts the Card from
card-run-results.json against the seq the POST returned (a missing
seq now stops the script instead of citing @1) and reads GET
/runs?cards= for the judgements; the anonymous checks cover the new
route and the Eval deep link. No credential reaches stdout or stderr.
e2e/smoke.sh posts no Eval and is unchanged. One Playwright test
seeds an Eval, two runs and a Card through the API and checks the
page paints the run rows, the metric column and, after choosing the
Card, the judgement column.

Verified: just web-check (svelte-check 196 files, 0 errors; prettier
clean); just e2e (release build, Docker Postgres, e2e/smoke.sh 18
checks passed, Playwright 6 passed incl. runs.spec.ts); the client
regenerated from the OpenAPI snapshot and diffed identical; bash -n
on both scripts; deploy/fly/smoke.sh reviewed by reading only, not
run (it targets the hosted service); shellcheck not installed here.

Refs #34

Signed-off-by: Yutaka Nishimura <ytk.nishimura@gmail.com>
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

0