An endpoint that makes optional properties required forces the model to
send visual even for a text card, with every source left blank.
prepare_visual always rejects an unnamed source, so mastery_quiz failed
on every call and no answer card appeared (#2427).
Treat a visual whose sources name no knowledge base, asset, path, hash
or figure as absent, for single cards and group leaves, as #2170 does
for blank resume ids and empty groups. A visual naming any source still
goes through prepare_visual unchanged.
mastery_assess returned mastered and next but no instruction, unlike
mastery_grade. After a passing explanation the tutor tended to end the
turn on an announcement of the next topic, leaving the learner nothing
to answer.
Add an instruction to the final mastery_assess payload: when mastered,
confirm briefly and continue with next in the same reply (or say the
path is complete); when not mastered, explain the gap and ask again.
The clarification (non-final) result is unchanged. One matching sentence
in the en/zh mastery loop prompt.
Fixes#2323
When mastery_assess asks for clarification, keep the explanation for that
objective in the session. The next assessment grades the earlier explanation
plus the clarification instead of the short reply alone.
Fixes#2249
search() and linked_objects() fed the caller's text straight into a LIKE
pattern without an ESCAPE clause, so "%" matched every object, "_" matched
every object with a character, and linked_objects("100%") also linked the
object that stores 1000.
Escape the value once and declare ESCAPE '\' on every clause, matching
the other LIKE call sites in the repository.
Signed-off-by: Eapp1e <163811520+Eapp1e@users.noreply.github.com>
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.