Skip to content

Commit a97f699

Browse files
committed
fix(coding-agent): kernel test fixtures speak protocol 3
The fake-runtime fixtures in the REPL corruption and provisioner suites still announced protocol 2 after the runtime moved to REPL_PROTOCOL_VERSION = 3, so 23 tests failed deterministically on a clean checkout with the protocol-mismatch error instead of exercising their scenarios. The constant is module-private in repl-manager.ts, so the fixtures use the literal 3.
1 parent d60fab8 commit a97f699

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/coding-agent/test/ipython-provisioner.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function writeFakeReplRuntime(markerPath: string): string {
7373
const fs = require("node:fs");
7474
const readline = require("node:readline");
7575
const emit = (event) => process.stdout.write(JSON.stringify(event) + "\\n");
76-
emit({ event: "ready", protocol: 2, python: process.version });
76+
emit({ event: "ready", protocol: 3, python: process.version });
7777
const input = readline.createInterface({ input: process.stdin });
7878
input.on("line", (line) => {
7979
const request = JSON.parse(line);

packages/coding-agent/test/repl-kernel-protocol-corruption.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ if (fs.existsSync(process.env.FAKE_REPL_CORRUPT_BOOT)) {
3232
process.stdout.write("BROKEN-BOOT\\n");
3333
} else if (fs.existsSync(process.env.FAKE_REPL_READY_WITH_GARBAGE)) {
3434
process.stdout.write(
35-
JSON.stringify({ event: "ready", protocol: 2, python: process.version }) + "\\nBROKEN-WITH-READY\\n",
35+
JSON.stringify({ event: "ready", protocol: 3, python: process.version }) + "\\nBROKEN-WITH-READY\\n",
3636
);
3737
} else if (!(count > 1 && fs.existsSync(process.env.FAKE_REPL_DELAY_READY))) {
38-
emit({ event: "ready", protocol: 2, python: process.version });
38+
emit({ event: "ready", protocol: 3, python: process.version });
3939
}
4040
const input = readline.createInterface({ input: process.stdin });
4141
input.on("line", (line) => {

0 commit comments

Comments
 (0)