feat(wordlist): novice-readiness Phase 7 — one word-list parser everywhere, Search needs a list, normalize keeps letters #87
<!-- greptile_summary -->
<h2><a href="https://app.greptile.com/api/retrigger?id=87650754"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img alt="Retrigger" src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2" align="right"></picture></a><a href="https://app.greptile.com/apacorp/github/apassuello/crossword-helper/-/pull/87"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img alt="View in Greptile" src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2" align="right"></picture></a>Confidence Score: 5/5</h2>
[High impact] The PR appears safe to merge; the previous removal issue is fixed and no new blocking issues were found.
<h3>Summary</h3>
The PR makes word-list reads agree, requires a selected list for Search, and changes the default normalize rule to keep folded letters.
<!-- greptile_confidence_score:5 -->
<sub>Reviews (2) · Last reviewed commit: "fix(wordlists): an add keeps the line th..." · Reviewed by Greptile</sub>
<a href="#"><img alt="P1" src="https://greptile-static-assets.s3.amazonaws.com/badges/p1.svg?v=9" align="top"></a> Returned words cannot be removed
load() now returns CAFE for a stored CAFÉ;50, but remove_words() still compares the requested word against the original spelling before ;. An API client that reads the list and sends {"remove_words": ["CAFE"]} gets a successful response, yet the word remains. The same mismatch affects comma-scored lines.
Make removal use the shared parser and canonical spelling while keeping untouched lines as written.
<a href="https://app.greptile.com/ide/claude-code?prompt=This%20is%20a%20comment%20left%20during%20a%20code%20review.%0APath%3A%20backend%2Fdata%2Fwordlist_manager.py%0ALine%3A%2083%0A%0AComment%3A%0AReturned%20words%20cannot%20be%20removed%0A%0A%60load%28%29%60%20now%20returns%20%60CAFE%60%20for%20a%20stored%20%60CAF%C3%89%3B50%60%2C%20but%20%60remove_words%28%29%60%20still%20compares%20the%20requested%20word%20against%20the%20original%20spelling%20before%20%60%3B%60.%20An%20API%20client%20that%20reads%20the%20list%20and%20sends%20%60%7B%22remove_words%22%3A%20%5B%22CAFE%22%5D%7D%60%20gets%20a%20successful%20response%2C%20yet%20the%20word%20remains.%20The%20same%20mismatch%20affects%20comma-scored%20lines.%0A%0AMake%20removal%20use%20the%20shared%20parser%20and%20canonical%20spelling%20while%20keeping%20untouched%20lines%20as%20written.%0A%0A---%0A%0AFor%20each%20issue%20above%2C%20determine%20whether%20it%20is%20valid%20and%20should%20be%20fixed.%20If%20so%2C%20fix%20it%20directly.&repo=apassuello%2Fcrossword-helper&pr=87&platform=github"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixInClaudeDark.svg?v=7"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/FixInClaude.svg?v=7"><img alt="Fix in Claude Code" src="https://greptile-static-assets.s3.amazonaws.com/badges/FixInClaude.svg?v=7"></picture></a>
@greptile
Valid, fixed in 4d6ff89 (spec 0.2.14, 68dbb7c). add_words and remove_words now identify a line by line_key (backend/core/wordlist_reader.py): WordList.canonical_word of the word parse_line returns, the same rule load reads with. Removing CAFE drops a stored CAFÉ;50, GRAPE drops grape,40, and a removal drops every stored line with that key. add_words had the same raw key, so adding CAFE beside CAFÉ;50 (or APPLE beside apple,50) wrote a second line that load hid. It now keeps one line, the one the list shows. Lines that a removal does not touch stay as written.
While testing, an add's rewrite also turned a skipped STRAßE into a valid STRASSE ("ß".upper() is "SS"). Fixed in 68b6115: a line whose key uppercasing would change is written as given. And review found that "keep the first" could keep a line the parser rejects (GRAPE;abc) over a later valid GRAPE;40, dropping GRAPE on an unrelated add. Fixed in 7c31489: the kept line is the first one parse_line accepts.
Tests: TestEditsKeyOnTheFoldedWord in backend/tests/unit/test_wordlist_manager_shared_parser.py, red against the old key before each fix.
apassuello
Novice-readiness Phase 7: word lists and CLI. This implements spec §4 items 1–3 (
docs/superpowers/specs/2026-10-23-novice-readiness-design.md, now 0.2.14) as plan Tasks 7.1–7.7 pin them, plus 7.8–7.8c for the review fixes.What changes for a user
CAFÉ→CAFE,NAÏVE→NAIVE, fullwidthCAT→CAT. A word that still holds a non-A–Z letter after the fold (STRAßE,ÆON,BJØRN, Greek) is skipped with reasonnot letters only. One parser now serves the solver (fill,pattern, resume), the upload preview, theme-word matching, Verify, Clean and the Lists panel (backend/core/wordlist_reader.py). Before this, Verify and Clean had their ownsplit(";")loops, so they disagreed with what Autofill would place, and the Lists panel showedNAÏVE,40as one word.CACHE_VERSION = 2). Such a cache falls back to the text list with a warning untilbuild-cacheis re-run.Select at least one word list, and Enter sends nothing.POST /api/patternand/api/pattern/with-progressanswer an explicitwordlists: []with 400NO_WORDLIST, so the CLI's built-in demo list can't be reached from the API either. An absent key still means["comprehensive"].normalize's default rule keeps letters only (§4 item 3):Hello, World!→HELLOWORLD,naïve→NAIVE,Straße→STRASSE, no letters →"". The named rules are unchanged.Owner rulings recorded in the spec (2026-10-25)
NO_WORDLISTon the pattern routes; §8 PD-L7 ruled as written.normalizeuppercases withstr.upper(), soß→SS. This deliberately differs from the word-list parser, which skipsß.ßintoSS.Behaviour changes worth knowing
data/wordlists/themed/foreign_words.txtno longer load (CŒUR, SŒUR, ŒIL, ŒUVRE, ŒUFS, SŒURS):Œhas no NFKD decomposition, the same class asÆ/Ø. No other tracked list loads a different word (measured in Task 7.1).WordListManager.loadraises on a list it can't read whole, as before; Verify and Clean keep their skip-and-continue.cleanup_old_states' DST fix came from #86 and is not part of this diff.Verification
Each gate was run alone and in sequence, all rc 0:
pytest,pytest -m slow,bash scripts/docs-check.shandbash scripts/check-guards.sh --full-treeatdf8db43;npx vitest runandnpm run buildat8fd21e5(nothing after it touchessrc/). After the rebase ontomain,docs-checkandcheck-guards --full-treepass again, and the pre-push hook re-runspytestand vitest on this tree. After 7.8–7.8c, at7c31489, each alone, all rc 0 / no failures:pytest(2333 passed),pytest -m slow(90 passed),docs-check,check-guards; nothing after8fd21e5touchessrc/. Every task's test was written first and failed at its own assertions, and a reverting mutation was checked. Evidence is in the per-task reports.Browser check (Chrome, servers from this branch): Search enabled by default; unticking the last list disables it and shows the hint; Enter sends no request; re-ticking sends
POST /api/pattern/with-progressand shows results. Over HTTP:[]→ 400NO_WORDLISTon both routes, unknown name → 400UNKNOWN_WORDLIST, absent key → results.Issues
Closes #51: its remaining items were Verify/Clean's loaders and
WordListManager, and all three now read throughWordList.parse_line. The list edits follow (spec 0.2.14):add_wordsandremove_wordsidentify a line by the folded word the list shows (line_keyinbackend/core/wordlist_reader.py), so removingCAFEremoves a storedCAFÉ;50, addingAPPLEto a file holdingapple,50keeps one line, an add no longer rewrites a skippedSTRAßEas a validSTRASSE, and it keeps the valid line when a malformed one (GRAPE;abc) shares its word.Issue 57: items 1–3 (L11, SR4, CLI-normalize) are settled here. Item 4 (TH4, theme placements) is not part of this PR, so 57 stays open.
Not changed (recorded, not filed)
/fill/with-progress,verify-words,cleanand resume still acceptwordlists: []./fill/with-progressthen runs the CLI with no list, so Autofill searches the demo list. Only the API can reach this: the Autofill panel disables Start with the same hint. Owner default: unchanged.fill's explicit theme entries (theme_entries_dict) place letters unfolded.list_states' displayed age has the same one-hour DST error #86 fixed in cleanup.