test_load_credentials_parses_session wrote a hard-coded expiresAt of
1791055241000 (2026-10-03 15:40:41 UTC) and asserted is_expired() is
False. Once that instant passed the assertion flipped, so the test now
fails on every Python version for every branch.
Derive expiresAt / refreshExpiresAt from time.time() so the fixture
always describes a live session, and assert against the value written.
The option shuffle (#1691) re-renders every choice question with a fresh
option order, so a question or explanation that names a letter can
contradict the card the learner is actually looking at. Tell the model
in the en/zh mastery loop prompts that the order it sends is shuffled
before the learner sees the card, and that question and explanation must
reason about the answer's content, never its position.
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>
Register FutureInfra as an OpenAI-compatible gateway provider (env FUTUREINFRA_API_KEY, base URL https://futureinfra.ai/v1/ai, alias future_infra) with tests mirroring the Cheaper Inference provider.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two quiz submit paths still called crypto.randomUUID() directly, which
exists only in secure contexts. Over plain HTTP (LAN box, VPS without
TLS) the call throws inside the click handler before the request is
staged — the save silently never happens. PracticeSession already mints
ids via lib/random-uuid for exactly this reason; switch the two
remaining call sites to the same helper:
- BooksRoute recordQuizAttempt (book page quiz blocks)
- ReadingExtensionBar submitReadingQuizAnswers (reading quiz answers)
The Telegram converter protected code with ```[\w]*\n?([\s\S]*?)```,
so an info string such as c++ left "++" as the first code line, a ~~~
block was formatted as prose ("# setup" lost its hash, __init__ became
bold "init"), and a ```` fence showing a ``` example closed at the inner
fence, leaving an empty <pre> and the example leaking out as text.
Replace fenced blocks line by line first: open on ``` or ~~~ and close
on a bare run of the same character that is at least as long. One-line
```code``` and unclosed fences keep the previous regex handling. The
streaming preview strips fences through the same helper.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
split_markdown_by_headings remembered only the fence character, so any
line starting with that character toggled the fence. A ```` fence showing
a ``` example closed at the inner ```, and a "```py" line inside a block
also closed it, so "#" lines inside code became outline sections, or the
rest of the document was swallowed and the outline fell back to flat.
Remember the whole opening run and close only on a bare run of the same
character that is at least as long, as CommonMark does. A backtick line
whose info string contains a backtick no longer opens a fence.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add bilingual page pairing and language variant alignment for web sources:
- Detect page language variants via hreflang alternate links and URL language prefix patterns.
- Record pairing relations in durable SQLite repository and KB web-source metadata.
- Expose pairing relations via GET /api/knowledge-bases/{kb_name}/web-source/{source_id}/pairings and WebSourceInfo.
- Display bilingual pairing indicator in the KB web sources section with localization across en, zh, de, fr, uk.
- Add targeted tests for pairing detection, repository persistence, and API exposure.
Co-authored-by: multica-agent <github@multica.ai>
Sibling pages of a page seed now count as internal: /intro/home seeds
/intro/*, so nav-relative links on docs sites are no longer dropped.
A root URL still scopes the whole host, and a trailing-slash seed stays
scoped to its own directory.
Derived with pure URL-path rules instead of pathlib: Path("/intro/")
.parent is "/", which would silently widen a section seed to the entire
host, and WindowsPath renders "\" separators that break prefix matching.
Adds regression tests for sibling scope, root scope, cross-directory
rejection, and directory-index scope.
Co-authored-by: multica-agent <github@multica.ai>
_scan_entry treated every double quote as the start of a quoted value,
even inside a braced one. An accent such as {\"u} in
author = {M{\"u}ller, Hans} therefore opened a "quoted" run that swallowed
the entry's closing brace, and the whole entry was silently dropped from
the converted bibliography. Only treat a double quote as a delimiter at
the entry's top level, as BibTeX does.
sendReadingToNotebook posted to /api/reading/workspaces/{id}/notebooks,
but the backend only registers POST /api/reading/workspaces/{id}/notebook
(capture_reading_to_notebook), so saving a reading workspace to a notebook
always failed with 404 Not Found. Point the client at the real route and add
a test that checks the path against the generated OpenAPI contract.
web_search() fetched max_results results from the provider but built
the AnswerConsolidator with its default max_results=5. For providers
without their own answer, the template and LLM consolidation kept only
the first five results, so a search profile set to 6-10 results still
gave the model five sources while the footer reported all of them.
Pass the resolved max_results to the consolidator.
The question bank list hides entries whose session is in the recycle
bin, but question_bank_stats, list_question_bank_materials and
list_categories still counted them. The filter chips, material chips and
category badges then reported entries the list could not show.
Share one NOT EXISTS fragment between the list filter and the three
count queries so they apply the same rule.
Moving a chat to the recycle bin hides it from the session list, but
history search still matched it: the SQLite search condition and the
PocketBase search filter only excluded imported sessions, not soft-deleted
ones. Search results (and the total used for paging) therefore included
chats the user had already deleted.
Exclude rows with deleted_at set in both stores, matching list_sessions.
A restored chat becomes searchable again.
Document workspace knowledge-base moves, connected Kiwix archives, source
figures, and the Task Board in the release notes and README. Sync all eleven
README translations and the version badge. Fix lint-only type annotations and
a duplicate French locale key found by the release gate.
See assets/releases/ver1-6-12.md for the full release notes.