Yichen Jiang
7e95a00c8a
fix(llm): align replay state with assembled content and degrade unusable state
...
A max-tokens response that included a tool call persisted assembler-transformed
content next to replay metadata projected from the untransformed native message,
so the next request died in history reconstruction with INVALID_REPLAY_STATE and
the session stayed permanently stuck.
Write side: the finish chunk's replayState becomes a typed ReplayEnvelope —
opaque response-level metadata plus optional per-block entries aligned with the
emitted block sequence. BlockAssembler computes one keep/drop decision for
blocks and entries together, so stored metadata always describes stored content
and retained blocks keep their signatures. pi-ai splits its state into a
version-2 response half and per-block signature entries.
Read side: durable content is authoritative. toPiAssistant degrades any
unusable state — foreign kind, other versions (including the flat v1 form
already on disk), malformed metadata, or content/block mismatches — to the
existing provider-neutral conversion with an onReplayDegrade diagnostic instead
of failing the request, which un-bricks sessions poisoned before this change.
Covered by assembler and replay unit tests, an agent-loop continuation
regression, keyless real-composition continuation tests (native pruned-envelope
replay and legacy flat-state degrade), and the authored keyless snapshot
scenario max-tokens-continue through the assembled ACP app.
2026-08-15 16:07:30 +08:00
..
2026-08-09 03:20:17 +08:00
2026-08-03 16:04:26 +08:00
2026-08-09 03:20:17 +08:00
2026-08-12 12:30:19 +08:00
2026-08-09 17:26:57 +08:00
2026-08-12 12:30:19 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-12 12:30:19 +08:00
2026-08-09 17:26:57 +08:00
2026-08-12 12:30:19 +08:00
2026-08-12 12:30:19 +08:00
2026-08-09 21:10:59 +08:00
2026-08-12 12:30:19 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 13:31:30 +08:00
2026-08-09 11:33:14 +08:00
2026-08-07 22:52:19 +08:00
2026-08-09 11:33:14 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-12 12:30:19 +08:00
2026-08-11 15:23:05 +08:00
2026-08-12 12:30:19 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-12 12:30:19 +08:00
2026-08-11 15:23:05 +08:00
2026-08-12 12:30:19 +08:00
2026-08-12 12:30:19 +08:00
2026-08-09 17:26:57 +08:00
2026-08-12 12:30:19 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-09 01:31:57 +08:00
2026-08-09 01:31:57 +08:00
2026-08-09 01:31:57 +08:00
2026-08-11 15:23:05 +08:00
2026-08-11 15:23:05 +08:00
2026-08-09 11:33:14 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 05:20:43 +08:00
2026-08-13 05:20:43 +08:00
2026-08-13 05:20:43 +08:00
2026-08-09 11:33:14 +08:00
2026-08-09 01:31:57 +08:00
2026-08-09 11:33:14 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-15 16:07:30 +08:00
2026-08-15 16:07:30 +08:00
2026-08-15 16:07:30 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-09 11:33:14 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-12 12:30:19 +08:00
2026-08-11 15:23:05 +08:00
2026-08-12 12:30:19 +08:00
2026-08-12 12:30:19 +08:00
2026-08-09 17:26:57 +08:00
2026-08-12 12:30:19 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-12 12:30:19 +08:00
2026-08-11 15:23:05 +08:00
2026-08-12 12:30:19 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-12 12:30:19 +08:00
2026-08-11 15:23:05 +08:00
2026-08-12 12:30:19 +08:00
2026-08-09 11:33:14 +08:00
2026-08-06 10:40:31 +08:00
2026-08-09 11:33:14 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-09 11:33:14 +08:00
2026-08-09 11:33:14 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-12 12:30:19 +08:00
2026-08-09 15:35:02 +08:00
2026-08-12 12:30:19 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-11 15:23:05 +08:00
2026-08-11 15:23:05 +08:00
2026-08-11 15:23:05 +08:00
2026-08-14 11:47:59 +08:00
2026-08-14 11:47:59 +08:00
2026-08-14 11:47:59 +08:00
2026-08-04 17:36:14 +08:00
2026-08-04 17:36:14 +08:00
2026-08-12 12:30:19 +08:00
2026-08-09 15:35:02 +08:00
2026-08-12 12:30:19 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 13:31:30 +08:00
2026-08-12 12:30:19 +08:00
2026-08-09 15:35:02 +08:00
2026-08-12 12:30:19 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 13:31:30 +08:00
2026-08-12 12:30:19 +08:00
2026-08-11 15:23:05 +08:00
2026-08-12 12:30:19 +08:00
2026-08-12 12:30:19 +08:00
2026-08-09 21:10:59 +08:00
2026-08-12 12:30:19 +08:00
2026-08-12 12:30:19 +08:00
2026-08-09 15:35:02 +08:00
2026-08-12 12:30:19 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 05:20:43 +08:00
2026-08-13 05:20:43 +08:00
2026-08-13 05:20:43 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-10 12:50:43 +08:00
2026-08-07 16:43:59 +08:00
2026-08-10 12:50:43 +08:00
2026-08-09 11:02:16 +08:00
2026-08-09 11:02:16 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-12 12:30:19 +08:00
2026-08-11 16:25:59 +08:00
2026-08-12 12:30:19 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 13:31:30 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-12 09:59:19 +08:00
2026-08-10 21:07:22 +08:00
2026-08-12 09:59:19 +08:00
2026-08-12 16:48:14 +08:00
2026-08-12 16:18:52 +08:00
2026-08-12 16:48:14 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-09 11:02:16 +08:00
2026-08-09 01:25:24 +08:00
2026-08-09 11:02:16 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-12 12:30:19 +08:00
2026-08-09 17:26:57 +08:00
2026-08-12 12:30:19 +08:00
2026-08-12 12:30:19 +08:00
2026-08-09 17:26:57 +08:00
2026-08-12 12:30:19 +08:00
2026-08-09 11:33:14 +08:00
2026-08-06 10:40:32 +08:00
2026-08-09 11:33:14 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-12 12:30:19 +08:00
2026-08-09 17:26:57 +08:00
2026-08-12 12:30:19 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-09 11:33:14 +08:00
2026-08-06 13:44:23 +08:00
2026-08-09 11:33:14 +08:00
2026-08-12 13:07:41 +08:00
2026-08-12 13:07:41 +08:00
2026-08-12 13:07:41 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-09 11:33:14 +08:00
2026-08-06 14:58:33 +08:00
2026-08-09 11:33:14 +08:00
2026-08-09 11:02:16 +08:00
2026-08-06 16:38:25 +08:00
2026-08-09 11:02:16 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-12 12:30:19 +08:00
2026-08-09 15:35:02 +08:00
2026-08-12 12:30:19 +08:00
2026-08-12 12:30:19 +08:00
2026-08-09 18:16:44 +08:00
2026-08-12 12:30:19 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-12 12:30:19 +08:00
2026-08-09 10:29:13 +08:00
2026-08-12 12:30:19 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 16:55:59 +08:00
2026-08-13 16:55:59 +08:00
2026-08-13 16:55:59 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-12 09:59:19 +08:00
2026-08-11 11:23:48 +08:00
2026-08-12 09:59:19 +08:00
2026-08-12 09:59:19 +08:00
2026-08-11 18:01:25 +08:00
2026-08-12 09:59:19 +08:00
2026-08-11 20:21:57 +08:00
2026-08-11 20:21:57 +08:00
2026-08-11 20:21:57 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 00:54:38 +08:00
2026-08-13 05:39:58 +08:00
2026-08-13 05:39:58 +08:00
2026-08-13 05:39:58 +08:00
2026-08-11 03:29:04 +08:00
2026-08-11 03:29:04 +08:00
2026-08-11 03:29:04 +08:00
2026-08-12 16:18:52 +08:00
2026-08-12 16:18:52 +08:00
2026-08-12 16:18:52 +08:00
2026-08-13 11:46:37 +08:00
2026-08-13 11:46:37 +08:00
2026-08-13 11:46:37 +08:00