Skip to content

Commit 7def7e1

Browse files
E2E: accept any OpenCode 1.x host in the version checks (OpenCode 1.19.0 is now latest)
Co-authored-by: Alfonso <alfonso-magic-context@users.noreply.github.com>
1 parent a83cd18 commit 7def7e1

8 files changed

Lines changed: 8 additions & 8 deletions

‎packages/e2e-tests/src/repro/note-nudge-real-host.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const env = {
3030
OPENCODE_DISABLE_AUTOUPDATE: "true", OPENCODE_DISABLE_MODELS_FETCH: "true",
3131
};
3232
const version = Bun.spawnSync([binary, "--version"], { env }).stdout.toString().trim();
33-
if (!/^1\.18\./.test(version)) throw new Error(`Expected OpenCode 1.18.x, got ${version}`);
33+
if (!/^1\./.test(version)) throw new Error(`Expected OpenCode 1.x, got ${version}`);
3434
const mock = new MockProvider();
3535
const { baseURL } = await mock.start();
3636
mock.setDefault({ text: "MOCK_ANSWER", usage: { input_tokens: 1000, output_tokens: 10 } });

‎packages/e2e-tests/tests/cache-ttl-live-config.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ test("OpenCode 1 live cache_ttl edits affect the next idle check without changin
3636
try {
3737
expect(realpathSync(root).startsWith(realpathSync(taskRoot) + "/")).toBe(true);
3838
const health = await fetch(`${h.serverUrl}/global/health`).then(r => r.json()) as { version: string };
39-
expect(health.version).toMatch(/^1\.18\./);
39+
expect(health.version).toMatch(/^1\./);
4040
const containment = () => {
4141
const result = spawnSync("timeout", ["10s", "lsof", "-p", String(h.opencode.pid), "-Fn"], { encoding: "utf8" });
4242
expect(result.status).toBe(0);

‎packages/e2e-tests/tests/hidden-agent-user-permissions.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ test("OpenCode 1 keeps every hidden Magic Context agent's denies over a user con
5858
const health = (await fetch(`${h.serverUrl}/global/health`).then((r) => r.json())) as {
5959
version: string;
6060
};
61-
expect(health.version).toMatch(/^1\.18\./);
61+
expect(health.version).toMatch(/^1\./);
6262
const files = inspectHostOpenFiles(h.opencode.pid, dirname(h.opencode.env.configDir), h.contextDbPath());
6363
console.log(`issue-639 oc1 host=${health.version} pid=${files.pid} lsof=${JSON.stringify(files.databases)}`);
6464
const agents = (await fetch(`${h.serverUrl}/agent`).then((r) => r.json())) as Array<{

‎packages/e2e-tests/tests/latest-turn-thinking.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ for (const { band, mode } of [{ band: 76, mode: "drops" }, { band: 85, mode: "dr
149149
version: string;
150150
}
151151
).version;
152-
expect(version).toMatch(/^1\.18\./);
152+
expect(version).toMatch(/^1\./);
153153
const contain = () => {
154154
const lsof = spawnSync("lsof", ["-p", String(h.opencode.pid), "-Fn"], {
155155
encoding: "utf8",

‎packages/e2e-tests/tests/rust-compaction-marker-byte-identity.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ describe.skipIf(!rustPrereqs.ok)("rust invariant: compaction marker byte identit
426426
h = await RustTestHarness.create({ modelContextLimit: 872_000, historianModelContextLimit: 872_000, magicContextConfig: config, startInTsMode: true, startHistorianProducer: false, mockDefault: { text: "mixed fixture reply", usage: { input_tokens: 350_000, output_tokens: 20 } } });
427427
h.subc.writeModuleConfig(config);
428428
const health = await fetch(`${h.opencode.url}/global/health`).then(response => response.json()) as { version: string };
429-
expect(health.version).toMatch(/^1\.18\./);
429+
expect(health.version).toMatch(/^1\./);
430430
const sessionId = await h.createSession();
431431
await h.sendPrompt(sessionId, "seed mixed sparse history");
432432
assertHermeticStores(h);

‎packages/e2e-tests/tests/rust-plugin-stage-cache.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test.skipIf(!process.env.MC_RUST_STAGE_BASELINE)("old/new Rust adapters serve id
2828
mkdirSync(requestedRoot, { recursive: true });
2929
const root = realpathSync(requestedRoot);
3030
const version = execFileSync("opencode", ["--version"], { encoding: "utf8" }).trim();
31-
expect(version).toMatch(/^1\.18\./);
31+
expect(version).toMatch(/^1\./);
3232
console.log(`RUST_STAGE_HOST OpenCode=${version} Bun=${Bun.version} root=${root}`);
3333
const projectRoot = join(root, "project");
3434
mkdirSync(projectRoot, { recursive: true });

‎packages/e2e-tests/tests/subagent-execute-ride.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ test("issue 619 task subagent drops ride execute once and replay the provider pr
5151
const health = (await fetch(`${h.serverUrl}/global/health`).then((r) => r.json())) as {
5252
version: string;
5353
};
54-
expect(health.version).toMatch(/^1\.18\./);
54+
expect(health.version).toMatch(/^1\./);
5555
const containment = () => {
5656
const result = spawnSync("lsof", ["-p", String(h.opencode.pid), "-Fn"], {
5757
encoding: "utf8",

‎packages/e2e-tests/tests/subagent-write-tools.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test("OC1 task child cannot write memories or notes; primary tools and bytes sur
1313
const store = new Database(join(h.dataDir, "opencode", "opencode.db"), { readonly: true });
1414
try {
1515
const version = await fetch(`${h.serverUrl}/global/health`).then(r => r.json()) as { version: string };
16-
expect(version.version).toMatch(/^1\.18\./);
16+
expect(version.version).toMatch(/^1\./);
1717
const root = dirname(h.opencode.env.configDir);
1818
const files = inspectHostOpenFiles(h.opencode.pid, root, h.contextDbPath());
1919
console.log(JSON.stringify({ version: version.version, root, pid: files.pid, lsofDatabases: files.databases }));

0 commit comments

Comments
 (0)