160 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
e81f9c866d fix(mastery): save a standalone reference answer for qualitative practice 2026-11-15 01:00:14 +08:00
Bingxi Zhao (Frank)
be4f36c166 fix(mastery): normalize option arrays and clarify grading evidence
Local dev repairs for #2687, #2691. Regression checks cover reported symptoms and compatibility boundaries.
2026-11-15 00:44:09 +08:00
Bingxi Zhao (Frank)
461093db5f Merge PR #2657: fix: register fresh mastery questions across conversations
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).
2026-11-14 23:11:02 +08:00
Bingxi Zhao (Frank)
b1054a2517 Merge PR #2626: fix(mastery): register choice answer by exact option body 2026-11-14 22:58:02 +08:00
Bingxi Zhao (Frank)
ef44b97564 Merge PR #2651: fix(mastery): keep an issued question gradable after its KB is re-indexed (#2650) 2026-11-14 22:58:02 +08:00
Bingxi Zhao (Frank)
97b3d41084 Merge PR #2510: fix(mastery): stop tutoring-memory retries from growing every turn 2026-11-14 22:58:01 +08:00
Bingxi Zhao (Frank)
a76c661bd6 Merge PR #2614: fix(tools): keep web_search/web_fetch mounted in exclusive knowledge turns 2026-11-14 22:52:57 +08:00
maxsheng215-cyber
8f96d48bad fix: register fresh mastery questions across conversations 2026-11-12 16:34:05 -08:00
Benjamin Schwing
2ba6b5d75c fix(mastery): keep an issued question gradable after its KB is re-indexed (#2650)
A pending quiz card stores the source snapshot it was verified against,
including a fingerprint of the whole published KB index. Adding any
document to that KB changed the fingerprint, so every grade failed with
"Prepare the lesson again" - which refreshes only the lesson packet,
never the card - and the learner's answer could not be recorded.

An issued question is now bound to the pages it cites: when the index
changed but each cited page (KB, document, page, source digest) is still
published unchanged, the question validates and is graded. If a cited
page did change, the error says so and names the recovery tools.
Lesson packets and question issuance keep the strict whole-index check;
objective, answer-key and scope gates are unchanged.
2026-11-12 16:49:56 +00:00
JohnnnSinaaa
c4e50815ac test(mastery): cover body-based expected_answer registration 2026-11-11 02:40:01 -08:00
AleFlyX
c26140abf3 fix(explore): bound the pre-pass connection as well as its reads
Opening the response stream was still unbounded, so a provider that hangs
while connecting parked the turn the same way a mid-stream stall did. The
answer loop bounds both halves (agent_loop.py:886 pairs the create() call with
the same _STREAM_IDLE_TIMEOUT_SECONDS the reader uses); mirror that here.
2026-11-11 18:33:25 +08:00
AleFlyX
13164c8200 fix(explore): bound the pre-pass stream so a stalled CLI cannot park a turn
ContextExplorer._call_llm iterated the provider stream with a bare
``async for``. A provider that connects and then stops yielding frames left
that await pending forever, so ``pre_loop`` never returned, the capability
never finished, and the turn stayed ``running``. The lease kept renewing, so
TurnRecoveryService saw a live owner and never claimed it; only an explicit
cancel freed the turn.

The answer loop already bounds its own reads (``_bounded_stream_chunks``,
90s), but the pre-pass runs before that loop starts, so it never inherited
the bound. Give it the same watchdog: on idle, raise
LLMProviderTransportError, which the existing ``except Exception`` around
``_run_loop`` turns into the single-pass briefing fallback.

Refs #2539 (the third attempt left ``running`` is a separate, pre-existing
bug, not the empty-error-message one this session's other PR fixes).
2026-11-11 18:24:57 +08:00
Harsh
f76de28db9 fix(mastery): count the whole memory request against the history plan
The fold loop counted only each exchange's archive text and always folded
the oldest exchange, so one exchange over the plan was sent whole, and
prior learner memory could push a fitting exchange over it.

Fold the longest prefix of whole exchanges whose complete request fits:
prior memory, the system instruction and the exchanges as _summarize()
serializes them, plus a reserve for the length line. If even the oldest
exchange doesn't fit, send no memory call; the watermark stays and the
exchange stays in exact recall.
2026-11-11 11:32:20 +05:30
evan188199-tech
9782043ab3 fix(tools): keep web_search/web_fetch mounted in exclusive knowledge turns
Exclusive knowledge capabilities (obsidian, marginnote4, subagent) dropped
the whole chat built-in surface, including web_search (still shown on in
settings) and the always-on web_fetch. Add a coexisting_tools declaration
to KnowledgeCapability (default empty; the product KBs declare the web
pair), honoured in compose_enabled_tools' exclusive branch under each
tool's usual gate (user toggle / always-on / conditional flag) and the
partner builtin_whitelist, mirroring the #650 KB coexistence. The
capability's system prompt now also names what actually mounted via
coexisting_tools_block, so the model no longer disclaims mounted tools.

Fixes #2612

Signed-off-by: evan188199-tech <238371241+evan188199-tech@users.noreply.github.com>
2026-11-11 11:18:04 +08:00
Harsh
4ddaf9c0aa fix(mastery): stop tutoring-memory retries from growing every turn
A failed tutoring-memory call keeps the watermark, so the next turn
retried with the same backlog plus the newest exchange, and the call
grew without limit (#2496). Fold in only the oldest whole exchanges
that fit one history plan, at least one, and leave the rest
unsummarized so the watermark moves only past what was covered.

Related to #2496
2026-11-07 10:40:37 +05:30
Bingxi Zhao (Frank)
f7041045f3 Merge #2430 visual placeholder handling on the shared tool schema contract 2026-11-06 02:04:52 +08:00
Bingxi Zhao (Frank)
8bda305a43 Merge #2415 from maxsheng215-cyber 2026-11-06 01:56:26 +08:00
Bairan Zhang
a9705b3cc7 fix(mastery): read a source-less placeholder visual as absent
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.
2026-11-04 20:38:45 +08:00
我也有友人账
7b5390ffe0 fix: retry mismatched mastery assessment quotes 2026-11-03 14:46:55 -08:00
x-labb
15c79b4356 fix(mastery): stop retrying a truncated tutoring memory on every turn 2026-11-02 18:44:34 +01:00
Bingxi Zhao
5f5f189c36 Merge pull request #2137 from nandanadileep/oss-harness/issue-2073
fix: Mastery Path re-poses a question the learner already answered correctly (fallback to the one source-verifiable item
2026-10-31 18:59:28 +08:00
Bingxi Zhao
e2625fcd57 Merge pull request #2170 from maxsheng215-cyber/fix/codex-optional-tool-arguments
fix: preserve optional Codex tool arguments for mastery quizzes
2026-10-31 18:28:02 +08:00
Bingxi Zhao
13b63a44f6 Merge pull request #2210 from Rimcat-JA/fix/side-chat-blank-answer-by
fix(turn): accept a blank answer_by so "Ask Dito" side chats start
2026-10-31 17:50:31 +08:00
Bingxi Zhao (Frank)
083a9c9b72 fix(mastery): scope duplicate evidence to exact source and objective 2026-10-31 16:56:13 +08:00
Eapp1e
de8b935df3 fix(capabilities): escape LIKE wildcards in the MarginNote store
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>
2026-10-30 17:40:50 +00:00
Rimcat-JA
f5b288912d fix(turn): accept a blank answer_by so "Ask Dito" side chats start
The web client restates answer_by on every turn and sends "" when Dito
answers (sideChatTurnConfig, QuizFollowupContext). TurnRequest only
accepted an omitted value or partner:/subagent:, so every Dito side chat
failed with "Command does not match the turn protocol."

Read a blank value as None. The field stays in fields_set, so
to_payload() still carries it and the stored hand-off is cleared as the
client intends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 01:49:07 +09:00
我也有友人账
d24648d5ed fix: preserve optional Codex tool arguments for mastery quizzes 2026-10-29 11:42:59 -07:00
Bingxi Zhao (Frank)
e495fd6002 Merge origin/dev and reconcile creation contracts and replay tests 2026-10-29 18:13:47 +08:00
Bingxi Zhao (Frank)
01d7c0ed55 feat: add conversational creation drafts and refresh local dev UI 2026-10-29 18:11:52 +08:00
nandanadileep
7c98b9c1b0 fix: refuse restating a correctly answered mastery 2026-10-28 23:36:28 +00:00
Frank-zhu2000
9a04808c33 fix: follow the OS theme until the user picks one
The first visit stored the detected palette and never listened for
prefers-color-scheme changes, so the theme stopped tracking the OS and
Settings had no System choice.

Do not write that fallback. Subscribe while the preference is missing or
"system", and add a System option in Appearance. New accounts default to
system so Apply does not freeze the snow palette.
2026-10-28 16:31:49 +08:00
Bingxi Zhao (Frank)
9aadac3e3b merge: integrate current dev with modular installation 2026-10-28 01:23:48 +08:00
Bingxi Zhao (Frank)
fbab59acbf feat: modularize installation and enforce feature dependency boundaries 2026-10-28 01:02:29 +08:00
Bingxi Zhao
90cc9349be Merge pull request #2051 from cgycorey/fix/mastery-revise-inactive-arguments
fix(mastery): read idle placeholder arguments as omission (#2047)
2026-10-28 00:19:46 +08:00
Bingxi Zhao
be11014b94 Merge pull request #2085 from ZealerG/fix/mastery-history-prefix
fix(mastery): keep shared history prefixes stable for prompt caching
2026-10-27 23:59:53 +08:00
Bingxi Zhao
995567d453 Merge pull request #2090 from nandanadileep/oss-harness/issue-2075
fix: Exact-substring quote check rejects faithful citations (line breaks/markup differ), so mastery_quiz fails repeatedl
2026-10-27 23:58:26 +08:00
Bingxi Zhao
c663700aeb Merge pull request #2000 from drakeo338/claude/1993-fix
fix(mastery): show the picked option's text next to its letter in the grade seed
2026-10-27 23:57:51 +08:00
Bingxi Zhao
b0ae5ede22 Merge pull request #2016 from KKandLL-Forever/fix/solve-plan-respects-replan-budget
fix(solve): refuse a second solve_plan so replans stay budgeted
2026-10-27 23:57:12 +08:00
Bingxi Zhao (Frank)
ef04a48a92 Merge remote-tracking branch 'origin/dev' into HEAD 2026-10-27 22:05:45 +08:00
Bingxi Zhao (Frank)
2e1972f4b1 Merge remote-tracking branch 'origin/dev' into HEAD 2026-10-27 21:41:28 +08:00
Bingxi Zhao (Frank)
e9968b8e2d Merge remote-tracking branch 'origin/dev' into HEAD 2026-10-27 21:41:12 +08:00
Bingxi Zhao (Frank)
aa33202c07 Merge remote-tracking branch 'origin/dev' into HEAD 2026-10-27 21:40:05 +08:00
Bingxi Zhao (Frank)
4205da1651 Merge remote-tracking branch 'origin/dev' into HEAD 2026-10-27 21:39:47 +08:00
Bingxi Zhao (Frank)
6cb3d53677 fix: preserve mathematical meaning when validating citations 2026-10-27 21:39:14 +08:00
Bingxi Zhao (Frank)
241fe27398 Merge remote-tracking branch 'origin/dev' into HEAD 2026-10-27 21:36:54 +08:00
Bingxi Zhao (Frank)
e347c0c2e0 fix: preserve tutoring replies and stabilize preview runtime
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.
2026-10-27 17:58:46 +08:00
nandanadileep
b824e69bb0 fix: normalize quote matching in mastery source 2026-10-27 06:41:59 +00:00
ZealerG
d82f3191c0 test(mastery): cover stable history request prefixes 2026-10-27 13:32:56 +08:00
Bingxi Zhao (Frank)
bf024d85d1 fix(ci): refresh preview route and locale contracts 2026-10-27 01:52:06 +08:00
Bingxi Zhao (Frank)
6bbcc00c55 Merge dev into preview, preserving preview features
Integrate dev fixes with preview's Python/TypeScript schedulers, chat queue, learning navigation, and live turn persistence.
2026-10-27 01:16:58 +08:00