From a91cf8a8019dc52ae26af3ce50f4cc2a537db06f Mon Sep 17 00:00:00 2001 From: Dotta Date: Tue, 6 Oct 2026 12:40:24 -0500 Subject: [PATCH] test(runner): assert provider-selected models and shared launch pins Replace obsolete single-model and duplicated-digest expectations with open model selection and byte-to-manifest integrity checks. Co-Authored-By: Paperclip --- .../src/drivers/acpx/driver-profile.test.ts | 9 +++------ .../drivers/acpx/installation-integrity.test.ts | 14 ++++---------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/packages/paperclip-runner/src/drivers/acpx/driver-profile.test.ts b/packages/paperclip-runner/src/drivers/acpx/driver-profile.test.ts index a325f1e29dc..1a720978c9d 100644 --- a/packages/paperclip-runner/src/drivers/acpx/driver-profile.test.ts +++ b/packages/paperclip-runner/src/drivers/acpx/driver-profile.test.ts @@ -54,11 +54,8 @@ describe("ACPX driver profile", () => { }); }); - it.each([ - ["claude", "claude-sonnet-5"], - ["codex", "gpt-5.6-sol"], - ["grok", "grok-4.7"], - ] as const)("accepts the exact qualified %s model", (agent, model) => { + it.each(["claude", "codex", "grok", "cursor"] as const)("accepts an unlisted %s model for native verification", agent => { + const model = "custom/model[reasoning=medium]"; expect(validateAcpxDriverConfig({ agent, model })).toEqual({ ok: true, config: { agent, model, permissionMode: "approve-all" }, @@ -82,7 +79,7 @@ describe("ACPX driver profile", () => { issues: [{ path: "command", code: "unknown_field" }], }); expect( - validateAcpxDriverConfig({ agent: "codex", model: "other" }), + validateAcpxDriverConfig({ agent: "codex", model: " " }), ).toMatchObject({ ok: false, issues: [{ path: "model", code: "invalid_model" }], diff --git a/packages/paperclip-runner/src/drivers/acpx/installation-integrity.test.ts b/packages/paperclip-runner/src/drivers/acpx/installation-integrity.test.ts index f22dabdbe7b..547b12a1d78 100644 --- a/packages/paperclip-runner/src/drivers/acpx/installation-integrity.test.ts +++ b/packages/paperclip-runner/src/drivers/acpx/installation-integrity.test.ts @@ -2140,18 +2140,12 @@ async function installationFixture() { describe("Grok launcher subscription refresh", () => { - it("keeps the Grok launcher digest synchronized across TypeScript, Rust, server, and provider pack", async () => { + it("binds the Grok launcher bytes to the shared release declaration", async () => { const launcher = await readFile(new URL("../../providers/grok/launcher.cjs", import.meta.url)); const digest = `sha256:${createHash("sha256").update(launcher).digest("hex")}`; - expect(resolveQualifiedAcpxProfile("grok", "grok-4.7").commandDigest).toBe(digest); - const [server, pack, rust] = await Promise.all([ - readFile(new URL("../../../../../server/src/services/native-runtime/native-session-executor.ts", import.meta.url), "utf8"), - readFile(new URL("../../../scripts/build-provider-pack.mjs", import.meta.url), "utf8"), - readFile(new URL("../../../runner/crates/runner-core/src/acpx_provider_backend.rs", import.meta.url), "utf8"), - ]); - expect(server).toContain(`grok: "${digest}"`); - expect(pack).toContain(`grok: "${digest}"`); - expect(rust.split('"grok" =>')[1]?.slice(0, 600)).toContain(`"${digest}"`); + const manifest = JSON.parse(await readFile(new URL("../../../acpx-profiles.json", import.meta.url), "utf8")); + expect(manifest.profiles.grok.commandDigest).toBe(digest); + expect(resolveQualifiedAcpxProfile("grok", "explicit-model").commandDigest).toBe(digest); }); async function fixture(input: {