Skip to content

test: add /v1/responses restart regression (issue #64 responses variant) - #122

Merged
ranxianglei merged 2 commits into
masterfrom
2026-08-22_responses-restart-blocks
Aug 22, 2026
Merged

test: add /v1/responses restart regression (issue #64 responses variant)#122
ranxianglei merged 2 commits into
masterfrom
2026-08-22_responses-restart-blocks

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Problem

On /v1/responses (e.g. SGLang, Qwen with thinking), compressed blocks
disappear after a restart: acp_status shows Blocks: none until the
first live provider request refolds the session. The existing restart
tests only covered openai-completions and anthropic-messages — there
was no openai-responses case.

Root cause

In acp-kernel, responsesToCore keyed the reasoning core id on the
host-generated item.id (rs_<hash>), while the anthropic/openai codecs
key it on the thinking text. The primeFold mirror
(viewToResponsesCore) emits reasoning items without an id, so the
kernel fell back to a content hash — a different core id than the
host's. On restart the span fingerprints mismatched, every in-stream
compress replay was rejected, and the blocks were lost.

Fix

The fix is in the kernel: ranxianglei/acp-kernel#107 (key the
responses reasoning core id on the reasoning text, consistent with
anthropic/openai). This PR adds the missing restart regression test and
bumps acp-kernel 0.0.32 -> 0.0.33.

Tests

  • New test: provider+responses: restart primeFold rebuilds blocks from thinking-bearing turns (issue #64 responses).
  • Fails on acp-kernel 0.0.32 (0 blocks after restart, expected 1).
  • Passes with the kernel fix (1 block after restart, summary present in
    the post-restart wire payload).
  • Full suite: 258 pass / 0 fail (was 257).

Dependency

Requires ranxianglei/acp-kernel#107 to be merged and published as
0.0.33 first
— CI will fail to install acp-kernel@0.0.33 until then.

dog and others added 2 commits August 22, 2026 12:09
Add a /v1/responses restart test mirroring the existing openai and
anthropic cases: a thinking-bearing session is compressed live, then a
fresh host primes from the persisted view and the pre-LLM acp_status
must show the block.

This fails on acp-kernel 0.0.32 (blocks lost after restart) because the
kernel keyed responses reasoning core ids on the host-generated item id,
which the primeFold mirror cannot reproduce. Passes with acp-kernel
0.0.33 (ranxianglei/acp-kernel#107), which keys the id on the reasoning
text like the anthropic/openai codecs.

Bumps acp-kernel 0.0.32 -> 0.0.33.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant