Skip to content

test(editor): verify mastery slider end to end on editor-saved packs (#36) - #67

Merged
cchacs merged 2 commits into
mainfrom
pullfrog/36-mastery-slider-e2e-verification
Oct 10, 2026
Merged

cchacs merged 2 commits into
mainfrom
pullfrog/36-mastery-slider-e2e-verification

Conversation

@pullfrog

@pullfrog pullfrog Bot commented Oct 10, 2026

Copy link
Copy Markdown

What

Verifies the mastery slider works end to end on an editor-saved pack, closing issue #36 (sub-issue 4/4 of #3).

The editor authors per-phrase tiers (src/tiers.js — "Simplify phrase at cursor"), the save path writes them to each phrase's on-disk levels[] (_repopulate_phrase_levels, from #33), and feedBack core's highway consumes them — static/highway.js _rebuildMasteryFilter picks one level per phrase from the master-difficulty slider. Core owns that consumer, so this suite mirrors its semantics (phraseLevelTiers / phraseLevelIndexForMastery / _rebuildMasteryFilter) and drives the mirror over the save path's real output — exactly what lands in a saved .feedpak.

Acceptance criteria covered

  • (1) A pack with an authored tier renders a strictly smaller note set as the slider drops; chords/anchors pair with their level (test_authored_tier_changes_the_rendered_note_set, test_cascade_ladder_keeps_every_derived_rung_distinct).
  • (2) A pack without authored tiers keeps today's behavior — every slider position renders the same chart; a freshly added (un-simplified) phrase saves an empty ladder and is skipped by core, leaving the rest of the pack unchanged (test_untiered_pack_shows_the_same_notes_at_every_slider_position, test_fresh_phrase_with_empty_levels_contributes_nothing).
  • (3) Documentation no longer claims the slider is a no-op: the new [Unreleased] entry describes the verification, and the 1.4.3 note is amended so its no-op framing is scoped to the version it described.

A mirror-lock test pins the ported mapping against the contract core documents next to the function (full ladder == floor(mastery * n) when max_difficulty is n-1, sparse-ladder band coverage, positional fallback on malformed ladders, and the intentional divergence when a ladder's top tier sits below max_difficulty). A mutation check confirmed the tiered-pack tests fail when the save path's authored-tiers branch is disabled.

Tested

  • python3 -m pytest tests — 502 passed, 5 skipped
  • npm test — 400/400 pass
  • npm run lint — 0 errors, 3 pre-existing warnings (baseline)

No product code changed. Manual host-side check documented in the suite docstring: Alt+P a phrase, save, load in the host, drag the master-difficulty slider.

Pullfrog  | View workflow run | via Pullfrog | Using big-pickle (free) | 𝕏

Comment thread tests/test_mastery_filter_e2e.py Resolved
@kilo-code-bot

kilo-code-bot Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • tests/test_mastery_filter_e2e.py - 0 issues. The only change adds a trailing newline to line 360, resolving the previously reported W292 finding. No new issues introduced.
Previous Review Summary (commit 1526d41)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 1526d41)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
tests/test_mastery_filter_e2e.py 360 New file is missing a trailing newline at end of file (diff shows \ No newline at end of file; pycodestyle W292)
Files Reviewed (2 files)
  • CHANGELOG.md - 0 issues (entry placement under [Unreleased]/Fixed verified; 1.4.3 amendment accurately scopes the historical no-op claim and quotes it correctly)
  • tests/test_mastery_filter_e2e.py - 1 issue. All 360 lines verified against the real save path: the ported mirror (_level_tiers / _level_index_for_mastery / _visible_at) is mathematically consistent with routes.py _repopulate_phrase_levels / _authored_phrase_levels / _phrase_tiers_by_difficulty / _flat_phrase_levels (window slicing, top-tier rebuild from flat slice, wire-shape note conversion, empty-tiers fallback), and every asserted note/chord/anchor set matches the actual output of those functions. Frontend claims in docstrings (tiers: [] on fresh phrase, cascade derivation, floor refusal) verified against src/input.js:1000 and src/tiers.js.

Fix these issues in Kilo Cloud


Reviewed by free · Input: 60.1K · Output: 1.7K · Cached: 136.7K

@cchacs
cchacs merged commit f823a42 into main Oct 10, 2026
6 checks passed
@cchacs
cchacs deleted the pullfrog/36-mastery-slider-e2e-verification branch October 10, 2026 09:06
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