Quiz check: fix before handing over, with an independent second review
All checks were successful
Verify and publish V2 container / build-and-push (push) Successful in 29s

- The check can rewrite a whole question (garbled or contradictory stems,
  missing data, two defensible answers); a key fix that changes nothing is
  skipped.
- Removed questions are replaced with new ones, so a 50-question quiz stays 50.
- A second, independent model call reads the whole quiz for badly written
  items, helped by a scan for leftovers such as "A 78 kg? No - an 80 kg".
- The quiz is checked again after any rewrite, replacement or open problem,
  up to three rounds, before it is handed over.
- Reviewers see full rationales (a shortened one is marked as shortened).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Elijah 2026-11-16 10:07:32 -07:00
parent 85d5c9186d
commit 1a212bb8ba
8 changed files with 412 additions and 26 deletions

View file

@ -522,6 +522,10 @@ export default function DraftPage() {
function noteTone(note: string): 'good' | 'neutral' | 'warn' {
const checked = /^Checked with Python[^:]*: (\d+) of (\d+) checks passed/.exec(note);
if (checked) return checked[1] === checked[2] ? 'good' : 'warn';
if (/^Question \d+( removed|: (answer|type|topic))/.test(note) && !/not applied|incomplete|does not exist/.test(note)) return 'neutral';
// Fixes the check applied (in any round), and removed questions it replaced, are routine.
if (note === 'Second review: no problems found.') return 'good';
const fix = note.replace(/^Round \d+: /, '').replace(/^Second review: /, '');
if (/^Question \d+( removed|: (answer|type|topic|rewritten))/.test(fix) && !/not applied|incomplete|does not exist/.test(fix)) return 'neutral';
if (/^\d+ removed questions? (was|were) replaced/.test(fix)) return 'neutral';
return 'warn';
}