Keep learner-facing explanations visible across finish checks, persistence, and replay. Remove mastery prose heuristics and prioritize learner objections.
Coordinate service shutdown and descendant cleanup, and preserve video lesson identity and playable results across chat completion and reload.
Remove course pages, APIs and the course_study capability. Add anchored note
threads and reviewed learning-block generation, queued and withdrawable chat
messages, quote attachments, side chats, and the calendar/favorites/navigation
updates.
Keep preview's existing backend architecture. Wire the new features through
its Python application and existing chat engine, retain legacy selected-text
requests, persist mid-turn messages in replay, and restore note context when
regenerating. Leave stored user data intact.
Validate frontend contracts, dependency boundaries, types, 1290 node tests,
840 rendered tests, lint, localization and the production build. Exercise
session/notes/API regressions, 53 chat-engine tests and 20 Python/native
integration tests with isolated runtime data.
A provider that normalises optional properties into required ones leaves the
model no way to leave a field out, so a preview arrived with `preview_id: 0`,
`module_order: []`, `module_id: ""` and empty edit arrays beside the edits it
did intend. Every one of those was read as a real instruction: the preview
answered "Use preview_id only with action commit." before planning, an empty
`module_order` asked for a reorder no path can satisfy, and a commit carrying
blank edit fields was refused for edits it never made. A blank `action` hit the
same wall from the other side.
Read the revision arguments as omission at the tool boundary, one level deep —
a nested `prerequisite_ids: []` still clears a relationship — and read a blank
`action` as the omitted action, which is the documented direct-revision path.
An empty `module_order` now means "keep the order unchanged": no path can
satisfy an empty order, and this replaces the earlier refusal of `[]` alone,
which a required-field provider sends on every content-only preview. Advertise
`null` plus a minimum of 1 for `preview_id`, so a strict provider has a genuine
absence value instead of a placeholder.
Five new regressions in tests/capabilities/test_mastery_reviewed_revision.py
went red first. A 19-case adversarial matrix over both branches loosens only
the placeholder forms: commit with real edits or a real order, a stray positive
preview id, an unknown action and blank entries nested inside `modules` are
refused identically before and after. 29 pass in the file; 1733 across the
capabilities, learning, tools and agentic-guard suites.
Mastery paths previously scheduled with one fixed interval template per knowledge type, which did not fit exam cramming, language drilling, science review, or learner-specific pacing.
Add four built-in strategy presets and custom per-round interval templates with validated persistence, CRUD, duplication, and path bindings. Bound paths keep a frozen strategy snapshot, replay durable evidence when switching, and mastery tools follow the bound path scheduler.
Expose strategy management in the mastery review trail, including custom interval editing and loading, empty, busy, invalid-input, and error states. Regenerate the OpenAPI contract and add focused backend and web regression coverage. Legacy paths without a binding continue to use the previous default scheduler.
SolvePlanTool always replaced the session's plan, so calling it again
wiped finished steps and skipped the max_replans gate, which only
solve_replan consults. Once a turn has a plan, solve_plan now returns
plan_exists with the current progress and points the model at
solve_replan; the session is left untouched.
Closes#2015
The card can show the options in a different order than the tutor
registered them, so the bare letter in the "(they answered "D")" seed
pointed at a different option in the tutor's context than on the
learner's screen.
build_grade_result now carries the picked option's text as learner_body,
and the loop's grade seed appends it to the letter.
Add rich text and learning blocks, media uploads, page trees, and revisioned notebook storage. Present AI suggestions at their target blocks with durable accept and dismiss actions.
Unify saved outputs as Favorites with typed expandable blocks, stable source links, atomic batch insertion, nesting, dragging, and undo/redo.
Validation: 99 frontend tests and 99 backend tests pass in an isolated snapshot, along with TypeScript, scoped ESLint, dependency architecture, and locale parity checks.
solve_finish_step folds the finished step's tool chatter, and the same cut
dropped the solve_plan result and the step's own `next` pointer, leaving the
model only "[S1] ... — done.". Pass SolveSession.progress_text() as the
checkpoint state so every fold keeps the current plan (done / next / todo) in
view, including after a replan, and the persisted model turn carries it into
follow-up turns.
Closes#1968
The exploring pre-pass re-read the same attached source on every turn -
39,627 characters, byte-identical across six turns - but put the
per-turn question first in the user message, so the longest shared
prefix with the previous request ended a handful of tokens in and the
whole re-read missed cache. That call ran 24,778 prompt tokens for
1,024 cached (4.1%), which is most of the misses in a turn.
Split the message the way the answer loop already splits everything
stable from everything per-turn: mode, manifest and the preloaded
source text go ahead of it and the question becomes the last message,
so the repeatable part is a byte-identical prefix across turns.
The preload stays capped (two sources, 120,000 characters) so a wide
manifest cannot spend the budget on its own; the document digest is
still the primary evidence path.
After both commits, on the same session: the exploration call runs
24,566 prompt tokens for 24,448 cached (99.5%), every call in the turn
reports first_change=append, and the turn reaches 94.0% cached, up
from 54.7%.