fix: MPS-24 auto-suggest — way more clusters, stop missing 'holiday'
Operator: '100 suggested tags is not enough, we need way more — missing holiday holidays'. Two separate 100 caps in lib/tag_suggest.py: - DESCRIPTION_TOKEN_CAP 100 -> 400: long teaching-resource descriptions truncated cross-cutting words like holiday/holidays/ seasonal before they were ever counted, so those clusters never surfaced (verified: neither word is a stopword; season/seasonal/ valentine only appear in comments, not ENGLISH_STOPWORDS). - DEFAULT_TOP_N 100 -> 500: a 481-product catalogue has valid niche groups ranking past the old cut. The min_products / max_share / min_title_share filters already strip noise, so a high ceiling surfaces the long tail without resurfacing junk. - views/shop.py ?top_n= clamp 500 -> 5000 for operator headroom. Both caps stay bounded (deduped unique tokens / no unbounded query — CWE-407-safe). Test: +test_deep_description_word_surfaces_after_cap_raise (word past the old 100-token cap now clusters). 1137 passed. Docs: CLAUDE.md Phase 2, mps-24.md Phase 2.8k.
This commit is contained in:
parent
68a1309c83
commit
2301ab33cc
5 changed files with 75 additions and 10 deletions
|
|
@ -363,6 +363,20 @@ Tests (`test_functional.py::TestProductTagsSpa`):
|
|||
Deferred (occasional click, not the hot path): AJAX-ifying the
|
||||
"Suggest categories" link — still a full navigation by design.
|
||||
|
||||
**Phase 2.8k — auto-suggest: way more, stop missing `holiday`**
|
||||
(shipped 2026-05-16): operator: "100 suggested tags is not enough, we
|
||||
need way more — missing holiday holidays". Two `100` caps in
|
||||
`lib/tag_suggest.py`: `DESCRIPTION_TOKEN_CAP` 100 → **400** (long
|
||||
teaching-resource descriptions truncated cross-cutting words like
|
||||
`holiday`/`holidays`/`seasonal` before they were ever counted —
|
||||
verified neither word is a stopword) and `DEFAULT_TOP_N` 100 → **500**
|
||||
(481-product catalogue had valid groups ranking past the cut; the
|
||||
min_products / max_share / min_title_share filters already strip
|
||||
noise, so a high ceiling surfaces the long tail safely). `?top_n=`
|
||||
URL clamp raised 500 → 5000 for headroom. Both caps stay bounded
|
||||
(deduped unique tokens / no unbounded query — CWE-407-safe). Test:
|
||||
`test_deep_description_word_surfaces_after_cap_raise`.
|
||||
|
||||
**Phase 2.8j — drop redundant tag-detail header** (shipped
|
||||
2026-05-16): operator: remove the tag title + "← All products" from
|
||||
the top of the tag SERP. With the always-on chip strip (active
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue