Varied question openers, readable rationales, plain practice score
All checks were successful
Verify and publish V2 container / build-and-push (push) Successful in 30s

- Stems no longer all open the same way: the writing rules, batch prompt and
  planner ask for varied openings (age openings stay part of the mix), and when
  one opener covers more than a quarter of a quiz the excess stems have only
  their opening reworded, keeping every number, before the check.
- Rationales are asked for as Markdown (a bold key point, then short bullets);
  older one-paragraph rationales are laid out the same way on display.
- The practice score in the quiz header is a plain "x/y correct", with no
  percentage or colour.
- Fix a flaky assertion: the mock's answer-key fix is a no-op when the shuffle
  already put the answer in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Elijah 2026-11-16 12:05:46 -07:00
parent 10be5c39da
commit 517278be71
15 changed files with 382 additions and 24 deletions

View file

@ -187,6 +187,17 @@ Settings → AI now has separate Planning, Writing, Python check and Second revi
Content generation (each inherits until set), and shared quizzes say what Practice and Exam
mean under the mode toggle.
Stems no longer all open the same way: the writing rules and planner ask for varied openings,
and when one opener ("A 72-year-old…") covers more than a quarter of a quiz, the excess stems are
reworded (opening only, every number kept) before the check. Age openings stay allowed as part
of the mix. Tests: `tests/openers.test.ts`.
Rationales are written as Markdown (a bold key point, then 2 to 4 short bullets). Older
one-paragraph rationales are broken up on display (`shared/rationale.ts`): the first sentence is
shown in bold, the rest in short paragraphs, and a walk-through of the choices becomes a list.
The practice score in the quiz header is now a plain "x/y correct" with no percentage or colour.
Tests: `tests/rationale.test.ts`.
Tests: `tests/revision5.test.ts`. Live check on the rev1 copy with DeepSeek flash: a visitor's
10-card set was written, named ("Heparin, Furosemide, and Dosage Calculations"), saved and
listed once with the New tag; cards were single facts with no hints. The rev1 copy's 401 was its
@ -195,7 +206,7 @@ stored DeepSeek connection still holding the old key; it was updated from `.env`
## Verification status
Baseline: 162 tests passed, TypeScript passed and production web/server builds passed.
Added six regression tests. Full `npm run check` passes: **281 tests** (generation steps, 2026-11-16; 280 after the check loop and second review; 274 after the fifth revision; 261 after share-link generation, 2026-11-15; 257 after the fourth revision; 247 after the third, 208 after the second, 181 on 2026-11-12), TypeScript
Added six regression tests. Full `npm run check` passes: **289 tests** (rationale layout, 2026-11-16; 285 after varied openers; 281 after generation steps; 280 after the check loop and second review; 274 after the fifth revision; 261 after share-link generation, 2026-11-15; 257 after the fourth revision; 247 after the third, 208 after the second, 181 on 2026-11-12), TypeScript
and both production builds. The Docker `test` stage runs the same 181 tests on Node 24. Tests were run with loopback access for the mock provider.
The earlier agent manually exercised quiz completion/results, flashcards, streak effects,