0112. Hide the motif tags EXP-0007 did not clear
Source:
docs/decisions/0112-hide-the-motifs-exp-0007-did-not-clear.md. Generated at build time; edit the source file.
Date: 2026-11-24. Status: accepted (lane hidetags, branch feat/hide-untrusted-motifs, issue #122). Builds on ADRs 0104, 0105, 0109 (Amendment 1) and ADR-R2-3. Ships as algo-3.0.0.
Context
Section titled “Context”EXP-0007 scored the production motif tagger against Lichess’s generated puzzle themes on 54,987 puzzle solutions (lab/experiments/EXP-0007/decision.md). By its registered rule (precision with a Bonferroni interval wholly above 0.80) it trusted fork (0.976), discoveredAttack (0.992), promotion (0.998), smotheredMate (1.000) and the five mate-length tags, and hid six: skewer (0.810, interval [0.778, 0.838]), backRankMate (0.606), hangingPiece (0.572), deflection (0.562), sacrifice (0.528) and pin (0.402, recall 0.201). matingNet has no Lichess theme and was not scored. Until #122 the product still named all sixteen: a motif.missed:<tag> and motif.allowed:<tag> series per tag, a motif_miss_rate:<tag> KPI row on the Tactics page, a timeline change (“Missed pins: emerging”), the tags of every exemplar in the CoachingInput, the chat’s find_examples and its positions’ tags, the coach’s glossary, and the trainer’s “Is it working?” pattern rates.
Decision
Section titled “Decision”- One allowlist,
coaching_input::motifs::PLAYER_VISIBLE_MOTIFS. Ten camelCase tags: EXP-0007’s nine trusted ones and the unscoredmatingNet, which keeps the status it had.PLAYER_VISIBLE_MOTIFS_SOURCEis"EXP-0007". It lives incoaching-inputbecauseprofile-core,profileandaiall depend on that crate and no other.backend/crates/coaching-input/tests/motifs.rsreads EXP-0007’sresults.jsonand fails unless the list is exactlydecisions.trustedplusunscored, and none of the six. - It is an algorithm component. The manifest names it (
profile.player_visible_motifs, with its source), soscripts/algorithm/check.mjsrequires a major bump whenever it changes. Clearing a tag after EXP-0019, EXP-0020 or EXP-0021 is one line in the list, the test’s source moving to that experiment, and a new major version. - Computed, never exposed. The tagger (
motifs/tag_line.rs), the storedmove_featureslines andcli lab tag-motifskeep all sixteen tags, so the arena and the follow-up experiments keep measuring them. Everything a player or the coach reads is cut at the profile:motif_missedandmotif_allowed(profile-core/src/weakness/detectors.rs) build series for visible tags only, so a hidden tag has noweakness_series_point, nomissedByMotifcount, no timeline row and noweakness.changedevent. The move still counts for W3 or W1.- The KPI catalogue has a
motif_miss_raterow per visible tag: 63 rows, not 69. - Rows stored before
algo-3.0.0are skipped where they are read:load_series_points, the CoachingInput’s timeline changes, the web’s area timeline (isPlayerVisibleSeries), a stored report’s new and fixed changes and their notes (report/load.ts), an exemplar’s tags on the weakness pages, the trainer’s pattern rates in Rust (pattern_found) and the web (store.ts), and a stored CoachingInput the chat reads (without_hidden_motifs: its hidden metrics, changes and tags). - An exemplar’s
tagsare its visible tags; a position whose only tags were hidden has none and still carries its move, its evals, its best line and its refutation. - The chat drops hidden tags from a position’s stored line tags, and
find_exampleswith a hidden motif finds nothing. Its tool description no longer offerspinorhanging_piece. - The coach’s glossary is regenerated as
core/glossary.v3.mdwithout the six; the report and chat sets use it. v2 stays for stored hashes. - The web reads the list from
algorithm/manifest.json, filters its KPI catalogue by it, and names a hidden motif series by the fallback Rust already had, “Missed tactics” (series_label) and “Allowed tactics”.
- Nothing else is hidden. W1 (“Leaving pieces hanging”) is a weakness rule on the refutation’s material, not the
hangingPiecetag, and stays. A blunder stays a blunder with its eval swing and the best move.
Options considered
Section titled “Options considered”- Stop computing the six tags. Rejected: EXP-0019 to EXP-0021 measure them, and the arena compares every version on EXP-0007.
- Hide them only in the web. Rejected: the coach reads the CoachingInput, the glossary and the chat’s positions, and a timeline event would still reach the weakness-change prompt.
- The list in
profile-core, typed asMotifTag. Rejected:aidoes not depend onprofile-core, and a second copy for the chat would be two lists to keep equal.MotifTag::is_player_visiblereads the one list. - Hide
matingNettoo. Not adopted: EXP-0007 found no evidence against it, and #122 names the six. It has no ground truth either way; an experiment that scores it is the way to settle it.
Consequences
Section titled “Consequences”- The release arena against
algo-2.0.0finds no clear difference on any of EXP-0001’s 3, EXP-0002’s 2 and EXP-0007’s 31 metrics: the hidden tags are measured exactly as before, and nothing ranked or calibrated was built on them. The replay goldens lose every row of the six tags (112 of 435 series points, 234 of 2,964 KPI snapshots, 45 of 195 timeline rows). - Players who had a “Missed pins” row or change see it go on their next page load, stored reports included; the moves behind it stay in “Missing a short tactic” and “Leaving pieces hanging”. A change note queued before the upgrade may still be written, but its change is never shown, so neither is the note.
- Every rebuild after the upgrade deletes the stored timeline rows of the hidden series (the history is replaced for the current detector version); until then the readers skip them.