diff --git a/tests/verif-view-latch-discipline.test.ts b/tests/verif-view-latch-discipline.test.ts index 09c73aabd1..b544eac324 100644 --- a/tests/verif-view-latch-discipline.test.ts +++ b/tests/verif-view-latch-discipline.test.ts @@ -24,6 +24,10 @@ import { resolve } from "node:path"; import { translateFunction } from "../verif/symbolic.js"; import { newCtx, smt2Of } from "../verif/terms.js"; import { solveSmt2 } from "../verif/solve.js"; + +const haveSolver = (() => { + try { void solveSmt2("(check-sat)", []); return true; } catch { return false; } +})(); import { applyViewLatch } from "../kernel/src/view-latch.ts"; import type { CompressionState, CoreMessage, ViewLatchEntry } from "../kernel/src/types.ts"; import type { NodeIO } from "../kernel/src/pipeline.ts"; @@ -31,7 +35,7 @@ import type { SymVal } from "../verif/symbolic.ts"; const file = resolve(import.meta.dirname, "../kernel/src/view-latch.ts"); -test("view-latch discipline: quiet turns replay latched bytes verbatim (arbitrary texts)", { timeout: 240_000 }, () => { +test("view-latch discipline: quiet turns replay latched bytes verbatim (arbitrary texts)", { timeout: 240_000, skip: !haveSolver }, () => { const ctx = newCtx(); // One already-latched message (id i1 → ref r1, latched text L1 ≠ anything // fixed) + one fresh message (id i2 → ref r2, no latch entry). Both the diff --git a/tests/verif-wire-anthropic-roundtrip.test.ts b/tests/verif-wire-anthropic-roundtrip.test.ts index dbeedc6698..f15664d483 100644 --- a/tests/verif-wire-anthropic-roundtrip.test.ts +++ b/tests/verif-wire-anthropic-roundtrip.test.ts @@ -25,7 +25,11 @@ import type { Term } from "../verif/terms.ts"; * negative controls via UNSAT. */ -const KP = "/home/dog/tmp/bili-verif2/kernel/src/wire/anthropic.ts"; +const KP = new URL("../kernel/src/wire/anthropic.ts", import.meta.url).pathname; + +const haveSolver = (() => { + try { void solveSmt2("(check-sat)", []); return true; } catch { return false; } +})(); function makeIdPort(): (role: SymVal, ct: SymVal, text: SymVal, opts?: SymVal) => SymVal { const memo = new Map(); @@ -64,7 +68,7 @@ function makeCounterPorts(): Record }; } -test("wire-anthropic round-trip: block order + payload preserved (same-role pairs)", { timeout: 240_000 }, () => { +test("wire-anthropic round-trip: block order + payload preserved (same-role pairs)", { timeout: 240_000, skip: !haveSolver }, () => { // Pin each run's block types to constants: the symbolic-type union across // switch arms merges payloads through the tool_use arm's safeStringify // degrade ({kind:"any"} has no term to query). ORDER+payload per pinned @@ -106,7 +110,7 @@ test("wire-anthropic round-trip: block order + payload preserved (same-role pair } }); -test("wire-anthropic round-trip: thinking keeps its own message after same-role group (cross-message order)", { timeout: 240_000 }, () => { +test("wire-anthropic round-trip: thinking keeps its own message after same-role group (cross-message order)", { timeout: 240_000, skip: !haveSolver }, () => { const ctx = newCtx(); const strv = (t: unknown) => ({ kind: "str", t }) as SymVal; const TYPE1 = ctx.String.val("text"); // block-1 type pinned: this test exercises diff --git a/tests/verif-wire-google-rebuild-stability.test.ts b/tests/verif-wire-google-rebuild-stability.test.ts index afa3342464..3b64aecd0c 100644 --- a/tests/verif-wire-google-rebuild-stability.test.ts +++ b/tests/verif-wire-google-rebuild-stability.test.ts @@ -41,7 +41,7 @@ function coreMsg(fields: [string, SymVal][], rawParts: SymVal[]): SymVal { /** REAL coreToGoogle over a symbolic core array. */ function runCoreToGoogle(ctx: KCtx, msgs: SymVal): { ret: SymVal; assumptions: unknown[]; degradations: string[] } { const out = translateFunction({ - file: "/home/dog/tmp/bili-verif2/kernel/src/wire/google.ts", + file: new URL("../kernel/src/wire/google.ts", import.meta.url).pathname, function: "coreToGoogle", params: { messages: msgs }, ctx: ctx as never,