Local dev repairs for #2168, #2631.
Real child-process recovery: 16 tests passed, including queued, running, waiting_input, process exit and PID reuse. Existing coordination/application tests: 65 passed, 10 optional Redis skips.
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.
Remove course pages, APIs and the course_study capability. Add anchored note
threads and reviewed learning-block generation, queued and withdrawable chat
messages, quote attachments, side chats, and the calendar/favorites/navigation
updates.
Keep preview's existing backend architecture. Wire the new features through
its Python application and existing chat engine, retain legacy selected-text
requests, persist mid-turn messages in replay, and restore note context when
regenerating. Leave stored user data intact.
Validate frontend contracts, dependency boundaries, types, 1290 node tests,
840 rendered tests, lint, localization and the production build. Exercise
session/notes/API regressions, 53 chat-engine tests and 20 Python/native
integration tests with isolated runtime data.
`video_lesson` (CLI alias `lesson`) turns a question into a playable
Remotion explainer:
1. code_generation: the lesson writer drafts Lesson.tsx
2. render_check: compile and frame-check it, feeding failures back,
up to three attempts
3. render_output: write the player page and emit it as an html artifact,
along with the lesson's summary and source
npm packages are installed on first use while the first LLM call is
still running. The capability reports itself unavailable when node or
npm is missing. Its LLM budget lives under plugins.video_lesson in
agents.yaml (48k tokens by default: a whole lesson comes back in one
reply).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ship original-source visual practice, recoverable indexing, unified video
Reading, scientific research tools, managed plugins, and a learning journal
as summarized in assets/releases/ver1-6-14.md.
Improve provider setup and protocol-aware endpoints. Restore missing
localized setup and Ukrainian UI text, keep plugin loading in the plugin
layer, harden research XML parsing, and repair isolated test fixtures and
type-checking errors found by the release gate.
Sync README prose and all eleven translations, bump the package version,
and update the stable release announcement.
Validation: 10180 Python tests and 8 subtests passed (28 skipped); 1303
Node tests passed on Node 22; 24 provider UI tests passed. All pre-commit
hooks, ruff, translation checks, documentation checks, and docs build passed.
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.
`_begin_turn_sync` refuses a new turn while the session owns any row in
queued/running/waiting_input. That is right while a turn is alive and
catastrophic once one is not: a single row left behind by a lost worker,
a dropped socket or a restart blocked every later message in that
session, with no way out from the UI. Reporters described it precisely —
one window, no refresh, a conversation that never accepted another word
(#1297, #1359).
v1.6.7 closed the paths that manufacture those rows, but said nothing
about the ones already there. It shipped with "existing rows still need
clearing by hand" as a known issue, because the obvious fix — a periodic
sweep — needs an age threshold or it cancels a turn between its INSERT
and its first lease renewal, the worst failure a chat product has.
Reclaiming at the point of conflict removes that hazard rather than
managing it. The only rows ever considered are ones already blocking a
real request, so there is no window to get wrong, no timer, and no
threshold to guess. On a restart the leases are gone, so the first
message the user sends clears the row and goes through — the outcome the
sweep was for, without the sweep.
Liveness is the lease, never the row's age. A turn parked on an
`ask_user` card emits no events, so `updated_at` stops advancing while a
person is simply taking their time to answer; a live worker renews its
lease every few seconds whether or not it is producing output. So "no
lease" is the one signal that separates a zombie from a slow reader, and
a turn whose lease is live still gets its conflict — pinned by a test,
because that is what keeps this from becoming a way to run two turns on
one session.
Also names the exception. Both stores raised a bare RuntimeError with
the conflict spelled in the message; `ActiveTurnConflict` subclasses it,
so every existing handler keeps working, and a caller that can do
something about a stale row no longer has to match on text.
6921 passed, 24 skipped.
Two paths left a durable row that blocked its whole session, because
`_begin_turn_sync` counts `waiting_input` as active and refuses every
later message with "Session already has an active turn" (#1297, #1359).
The terminal write on cancellation CAS'd on `expected_status="running"`
alone. A turn parked on `ask_user` sits at `waiting_input`, and the
waiter's restore to `running` is fired through `asyncio.shield` — so it
races that write and loses about as often as it wins. When it lost, nothing
terminal was written, no `done` event went out, and the row stayed
`waiting_input` forever: pressing Stop on a question was enough, no restart
needed. Both states are live and owned by the same execution, so both are
valid predecessors of its terminal state; the fencing token is still what
proves ownership.
`cancel_turn` also returned False when nothing held the lease, so Stop on a
card whose worker was gone was reported as a refusal the UI could not act on
while the row kept blocking the session. It now reaps, for the same reason
`submit_user_reply` does — and the reaper is widened to every live status
and renamed, since `queued` and `running` orphans block a session exactly
as `waiting_input` ones do.
NOT covered, deliberately: nothing sweeps rows left behind by a process that
died, because `MemoryCoordinator._known_turns` is per-process and
`list_expired_turn_ids()` is empty after a restart. That needs an age
threshold to avoid reaping a turn between its INSERT and its first lease
renewal, which is not a change to make unattended. This fixes the path that
*creates* the zombies; pre-existing rows still need that sweep.
(cherry picked from commit 5f040dbc9fc8be02f2281cf91c25e86f5991fa92)
Ship lighter isolated runtimes, richer Books and Mastery flows,
Reading/session polish, and explicit model API capabilities.
Release notes: assets/releases/ver1-6-4.md
Ship the breaking front- and back-end runtime and route refactor,
learner and guardian flows, grounded reading, knowledge and parser
updates, and recoverable long-running streams.
Release notes: assets/releases/ver1-6-3.md
Rebased onto dev (post-#348) and resolved two UI conflicts (`web/app/(workspace)/chat/[[...sessionId]]/page.tsx` drops the now-dead `replaySnapshot` helper; `web/components/chat/home/ChatMessages.tsx` switches the last-assistant action button from the old `RotateCcw`/Retry to `RefreshCcw`/Regenerate). Smoke tests green (199 passed) and all required checks pass.
Merging: adds a `regenerate` capability wired through CLI (`/regenerate` · `/retry`), WebSocket (`type: "regenerate"`), and Web UI (per-message Regenerate button). Backend rolls back the trailing assistant via `SQLiteSessionStore.delete_message`, reuses `start_turn` through `_persist_user_message=False` / `_regenerate=True`, skips `memory_service.refresh_from_turn` on regeneration, and surfaces non-fatal `regenerate_busy` / `nothing_to_regenerate` errors. Also includes empty-response diagnostics in `_stage_responding`. 18 new tests.