4 Commits

Author SHA1 Message Date
Rudy Celekli
ff39562d73 fix(mastery): resolve a module name fragment to the most specific match
resolve_module returned the first substring match in iteration order, so
"Limits and Continuity chapter" resolved to a shorter "Limits" module
that is a substring of it, sending the hand-off card to the wrong lesson.
Pick the match whose name length is closest to the phrase instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-11-02 00:03:01 -05:00
Rudy Celekli
3008c58ef4 fix(learning): resolve 'lesson N' by rank, not 0-based order value
resolve_module matched a learner's 1-based 'lesson N' against the module
'order' field with int(module['order']) == position. But order is stored
0-based (topic_generation uses order=len(modules); service and
outline_revision number with enumerate from 0), so 'lesson 1' matched the
module whose order is 1 — the second lesson — and every lesson but the last
resolved one too high, sending the learner's hand-off card to the wrong lesson.
Take the Nth module by rank in the order sequence instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-26 10:36:59 -04:00
Bingxi Zhao (Frank)
2ad1d45d18 fix(mastery): stop a review session offering to start the topic it is teaching
Clicking "start review" opened a session whose first reply was a card
offering to start a session on that same topic. Clicking it opened another,
which offered the card again — one conversation per click, all on one topic,
some bound to no topic at all (#1412). Those conversations begin with nothing
to quiz against, so they answer in prose; that is the other half of the same
report (#1411).

The generator is a premise the tool states as fact. `mastery_new_session`
stays mounted inside a mastery session on purpose — sending the learner to a
*different* topic mid-course is a real thing to want — and its hand-off
instruction tells the model not to tutor the topic here, because "the mastery
tutor picks up on the other side". Inside that topic's own session there is no
other side, and nothing in the tool's result said so, so the model kept
proposing the trip it was already on.

The turn knows which topic it is tutoring; the tool did not. Binding it the
way the mastery tools already get `_mastery_path_id` lets the tool answer for
itself: a hand-off aimed at the topic this conversation *is* gets refused, with
the instruction to teach the lesson here. A hand-off to any other topic is
untouched, and so is `mastery_open_session` — returning to an older
conversation on the same topic is not a loop.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 02:02:53 +08:00
Bingxi Zhao (Frank)
93df3d48b7 release: v1.6.4
Ship lighter isolated runtimes, richer Books and Mastery flows,
Reading/session polish, and explicit model API capabilities.

Release notes: assets/releases/ver1-6-4.md
2026-09-03 01:38:54 +08:00