Skip to content

A wrong_translation report runs the validator - #916

Merged
mircealungu merged 2 commits into
masterfrom
wt/report-validates
Oct 25, 2026
Merged

mircealungu merged 2 commits into
masterfrom
wt/report-validates

Conversation

@mircealungu

@mircealungu mircealungu commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Roadmap 0c, step 2. Follows #914.

What happens on a report

  • Every night, tools/judge_word_reports.py --apply (ops crontab, 05:20) runs the validator on the wrong_translation reports without a verdict: from exercises, from the reader's "wrong meaning", and from "bad translation" in the remove dialog. The endpoints only file the report; the learner's word is skipped at once anyway.
  • The validator judges the meaning in the sentence the learner saw. This happens even when the meaning is already VALID. VALID meanings are otherwise never looked at again, which is how vil sige = mean and bud = bid stayed.
  • A reader report has no sentence of its own, so the learner's preferred bookmark is used.
  • A report is not_judged when there is no sentence, or when the word has already moved to another meaning.
  • A FIX or INVALID does what it does anywhere else: the meaning changes for everyone, and the learner moves to the corrected word.
  • The verdict goes on the report: outcome (valid / fixed / invalid / gave_up / not_judged), validation_log_id and judged_at.
  • When the validator doesn't answer, judged_at stays empty and the next night's run tries again.

validate_and_fix gets two optional arguments: bookmark (the sentence to judge in) and recheck (judge even a VALID meaning). Both are passed on when it moves to another sentence.

Deploy

  1. Migration 26-10-25-c--word_report_outcome.sql: adds 3 columns to a 47-row table.
  2. Deploy.
  3. Optional, before the cron's first run: tools/judge_word_reports.py without --apply lists the 14 old wrong_translation reports it will judge. Judging costs a few cents and may change meanings for everyone.
  4. Install the crontab (ops PR) so the nightly run starts.

Tests pass; the judge tests use a fake validator, so they never call the LLM.

🤖 Generated with Claude Code

Roadmap 0c, step 2. The validator judges the reported word in the sentence
the learner saw it in, even when the meaning was already VALID (a VALID
meaning is otherwise never looked at again). It runs in the background;
its verdict (valid / fixed / invalid / gave_up / not_judged) and the
validation_log row go on the report. A FIX does what it does anywhere:
the learner moves to the corrected meaning, the old one is INVALID.

tools/judge_word_reports.py judges the reports without a verdict: the 14
from before, and any the validator didn't answer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

ArchLens detected architectural changes in the following views:
diff

The learner's word is skipped on report anyway, so judging right away only
fixes the meaning for others a few hours sooner, at the cost of a thread per
report and a race with the skip. tools/judge_word_reports.py --apply runs from
the ops crontab instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mircealungu
mircealungu merged commit 285fe1a into master Oct 25, 2026
3 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.

1 participant