Repository navigation
Add five Swedish Magic Compose eval cases - #1020
Conversation
ev_046 to ev_050 cover what the one Swedish case didn't: an organizer whose language is Swedish, Swedish dates and 24-hour times, Swedish column names, Swedish shifts and a range of Saturdays, the questions flow in Swedish, and an English description that only names Swedish things. Harness tests check that a right reply passes each case and a wrong one fails the check it should. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YZ9SWUV56YS8FjT8Ki8XH
Tophat: passedRan 1540950 locally. The PR changes only eval data (
Nothing a person using OpenSignup sees changes, so this isn't UX. Because the PR asks the owner to run the evals before merging, it still stops at the owner. No screenshots: nothing on screen changed. Session: https://claude.ai/code/session_016YZ9SV8FdFSdeSj5SQ43Fd Generated by Claude Code |
richshaw
left a comment
There was a problem hiding this comment.
Review: passed (round 1)
The PR adds the five Swedish Magic Compose eval cases #993 outlines (ev_046 to ev_050, tag swedish) and uses only checks the harness already has. It also adds a test block that runs a plausible right reply and a wrong one through each case. I checked how each new expectation is evaluated in scripts/lib/eval-harness.ts. Label and slot-value checks are loose, case-insensitive substring matches, and the option checks match whole words. raw_output_must_not_match_patterns runs against JSON.stringify of the parsed reply. A quick check confirmed that "0?2:00" matches a "02:00" value and doesn't match "12:00" or "14:00". It also confirmed that the am/pm pattern catches "2 pm". The expected dates fall on the weekdays the prompts name (the tophat checked this too), and organizerLanguage is set only where a case needs it, which the test block pins.
Blocking (0): none.
Optional (2):
scripts/lib/eval-harness.test.ts:530: theev_046wrong-reply test exercises the am/pm pattern but not"0?2:00". Adding a slot whosetidis02:00would prove the second pattern catches a 12-hour reading too.evals/magic-compose/dev-evals.json:893:questions.options_must_mention_anymatches whole words, sofikatandfikabrödadd something beyondfika. Fine as is.
Earlier threads: none. Copilot couldn't review because its quota is used up.
Checks: CI is green on1540950(lint-type-test, e2e, CodeQL). The tophat passed on this same SHA, with no runtime code changed since. I ran the regex check above locally.
Why it waits for the owner: the PR's "Before merging" section asks you to run pnpm eval:magic-compose --tag=swedish and pnpm eval:mcp --tag=swedish. #993's "Done when" needs one run on the default model in the PR, and pipeline sessions have no LLM_* settings. Please post the per-case results. A case that fails on a reasonable draft points at the case, not the model. Nothing a person using OpenSignup sees changes, so this isn't UX.
https://claude.ai/code/session_016YZ9SSzefoeQzGxKJcBDEa
Generated by Claude Code
Evals: all five Swedish cases passRan on
Totals: Magic Compose 15/15 cases (96 checks, 0 failed); MCP 6/6 (36 checks, 0 failed). No LLM or parse errors. A pointless column the checks don't catch (not blocking): in all three Magic Compose runs of Caveat: this was only the default model. Flash already follows most rules without help, so these cases pass here as regression guards. They don't yet show how weaker or open-weight models handle Swedish. |
Address: nothing to change in this PRThanks for the eval run. All five cases pass, so that covers the "Before merging" request and #993's "Done when".
https://claude.ai/code/session_016YZ9SVJQ59MJzrJtGaSUDD Generated by Claude Code |
|
Approved by the owner at The branch is behind https://claude.ai/code/session_016YZ9SSnMjoyJ4iWMXTbyJg Generated by Claude Code |
|
Approved by the owner at https://claude.ai/code/session_016YZ9SVevLZEeujMHvBCKMc Generated by Claude Code |
Fixes #993.
The problem
dev-evals.jsonhad one Swedish case (ev_042), a Swedish description from an organizer with no language set. Nothing covered an organizer whose language is Swedish, Swedish dates and times, Swedish column names, the questions flow in Swedish, or an English description that only mentions Swedish words. Magic Compose's output varies by run and model, so this needs eval cases rather than a review.The fix
Five cases in
evals/magic-compose/dev-evals.json, all taggedswedish(pnpm eval:magic-compose --tag=swedish), using checks the harness already has:ev_046A Swedish organizer's knytkalas (organizerLanguage: sv): Saturday 11 December 2027, "kl. 11–14", 2 salads, 3 mains, bread, dessert. Expects Swedish, a date field, no English column names (item,date,time), 11:00, one slot per dish with its count as capacity, and noam/pmor02:00anywhere in the output (a 12-hour reading of "14").ev_047Volunteer shifts: "tre pass på 2 timmar varje dag, två volontärer per pass" over two days, 10–16. Expects 6 slots of capacity 2 at 10:00, 12:00 and 14:00 on both dates.ev_048A fika list over a range of Saturdays: "alla lördagar från 24 april till 29 maj 2027". Expects the six Saturdays exactly, one family each, no groupBy.ev_049Too vague to draft (organizerLanguage: sv): "Fikalista till klassen". Likeev_040("Snack sign up"), expects questions about when, not what, with an option naming fika and none in English.ev_050An English description naming Swedish things (organizerLanguage: sv): a midsommar picnic with sill. Expects an English draft that keeps sill, even though the organizer's language is Swedish.Every date the cases expect is written in the prompt with its year; I checked each weekday.
The evals README now says 50 cases and lists the new ones under regression targets.
Decisions the issue didn't make
ev_049checks words, notlanguage_must_be. The likely reply is a single option, "Fika", which holds no marker word of any language, solanguage_must_be: svwould fail a right answer. It checks that an option names fika (fika,fikat,fikabröd) and none uses English (snack,coffee,bring, …) instead. I added no marker words.ev_050setsorganizerLanguage: sv. With an English organizer the case would pass whatever the language rule said; a Swedish organizer is what tests that the description's language wins. That meanseval:mcpskips it, as it doesev_045.ev_047andev_048set noorganizerLanguage, soeval:mcpruns them and shows whether a connected assistant handles Swedish shifts and date ranges too.Tests
scripts/lib/eval-harness.test.tsgains a block forev_046–ev_050. For each case, a plausible right reply passes every check, and a wrong one fails exactly the checks it should: English column names, then "11am to 2pm" (ev_046); a row per volunteer (ev_047); a missing 1 May (ev_048); English options, and a draft instead of questions (ev_049); a Swedish draft that translated the items (ev_050). It also pins which cases setorganizerLanguage.prompt.test.tsreads the file and still passes, so no prompt repeats a worked example.pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test(244 files, 3473 tests).Before merging
The evals have not been run. The issue asks for one run on the default model with each new case's result in the PR, but this session has no
LLM_*settings. Please runpnpm eval:magic-compose --tag=swedish(andpnpm eval:mcp --tag=swedish, which runsev_047andev_048) and post or paste the results. A case that fails on a reasonable draft points at the case, not the model, and is worth a follow-up.https://claude.ai/code/session_016YZ9SWUV56YS8FjT8Ki8XH
Generated by Claude Code