* fix(mastery): grade within the objective's covered and own scope
- Reuse the preserved objective-scoped packet for an objective request
after a focus preparation replaced the live slot, and do not rebuild
an incomplete objective packet whose fingerprints are unchanged (#2363).
- mastery_assess grades a concept/design explanation against the covered
facets of an incomplete objective packet, records that scope, and
returns a structured coverage_gap result instead of a bare refusal.
- Tell the learner when an answer was not recorded or was graded only
against the covered part.
- Give the judge sibling objectives as out of scope and return the
single missing element with a next_step to ask for exactly it (#2364).
* test(mastery): cover the focus-only assessment deadlock from #2905
A complete focus-scoped packet with no assessment slot gets a structured
coverage_gap on every repeated mastery_assess, with no judge call and no
recorded evidence. One objective preparation then grades the retained
explanation together with the next reply.
Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
* fix(mastery): make the missing-element step the assess instruction
Since dev added a generic instruction to every final mastery_assess
payload, a non-passing verdict carried two competing moves: next_step
asked for exactly the named missing element (#2364) and instruction
asked the learner to explain the objective again. While the gate is not
cleared, the targeted step is now also the instruction, and it says to
record the reply with mastery_assess.
Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
* fix(mastery): say when an unclear explanation is kept for grading
A non-final verdict in a session keeps the explanation and grades it
together with the follow-up, so the generic "not recorded, progress
unchanged" notice misled the learner into repeating the whole answer.
Add an assessment_needs_clarification notice (en/zh) for that case; an
explanation outside a session keeps the not_recorded notice.
Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
* fix(mastery): preserve the missing assessment element on replay
---------
Signed-off-by: Benjamin Schwing <63053132+BenjiAvH@users.noreply.github.com>
Co-authored-by: Qiuner <wdst3635@163.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.
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.
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.
Replace no longer reuses positional IDs for unrelated waypoints, invalid
questions can be voided or re-keyed, and defer advances the route without
faking mastery.
Fixes#1527
Co-authored-by: Cursor <cursoragent@cursor.com>
Ship a content workspace you choose, one exec tool for every language,
Mastery Path modes that gate its tools, and Settings that grades
readiness instead of listing faults.
Release notes: assets/releases/ver1-6-5.md
Partners stop being a deployment-wide admin resource and become
per-user: three nested rights (manage / use / neither) replace the
blanket admin gate on the router, each member can build and own their
own, and every person's conversations with a partner stay private to
their account. Grants keep working and now offer only admin-managed
partners. Channel runtime state moves from one directory per channel to
one per partner — copied, not moved, and only when its owner is
unambiguous — so two partners can finally run the same channel.
Around that: a knowledge base can track GitHub repositories and re-sync
their Markdown (#903); Antigravity CLI joins My Agents now that Gemini
CLI is retired (#828); personal WeChat signs in from a QR code drawn in
the browser instead of the server log (#951); a chat account can be
linked to a DeepTutor account with /link; containers re-apply the extras
they declare instead of losing them at compose down (#762); and
`deeptutor doctor` answers whether a workspace is ready to run (#959).
Reliability, largely from community PRs: embeddings survive a
rate-limited provider through key rotation, a retry budget and a global
throttle (#962); MinerU parsing and code execution work on Windows
(#844, #964); indexing fails bounded instead of hanging (#946); MinerU
page-layout blocks stop being indexed as content (#949); voice uploads
carry a MIME the transcription API accepts (#945); and reasoning effort
can be overridden per conversation (#641).
Release plumbing: notes in assets/releases/ver1-5-17.md, v1.5.13
archived, __version__ 1.5.17, README Releases row and all eleven
translations synced.
Two defects found by the release gate and fixed here:
- Six partner routes — the four channel-onboarding endpoints and both
WeChat QR endpoints — kept the _auth-only mount they had inherited
from the blanket admin gate, so any signed-in account could start a
QR login for someone else's partner and write a bot token into its
channel config. All six now declare _MANAGEABLE, and a sweep test
asserts no {partner_id} route is left ungated.
- A configured api_key became `str | list[str]` when key rotation
landed, but ten call sites pass it somewhere that takes one key; a
list would have rendered into an Authorization header verbatim.
keypool.primary_api_key reduces at each boundary.
Gates: pre-commit (all 15 hooks), ruff check + format, pytest
5276 passed, web 605 node tests, docs build.
A mastery attempt reached the bank as a bare right/wrong, reviewable
only as a score. mastery_quiz now takes both fields, held server-side
like expected_answer so neither leaks onto the card being answered, and
the sync writes them through. An unrecognised difficulty is dropped
rather than rejected — a mislabelled badge must not cost the learner a
question.
When LLM evaluation fails in feynman_check, the user's explanation text
is now saved to progress.feynman_explanations[kp_id] instead of being
lost. Cleared on successful evaluation. New field: feynman_explanations.
- Add stage_failure_counts/stage_failure_notes to LearningProgress for persistent failure tracking
- Wrap RAG retrieval with 10s independent timeout in _call_llm_impl
- Add _call_llm_with_timeout (default 60s) and _call_llm_with_degradation (bounded retry + skip)
- Apply degradation to all 12 stage handlers with stage-specific fallback paths
- Extract _run_interactive_quiz_loop shared helper for practice/practice_quiz
- Extract StructuredStageContent component from page.tsx
- Add TypeError to JSON parse except clauses across 7 files
- Simplify _record_attempt_and_update_mastery to single save exit
- Move import logging to module top in service.py
LearningProgress model_config changed from extra="allow" to extra="ignore"
to reject unknown fields (P1-9). All stage handlers now guard against empty
modules to avoid wasted LLM calls (P2-1). list_progress returns
{summaries, errors} instead of silently swallowing load failures (P2-3).
P1-9, P2-1, P2-3
- Add modules.length, moduleSelected, currentModuleId to connect() useCallback deps
- Add version field to LearningProgress and CAS save to LearningStore
- Cancel active turn before change_module (await task completion)
- Clear pending auto-advance timer on module_changed event
- Add PRACTICE_QUIZ stage between Feynman Check and Error Diagnosis
- Generate 5-10 practice questions per module, record attempts but don't gate mastery
- Fix auto-advance race: move stagesRef updates outside React setState callbacks
- Fix stale handleStreamEvent closure via ref pattern
- Fix PLAN stage permanent deadlock when modules not initialized
- Clear error state unconditionally on new stage_start
- Add cancelStreamingTurn to sidebar and chat page for proper cleanup
- Fix cancelStreamingTurn to handle missing turnId gracefully
- Keep empty page_ids refs for whole-book resolution in guided learning