Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/e2e/e2e-opencode-responses-ws.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ test(`real OpenCode V2: native Responses WebSockets, fold and post-fold tools ($
assert.ok(ref);
assert.ok(main.some(row => row.full.some(item => item.type === "function_call_output" && String(item.output).includes("ACP Context Analysis"))));
for (let i = 0; i < 3; i++) await ocRun(`push-back round ${i}`, sid as string);
const foldArgs = { content: [{ startId: ref, endId: ref, summary: "E2E-WS-SUMMARY: the original material consisted of deterministic bulky filler and established the WebSocket ACP integration test context." }] };
const foldArgs = { content: `${ref}–${ref} fold\nE2E-WS-SUMMARY: the original material consisted of deterministic bulky filler and established the WebSocket ACP integration test context.` };
await ocRun(`WS_FOLD_REQUEST_B64 ${Buffer.from(JSON.stringify(foldArgs)).toString("base64")}`, sid as string);
const afterFold = rows.filter(row => row.transport === "ws" && row.full.some(item => item.type === "function_call_output" && String(item.output).includes("Compressed")));
assert.equal(afterFold.length, 2);
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/e2e-pi-codex-ws.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ test("A: explicit websocket — intercepted, stamped, compress/decompress round
assert.ok(sentinelRef, "sentinel message carries an ACP ref tag");
const minRef = userRefs.reduce((a, b) => (Number(a.slice(1)) < Number(b.slice(1)) ? a : b));

ok("fold", await piRun(ctx, `WS_FOLD_REQUEST_B64 ${b64({ content: [{ startId: minRef, endId: sentinelRef, summary: SUMMARY }] })}`, { resume: true }));
ok("fold", await piRun(ctx, `WS_FOLD_REQUEST_B64 ${b64({ content: `${minRef}–${sentinelRef} fold\n${SUMMARY}` })}`, { resume: true }));
const foldedRow = mock.rows.filter((r) => r.transport === "ws").find((r) => toolResult(r, "compress")?.includes("Compressed"));
assert.ok(foldedRow, "compress executed and reported the fold");

Expand Down Expand Up @@ -585,7 +585,7 @@ test("B: auto — successful WS still routes, previous_response_id continuation
assert.ok(sentinelRef && userRefs.length >= 2, `user-message ACP refs present (${userRefs.length})`);
const minRef = userRefs.reduce((a, b) => (Number(a.slice(1)) < Number(b.slice(1)) ? a : b));

ok("fold", await piRun(ctx, `WS_FOLD_REQUEST_B64 ${b64({ content: [{ startId: minRef, endId: sentinelRef, summary: SUMMARY }] })}`, { resume: true }));
ok("fold", await piRun(ctx, `WS_FOLD_REQUEST_B64 ${b64({ content: `${minRef}–${sentinelRef} fold\n${SUMMARY}` })}`, { resume: true }));

// Delta frames emerge inside multi-call tool-loop processes (pi's
// websocketSessionCache is per-process): A/E show them on the final call of
Expand Down Expand Up @@ -688,7 +688,7 @@ test("D: explicit sse — regression guard, full fold cycle over HTTP", { skip:
assert.ok(sentinelRef && userRefs.length >= 2, `user-message ACP refs present (${userRefs.length})`);
const minRef = userRefs.reduce((a, b) => (Number(a.slice(1)) < Number(b.slice(1)) ? a : b));

ok("fold", await piRun(ctx, `WS_FOLD_REQUEST_B64 ${b64({ content: [{ startId: minRef, endId: sentinelRef, summary: SUMMARY }] })}`, { resume: true }));
ok("fold", await piRun(ctx, `WS_FOLD_REQUEST_B64 ${b64({ content: `${minRef}–${sentinelRef} fold\n${SUMMARY}` })}`, { resume: true }));
ok("recall", await piRun(ctx, "final recall", { resume: true }));

// Re-capture AFTER fold/recall: preFoldRows is a pre-fold snapshot.
Expand Down
6 changes: 5 additions & 1 deletion tests/e2e/fake-upstream-chat.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ function compressArgs(refs) {
// zone (last 5 messages / most recent user message).
if (refs.length === 0) return {};
const start = refs[0];
return { content: [{ startId: start, endId: start, summary: "e2e fold: scripted compress round over the run-one filler message" }] };
// #4823 narrowed the advertised schema to the single string form; hosts
// like opencode/pi validate tool args against it client-side, so the
// scripted call must use the canonical string (the array form is still
// accepted by bili's lenient parser but dies at host validation).
return { content: `${start}–${start} e2e fold\nscripted compress round over the run-one filler message` };
}

// A chain-checkpoint carrier (<bili-chain ... /> #1421 step 3) rides as a
Expand Down
Loading