38 Commits

Author SHA1 Message Date
Qiu
b61c870380 fix(sdk): preserve the caller workspace during SDK replay (#3113) 2026-12-01 21:37:23 +08:00
Carl
242b24beeb fix: keep chats usable after oversized tool calls (#3144)
Closes #2909.

Omit the fewest eligible historical tool-argument payloads so oversized completed exchanges remain replayable, without touching signed/native provider rounds or durable history.
2026-12-01 17:03:29 +08:00
Yuchuan He
73bfa3f9e0 fix(turns): prevent duplicate replies when Stop races persistence (#3074) 2026-12-01 13:54:56 +08:00
Bingxi Zhao (Frank)
719e2a8e30 fix(chat): inherit ready workspace knowledge bases for untouched sessions 2026-11-15 01:00:49 +08:00
Bingxi Zhao (Frank)
e0872716f0 fix(runtime): announce input waits and reject oversized history plans
Local dev repairs for #2387, #2433, #2496. Regression checks cover reported symptoms and compatibility boundaries.
2026-11-15 00:44:09 +08:00
Tazeem Mahashin
ee1dd2c8d5 fix(runtime): replay submissions during concurrent admission 2026-11-06 19:32:37 -05:00
FSOTM
4fb9d78c99 fix(chat): confirm cancelled turn ownership before enabling another send 2026-11-01 22:55:21 +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 (Frank)
1526d1a91d Merge remote-tracking branch 'origin/dev' into HEAD 2026-10-27 21:38:53 +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
Bingxi Zhao (Frank)
be596676f7 fix: restore preview calendar and navigation workspace boundaries 2026-10-27 02:04:20 +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
AleFlyX
a9d6c99d89 fix(runtime): 补全恢复中断后的失败事件回放
变更:
- 为已失败但缺少终止日志的轮次补发可重试错误事件
- 覆盖事件写入失败、恢复取消、发布失败及超前回放游标的九种组合

验证:
- 95 项应用、恢复及订阅相关 pytest 测试:PASS
- 修改文件 pre-commit、架构检查及 git diff --check:PASS
- 收到回复正文后注入 SIGKILL,浏览器自动结束生成并显示重试,刷新后仍可重试:PASS
2026-10-23 16:54:33 +08:00
Bingxi Zhao (Frank)
e28c803636 fix(runtime): persist live prefixes and reclaim completed streams (#1971) 2026-10-19 03:29:21 +08:00
Bingxi Zhao (Frank)
583bdfc714 Merge PR #1945: fence edited submissions and isolate recovery by account and backend support 2026-10-19 01:03:40 +08:00
Bingxi Zhao
853eb2f478 Merge pull request #1808 from dajiaohuang/fix/sdk-capability-contracts
fix(sdk): serialize slotted capability availability
2026-10-19 00:22:01 +08:00
Bingxi Zhao (Frank)
399297e7f0 feat: preserve TypeScript engine migration and workspace updates 2026-10-18 23:09:10 +08:00
yepyhun
f986774b87 fix(chat): durably replace uncertain submissions and isolate recovery owners 2026-10-13 12:07:47 +02:00
XZH
c5b8c9c7ae test(app): lock lost-ack resend session parity behind regression tests
The lost-ack resend surface (submission reservation, worker_lost reap,
reply/cancel ack recovery) promised that a resent answer lands in the
original conversation, reuses the original user message row, and never
forks the session. Cover the contract end to end: replay while the
original is parked, resend after a reply-ack reap, parity through the
cancel-ack path, and content-binding refusal after the zombie failed.
2026-10-11 17:54:18 -07:00
dajiaohuang
33ef9d5386 Merge commit '6cf793bd868ba5ecbe64722936d4be8fab5a01df' into fix/sdk-capability-contracts 2026-10-08 12:35:31 +08:00
dajiaohuang
5406f5c3b0 fix(app): serialize slotted capability contracts 2026-10-08 12:35:31 +08:00
Bingxi Zhao (Frank)
d15e35a378 fix(turns): make lost-ack resends reuse the original conversation (#1793) 2026-10-08 01:20:23 +08:00
XZH
7cf2fc94a3 fix(session): stop waiting turns before deletion 2026-10-01 09:15:57 -07:00
Bingxi Zhao (Frank)
f2b433adb8 test: wait for persisted cancellation done event 2026-09-23 12:33:19 +08:00
Bingxi Zhao
c50a12eb3a Merge pull request #1373 from evan188199-tech/codex/fix/ask-user-waiter-loss
fix(turns): recover replies after waiter queue loss
2026-09-23 10:23:18 +08:00
Bingxi Zhao (Frank)
da856ad670 release: v1.6.9
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.
2026-09-21 02:30:40 +08:00
evan188199-tech
fa52492b45 test(app): stabilize multiworker reply subscription (#1433)
Co-authored-by: XZH <cto@xzh.ai>
2026-09-14 01:28:36 +08:00
Bingxi Zhao (Frank)
9feec62215 fix(turns): let a session blocked by a dead turn clear itself
`_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.
2026-09-11 12:43:41 +08:00
XZH
3e6eda0968 fix(turns): recover replies after waiter queue loss 2026-09-10 12:06:16 -07:00
Bingxi Zhao (Frank)
269cee58b1 test: pin the reaper's widened status set
_reap_unowned_live_turn accepts queued, running and waiting_input —
all three are rows _begin_turn_sync counts as active — but nothing
pinned the queued case, so narrowing the set back to waiting_input
alone left the whole suite green.

Cherry-picked from the PR-review session (3844aa7a); tests only.
2026-09-11 00:18:55 +08:00
Bingxi Zhao (Frank)
491a5a15cb follow-up to #1361: reclaim turns parked in waiting_input
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)
2026-09-11 00:00:42 +08:00
ZQR1101
2e71e47f64 fix(turns): reap an unowned waiting_input turn when a reply arrives (#1297) (#1361)
Co-authored-by: ZQR1101 <278034003+ZQR1101@users.noreply.github.com>
2026-09-10 23:42:22 +08:00
Amir Fathi
293fd15f41 fix(turns): log when a coordinator-routed reply finds no local waiter (#1332)
_coordinate_execution discarded the bool submit_user_reply returns, so a
reply that arrives after the turn's local queue is gone gets a false ACK
and the turn sits at waiting_input forever with no trace of why. Capture
the return value and log a warning with the command id, turn id, lease
owner and persisted status instead.

Fixes #1297
2026-09-10 23:41:59 +08:00
Bingxi Zhao (Frank)
93df3d48b7 release: v1.6.4
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
2026-09-03 01:38:54 +08:00
Bingxi Zhao (Frank)
6e6e56aedb release: v1.6.3
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
2026-09-02 04:09:11 +08:00
Bingxi Zhao (Frank)
fc39543bc0 feat: integrate frontend backend and canonical routes 2026-09-01 22:24:29 +08:00
Bingxi Zhao (Frank)
02ba56793e chore: checkpoint backend stabilization workspace 2026-09-01 21:28:15 +08:00