Native LightRAG role models: extraction, keyword, query and vision each
resolve their own model, vision indexing pins a vision-capable model
instead of silently degrading, and a knowledge base records which models
and which embedding built it. A published index refuses queries after its
embedding identity changes rather than searching a foreign vector space,
and a rebuild is confirmed against the configuration it will actually
use — a stale confirmation is rejected instead of quietly rebuilding
something else. A failed publication is withdrawn, not left half-written.
PDF attachments follow the parsing engine configured for the workspace,
report the stage they are in, and a truncated answer says it was
truncated with the counters that prove it. Providers are no longer
filtered out of the embedding picker on an unverifiable capability guess:
configure the model and test it. Visualize's temperature and token budget
are settings rather than literals. Notebook evidence no longer depends on
the chat session that produced it.
See assets/releases/ver1-6-10.md for the full notes, and the README
translations for the propagated prose.
Ship folder-based workspaces and data migration, daily practice, redesigned
provider and model settings, and streaming conversation improvements.
Synchronize README translations and document the archive/permanent-delete
upgrade behavior in assets/releases/ver1-6-9.md.
Reduce initial JavaScript by deduplicating English resources and loading
animation features after hydration. Keep the existing route size budgets.
Update regression fixtures and browser audits for scoped URLs and the new
settings and learning interfaces.
Security/correctness:
- Stop leaking diagnostic answers: persist a _sanitize_diagnostic() snapshot
(drops top-level answers + inline answer keys) into progress.diagnostic,
which is returned verbatim by the /progress endpoints. Grading is unaffected
(authoritative answers live in LearningStore).
- _safe_json_parse + generate_from_notebook now use the shared fence-stripping
parse_json_response instead of bare json.loads, so the common fenced/lightly
-malformed LLM output is recovered instead of silently dropped / 500'd.
Decoupling:
- unified_ws change_module: move module lookup + PRETEST reset into
LearningService.switch_module(); router keeps only the WS ordering
(module_changed before cancel) and no longer imports learning.models.
- unified_ws check_active_turn: use new public TurnRuntimeManager
.has_live_execution() instead of reaching into _lock/_executions.
- redo endpoint: LearningStore.clear_questions() instead of poking _questions_path.
- remove unused StreamEventType.USER_INPUT enum; document the WS message types.
Stability:
- LearningStore: question read-modify-write (save_question_answers/_meta),
delete(), and clear_questions() now hold _cas_lock — consistent concurrency
model; _atomic_write_text cleans up its temp file on failure.
Cleanliness/clarity:
- router: shared _validate_book_id() (9 endpoints) + _parse_modules()
(init/replace); _classify_error drops unused expected_answer param.
- guided_learning: hoist logging/RAGService imports + module logger; move tuning
constants to class top; ContextVar declared after imports.
- storage: hoist json import (7 inline copies removed).
- pocketbase_store: move _VALID_ID/_validate_id below the import block.
- rename misleading mastered_pct -> avg_mastery_pct (service + web consumers).
Frontend:
- learning [bookId] page uses lib fetchProgress (apiFetch -> auth redirect)
instead of a raw credentials fetch; track/clear the retry + auto-advance
timers on unmount; drop dead currentStage state + ModuleTree prop.
- learning-api: remove orphaned submitAnswer + AnswerRequest.
- CreateModuleDialog: use the static bookApi import; reset manualBookId to ''
to match initial state; learning list page: stop shadowing the t() translator.
Conflict-resolution carryover: dropped the PR's incidental 300s factory timeout
(kept dev's stream runner).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Rename passRate variable to masteryPercent in ModuleTree to match average mastery semantics
- Remove module name requirement from CreateModuleDialog (only KP count matters)
- Sync i18n strings for updated validation message
- 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
Issue #2: Add knowledgePointsLabel locale key for standalone label usage
instead of reusing number-suffix key ('个知识点' → '知识点').
Issue #3: Delete 9 empty auto-generated test modules cluttering /learning
page (retain 'default' with 3 modules and 'init3').
Issue #4: Default manual book ID to empty string instead of 'manual'
to avoid leaking implementation detail to users.