Skip to content

fix: reject out-of-curriculum attempts to keep learning profiles clean - #40

Merged
llinsss merged 1 commit into
DogStark:mainfrom
vrickish:vrick_issue_22
Aug 31, 2026
Merged

fix: reject out-of-curriculum attempts to keep learning profiles clean#40
llinsss merged 1 commit into
DogStark:mainfrom
vrickish:vrick_issue_22

Conversation

@vrickish

Copy link
Copy Markdown
Contributor

Closes #22

What does this PR do?

  • Adds boundary validation to POST /api/v1/attempt: the word, theme, and every phonics tag must match the canonical curriculum word bank
  • Rejects fabricated attempts with HTTP 422 before they can pollute the learning profile (words, theme_preferences, phonics_struggles)
  • Canonicalizes accepted word/theme to their normalized lowercase form before storage so profiles never accumulate duplicate-casing entries
  • Adds regression tests for each boundary rejection plus canonicalization
  • Updates log-privacy probes to use a canonical curriculum word
  • Documents the new attempt request contract in the README

## Closes DogStark#22

### What does this PR do?
* Adds boundary validation to POST /api/v1/attempt: the word, theme, and every phonics tag must match the canonical curriculum word bank
* Rejects fabricated attempts with HTTP 422 before they can pollute the learning profile (words, theme_preferences, phonics_struggles)
* Canonicalizes accepted word/theme to their normalized lowercase form before storage so profiles never accumulate duplicate-casing entries
* Adds regression tests for each boundary rejection plus canonicalization
* Updates log-privacy probes to use a canonical curriculum word
* Documents the new attempt request contract in the README
@llinsss
llinsss merged commit 90c9db2 into DogStark:main Aug 31, 2026
2 of 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.

Make the word bank authoritative for learning-event metadata

2 participants