8000 Comparison view: an empty used set agrees with nothing, same_harness / same_model false by ynishi · Pull Request #53 · ynishi/evalhub · GitHub
[go: up one dir, main page]

Skip to content

Comparison view: an empty used set agrees with nothing, same_harness / same_model false - #53

Merged
ynishi merged 1 commit into
mainfrom
fix/comparison-empty-used-set
Sep 28, 2026
Merged

ynishi merged 1 commit into
mainfrom
fix/comparison-empty-used-set

Conversation

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

Comparison view: an empty used set agrees with nothing

Closes #48 (Option A). GET /evals/{ns}/{name}/cards reports same_harness / same_model per Card as "the Card's fingerprint equals that of every run in its used set" (#24, #31). When the used set was empty, the view fell back to the Eval version's header fingerprint, the pre-0.2.0 rule, so a Card posted against an Eval with no runs, or with an explicit attrs.runs: [], could read same_model: true although it had been compared with no run. The fallback was kept in #31 to leave a pre-#24 server test green; this PR makes the test say what the model says.

Behaviour

  • An empty used set (the Eval had no runs when the Card was posted, the Card's attrs.runs is an explicit [], or its edge did not resolve) gives same_harness: false and same_model: false. The row's runs_used: 0 says why. The Eval version's header fingerprint is never compared.
  • Non-empty used sets are unchanged: true when every used run's fingerprint equals the Card's, false when any differs or is missing, or the Card has none.
  • Visible change on a hosted 0.3.0 hub: a Card that sat on an Eval with no runs showed yes in the comparison table through the header; after this it shows no with runs used: 0. Nothing stored changes.
  • Docs: the store and server rustdoc, the OpenAPI description of same_harness (insta snapshot, one line), the generated web client (schema.d.ts, byte-identical to the generator's output) and the web tooltip say the run-level rule including the empty case. README's comparison row already did.

Verification

cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test -p evalhub-store (97, Docker), -p evalhub-server (85, Docker, after rebase onto #52), cargo insta test -p evalhub-server (one description line accepted), pnpm check / pnpm lint on web/. RED observed before the fix: the store tests with a header-matching Card got same_model: true for an empty used set; the new server test got runs_used: 0, same_harness: true, same_model: true on the unmodified base. Core / schema / query untouched. No version bump in this PR.

…/ same_model false

The comparison view judges `same_harness` / `same_model` against every
run in a Card's used set (#24, #31), but an empty used set fell back to
the Eval version's header fingerprint, the pre-0.2.0 rule. A Card posted
against an Eval with no runs, with an explicit `attrs.runs: []`, or
through an edge that did not resolve then, got `true` from the header
although it was compared with no run, while a Card whose one used run
differed got `false`: two Cards could be "comparable" for different
reasons (#48).

An empty used set now gives false for both flags; the row's
`runs_used: 0` says why. `cards_using_eval` no longer reads the Eval
version's fingerprints, and the fallback sentences go from the store's
module doc, `ComparisonRow` and the function doc, and from the server's
comparison doc and `same_harness` field doc. The OpenAPI snapshot and
the web client's generated `schema.d.ts` carry the new field text; the
web comparison table's tooltips said "equals this Eval's" and now name
the runs the Card used. README already states the run-level rule.

Tests: the store's comparison_view seeds a used run for c1 and expects
the textual-edge c2 (no used set) to read false; cards_runs covers an
Eval without runs and an explicit `runs: []` on an Eval with runs. The
server's comparison_view_lines_cards_up PUTs one run before the Cards
post, so `first` agrees with a run and `second` differs from it, and a
new case posts a Card on an Eval with no runs and expects both flags
false with `runs_used: 0`.

Closes #48

Signed-off-by: Yutaka Nishimura <ytk.nishimura@gmail.com>
@ynishi
ynishi merged commit b93c0bb into main Sep 28, 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.

Comparison view: decide what an empty used set means instead of falling back to the header fingerprint

1 participant

0