Repository navigation
Integrate reviewed community contributions since v1.7.1 - #2466
Merged
Merged
Conversation
…K's limit msvcrt's LK_LOCK gives up with EDEADLK after about ten seconds, and a worker importing a large legacy store holds the lock longer than that. Retry on EDEADLK so the other workers wait, as flock does on POSIX; any other lock error still propagates.
… limit msvcrt's LK_LOCK gives up with EDEADLK after about ten seconds, and a one-time upgrade of a large session database can hold the lock longer than that. Retry on EDEADLK so the other workers wait, as flock does on POSIX; any other lock error still propagates.
…ode sample
_parse_quiz_payload swapped the reply for the body of its first ``` fence
before parsing anything. The quiz FINISH schema asks for a bare JSON object
whose `question` is Markdown and whose coding answer is code, so that fence
is usually a code sample inside a string value. The parser decoded the
sample instead, got {}, and the question was lost: after one repair round
that hit the same parser, the learner got "[Generation failed] <topic>"
with N/A as the answer and the explanation.
Take a reply that is one complete JSON object as it is first, the order
parse_json_response already uses for the same case (#825). Wrapped replies
still go through the fence; when a fence inside a field cuts the wrapper's
body short, the first object in the whole reply is used instead.
Removed legacy-peer-deps option from npm ci command.
Override vulnerable ASAR dependencies and extend desktop shell checks to macOS runners. Co-Authored-By: GPT-6 Astra <noreply@openai.com>
mapMarkdownProse closed a fenced code block at any later line whose fence marker matched, including lines that carry an info string (```tex inside a ```text block). Per CommonMark a closing fence has no info string, so such a line is code content, not a close. Closing early let the block's remaining content run through prose normalization — e.g. a documented \(x+y\) example became $x+y$ — which is exactly what this helper exists to prevent. Require an empty info string before treating a line as a closing fence, matching the sibling fence trackers in reading-outline.ts and think-segments.ts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
markdown_to_anki_html took the whole span between the opening and closing backtick runs as code, so a fenced block's info string (its language) became the first line of the rendered code. ```python\nprint(1)\n``` exported as <pre><code>python<br>print(1)</code></pre>, putting a stray "python" line inside every language-tagged code card. Start the code body after the opening fence line's newline, matching how a fenced code block is defined. Fences without an info string, and single-line spans with no newline, are unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
In the interactive chat REPL, `/notebook add <ref>` passed the ref straight to _parse_notebook_refs, which raises typer.BadParameter on an empty notebook id (e.g. `/notebook add :`). The REPL loop does not guard the _apply_command call, so the exception propagated out and terminated the whole session — while every other command (bad /config, unparsable shlex input, etc.) just prints a notice and keeps the session alive. Catch BadParameter at the `/notebook add` site, print the message, and continue. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The LightRAG index probe reported doc_count=None for every native-layout index. _lightrag_doc_count read kv_store_doc_status.json from the version root, but native LightRAG keeps its KV stores under a deeptutor_<hash> workspace subdir; every other reader (has_output, failure_summary, document_error) resolves that subdir via storage._store_root first. Move the count into the storage module as a public doc_count() that resolves the store root the same way, and have index_probe delegate to it. A ready native index now reports its real count instead of None, so the KB version list, last_indexed_count and linked-folder probe stop falling back to a raw-file guess. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
parse() swallowed a `[^token]` that was part of an entry's text. The new-bullet regex matched trailing markers as `[^...]` (any non-`]` run), so prose ending in a footnote-like token (e.g. "footnote syntax is [^note]") was absorbed into the markers group and dropped, breaking the documented `parse(serialize(d)) == d` contract. Because the token label failed to resolve, the text was silently truncated and, once the entry also carried a real ref, its markers were mangled too. serialize() emits integer labels exclusively, so narrow the inline-marker pattern to `[^<digits>]`. Non-integer footnote-like tokens now stay in the text where they belong; real numeric citation markers still parse (including the legacy compact `[^1][^2]` form). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
_migrate_legacy_tutorbot used the raw legacy directory name as the new partner_id. Every other creation path slugifies the id with slugify_partner_id, because ids ride in /partners/<id> URLs and must be ASCII/URL-safe. A legacy bot whose directory name is non-ASCII (e.g. a CJK name) was therefore migrated under an un-slugged id, leaving it unreachable — the "Partner not found" symptom in #2166. Slugify the id, keeping the display name and soul_origin provenance as the original. Migration stays idempotent across the old layout: an entry already migrated under either its slug or its raw name is skipped. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
_is_tool_format_error classifies a 400 so a non-streaming tool call can fall back to streaming (e.g. DashScope Coding Plan rejecting malformed tool arguments). It tested every marker with `kw in text`, but one marker, "invalid.*parameter.*function", is a regex: as a substring it only matches text that literally contains ".*", which no error body does, so that marker was dead and the "invalid ... parameter ... function" shape it was added for never triggered the fallback — the tool turn hard-failed instead. Search that marker with re.search while keeping the two literal markers as substring checks. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
markdown_to_docx matched _..._ anywhere, so prose mentioning an identifier like
snake_case_word was exported with "case" italicized and the surrounding
underscores dropped ("snakecaseword"). Per CommonMark, _ only opens or closes
emphasis at a word boundary (unlike *, which may emphasise intra-word).
Guard the _ emphasis branch with word-boundary lookarounds, matching the
pattern already used for Anki export in deeptutor/notes/anki_export.py.
Word-bounded _italic_ is unchanged.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… name is_response_format_unsupported gates every marker behind an explicit "response_format" mention. But its own docstring lists DashScope's rejection — "'json_object' is not supported by this model" — which names the value, not the parameter, so the guard returned False and the graceful drop-response_format-and-retry never fired; the JSON call hard- failed instead. Let the value-specific markers (json_object, json_schema, the response_format.type messages) stand on their own, and keep the generic "unsupported"/"not valid" markers gated behind the response_format mention so an unrelated unsupported-parameter error (e.g. stream_options) still does not strip response_format. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
`notebook add-md` and `replace-md` read the file with read_text(encoding="utf-8"), so a markdown file in another encoding (e.g. a Windows-authored cp1252/latin-1 file) aborted the command with an uncaught UnicodeDecodeError traceback instead of the clean CLI errors these commands raise for other problems. Read the bytes and decode through FileTypeRouter.decode_bytes, the shared fallback-encoding chain the rest of the app already uses for text input (as in `deeptutor notebook`'s sibling `kb` command). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrates the reviewed post-v1.7.1 contributions onto dev. Original PR heads and their authors remain in the Git history. The integration fixes shared session migration locks, plugin subprocess environments, model compatibility, source retrieval and the shared speech player, and includes native Windows and browser regression coverage.
The desktop dependency update keeps the existing runner matrix. Validate the combined result through the repository CI matrix before integration.
The included history of #2325 also carries the original #2261 commit by LucianVane, opened before this review window.
113 reviewed source PRs from 39 contributors