deepseek-harness/examples/acp-agent/tests
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
..
fixtures Merge commit '5ae8c6487ad9556b8793b890a4fe5ece24c55805' into codex/product-subagent-one-shot-background 2026-08-13 15:50:23 +08:00
goal-snapshots refactor: apply repository naming contract 2026-08-13 00:54:38 +08:00
snapshots fix(llm): align replay state with assembled content and degrade unusable state 2026-08-15 16:07:30 +08:00
acp.e2e.ts docs: purge chain-of-thought leakage from prose 2026-08-09 21:10:59 +08:00
acp.snapshot.ts fix(llm): align replay state with assembled content and degrade unusable state 2026-08-15 16:07:30 +08:00
cleanup.e2e.ts test: preserve ACP cleanup failures 2026-07-14 14:11:33 +08:00
cleanup.ts test: preserve ACP cleanup failures 2026-07-14 14:11:33 +08:00
escalation.e2e.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
fs-diff-bound.cordis.snapshot.yml feat(llm-deepseek): support low reasoning effort 2026-08-14 11:47:59 +08:00
fs-diff-bound.cordis.yml build(vendor): rescope the vendored Cordis packages into @deepseek-ai 2026-08-10 22:04:13 +08:00
fs-search.cordis.snapshot.yml refactor: apply repository naming contract 2026-08-13 00:54:38 +08:00
fs-search.cordis.yml refactor: apply repository naming contract 2026-08-13 00:54:38 +08:00
goal.snapshot.ts refactor: apply repository naming contract 2026-08-13 00:54:38 +08:00
hooks.e2e.ts Merge remote-tracking branch 'origin/master' into codex/trim-redundant-comments 2026-07-25 13:36:21 +08:00
lsp.cordis.snapshot.yml refactor: apply repository naming contract 2026-08-13 00:54:38 +08:00
lsp.cordis.yml refactor: apply repository naming contract 2026-08-13 00:54:38 +08:00
pwsh.cordis.snapshot.yml refactor: apply repository naming contract 2026-08-13 00:54:38 +08:00
pwsh.cordis.yml refactor: apply repository naming contract 2026-08-13 00:54:38 +08:00