mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-21 00:05:49 +02:00
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 <noreply@paperclip.ing>
This commit is contained in:
1 parent
91dfaa7d61
commit
a91cf8a801
2 files changed
+7
-16
No files matched your search
@@ -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" }],
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in new issue
Block a user