Prepare v1.7.3 notes for reading and book editing, expanded provider and
agent connections, learning records, model streams, and desktop upgrades.
Sync README prose and 11 translations, archive older release notes, and
update the package version. Resolve release lint/type blockers with explicit
parser and capability contracts, compatible Book call forwarding, accurate
auth task types, and quoted SQLite schema identifiers. Cover positional Book
calls and quoted legacy columns; align KB seed tests with visible retrieval
failure reporting. Keep HTTP fixtures independent of host proxies and translate
new Portuguese UI copy.
Release notes: assets/releases/ver1-7-3.md
Update the status contract for session_id and prove concurrent retries in a fresh session create only one card while retaining the archived question (139 passed).
The reserved-name filter closed the injection path, but the revision branch
still fell back to the public `answer` parameter when `_learner_message`
was absent. `answer` is model-authored, so a tool call without the trusted
key could replace a committed learner reply and credit mastery for text
the learner never typed.
Reproduced on the previous head: commit a help request, grade it
(`is_correct: null`, `final: false`), then call with only
`answer="photosynthesis"` — `is_correct: true`, mastery 0.5, and
`user_answer` rewritten.
Revision now requires `_learner_message`. Without it the stored answer
stands and the call re-grades as ungraded, which costs no credit and
rewrites nothing. This guard existed earlier on this branch and was lost
when the schema layer was removed; the regression test is restored with
it.
Note this is the same defect the reviewer reported on the first commit,
which means removing the schema work also removed the protection that had
been added to answer it. Worth remembering when cutting scope: verify what
each removed commit was actually guarding.
Source selection asks for at most 1800 output tokens and grading for 2200.
Reasoning models count hidden reasoning against max_tokens. On a real course
page set, nvidia/nemotron-3.5-super-vl (OpenRouter) stopped with
finish_reason=length in 5 of 5 runs after spending all 1800 tokens on
reasoning, so the reply had no JSON and preparation failed with "invalid
source-selection response". The #2367 retry lowers reasoning_effort to "low",
which this model does not honour: on a small probe it reasoned more, not less,
and in the app the retry failed the same way.
Raise both caps to 8192. Replaying the same request with an 8000-token cap
finished in 3 of 3 runs (2.4k-4.1k reasoning tokens), and full preparation
then completed for 4 of 4 objectives. max_tokens is a ceiling, so models that
answer briefly are unaffected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a free-text mastery question, a learner's "I don't get it, explain"
was judged ungraded and stored as the interaction's user_answer. Every
later mastery_grade call then preferred that stored reply over the
learner's actual answer — the judge rejected the same help request again
as ungraded, and the question could never be cleared. The gate sat at
mastery 0.0 until the tutor called mastery_skip_question itself.
The committed user_answer is authoritative on purpose: the pause/resume
boundary stores the learner's exact words, and a later model round must
not paraphrase them. It stops being authoritative once the learner has
said something else *and* the stored reply was never ruled on. Revise
through the existing record_question_answer path, which rewrites
user_answer and keeps the superseded attempt in the event log as
assessment.revised.
A repeated, empty, or whitespace-identical reply is not a revision, and
a group interaction is excluded: its child questions keep their own
per-leaf revisable logic.
This is the free-text half of #1004, which only covered choice cards.
Closes#2595.
A visual whose source resolved but whose pixels were never in the model
input was still registered. Grade and correct then failed closed, and only
void could clear the card. Refuse that visual before registration, and tell
a correction of an already stored card to void it.
Fixes#2494
Co-authored-by: markxu <markjoin123@users.noreply.github.com>
Prepare Lesson parsed the model reply with json.loads after stripping
only a leading code fence. Reasoning models add <think> blocks or a
prose preface, and at high effort can spend the 1800-token budget on
hidden reasoning, so every attempt failed as an invalid source-selection
response. Assessment requests share the same parser.
Strip closed <think>/<thinking> blocks, treat a reply that still opens
with reasoning as unanswered, and scan for the first JSON object with
JSONDecoder.raw_decode. Truncated JSON still fails instead of being
repaired into a partial object. When the reply is unusable, retry once
at RETRY_REASONING_EFFORT, the project rule in structured_retry, for
both lesson preparation and semantic assessment.
Fixes#2367
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Builds on the clarification handling from #2261. After a final partial
grade the learner usually sends only the missing part, which was then
graded alone and found partial again, so answers split over several
messages could alternate between partial grades without ever passing.
Keep the graded explanation pending after a final partial, with the same
session/objective scope and TTL as a clarification request, so the next
explanation is graded together with it. Pending explanations are now
dropped when the path moves on after them (a final assessment of any
objective, a deferral, a question on another objective, a reset or
revision); ordering uses event ids instead of timestamps so the partial
that records the request does not cancel it. A pass or an incorrect
grade still ends it, and a retried turn replays its saved verdict.
Refs #2249
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
Combine same-module imports in the restatement test and collapse the
dict comprehension so CI ruff check/format pass.
Co-authored-by: Nandana Dileep <nandanadileep@users.noreply.github.com>
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>
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.
mastery_revise accepted one module per call, so a coordinated outline
adjustment across several modules cost one call, one transaction and one
full-outline snapshot echo per module. Add a modules=[{module_id,
rewrite, add, remove}, ...] form that validates every entry against a
shared id space, refuses the whole request on any rejection (unknown
ids, mastered waypoints, cross-module cycles), and commits all modules
in a single revision with one result payload. The single-module form
keeps its exact contract and payload shape.
Bind original visual sources and keys to supported tasks; verify accepted model pixels, preserve cues/assistance and canonical attempts, keep uncertainty ungraded, expose challenge/repair, and separate required visual evidence from generic text mastery.
The repair-integrity test answered a hardcoded label, so whenever the
shuffle parked the wrong-key body on that same label the grader agreed
with the answer and the fixture flaked (CI Python 3.12 red while 3.11
and 3.13 stayed green on one commit). Read the rendered label of the
true statement off the persisted card instead — the registered wrong
key follows a different body and can never collide with it, so the
assertion is deterministic under any permutation.
Co-authored-by: multica-agent <github@multica.ai>
Models register the correct option first almost every time, and the
registration order is exactly what the answer card renders — so quiz
after quiz read A = correct.
Shuffle the options at mastery_quiz registration, after validation and
echo stripping: bodies stay unique, labels are re-issued positionally,
and the expected answer follows its body to the new label, so the
interactive card and the deterministic grader keep comparing the same
representation. Mastery-tools tests now assert through option bodies
instead of registration order.
Co-authored-by: multica-agent <github@multica.ai>
Combine knowledge bootstrap coverage and preserve later progress-isolation tests, native notebook tooltip, and locale-aware tool-hint fallback. Regenerate frontend contracts and align test fixtures with merged APIs.