From 12c5433c67dc2e62916b879349c7ba2b6e0431f0 Mon Sep 17 00:00:00 2001 From: Dotta Date: Fri, 2 Oct 2026 12:35:17 -0500 Subject: [PATCH] test(evals): match complete protocol fixture preparation Co-Authored-By: Paperclip --- tests/runner-e2e/STOCK-HARNESS.md | 5 +++++ tests/runner-e2e/catalog.ts | 2 +- tests/runner-e2e/stock-harness-checks.mjs | 10 +++++++++- tests/runner-e2e/stock-harness-checks.test.mjs | 6 ++++-- tests/runner-e2e/stock-harness-comparison.json | 2 +- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/tests/runner-e2e/STOCK-HARNESS.md b/tests/runner-e2e/STOCK-HARNESS.md index 70ecfb18272..c5df1e385cd 100644 --- a/tests/runner-e2e/STOCK-HARNESS.md +++ b/tests/runner-e2e/STOCK-HARNESS.md @@ -151,6 +151,11 @@ builds that daemon from the locked Rust source before TypeScript gates, retains The required daemon-frame test selects that built debug binary explicitly, without replacing staged product binaries. The receipt records its SHA-256; verification rejects a changed binary before provider admission. +The [next cold pilot](https://github.com/paperclipai/paperclip/actions/runs/37040493183) +at `ac6ddefb589c18fa9c30946db40e58499e9fb0e0` then found the required fake Codex +protocol fixture absent. It also stopped before paid providers. Setup uses the +package's ordinary locked workspace `--bins` build, covering both the daemon +and its fixture; verification binds both binaries to the retained receipt. Dispatch the trusted workflow from `master`, with `target_branch` naming the same-repository candidate and an exact cell selector first. The workflow resolves diff --git a/tests/runner-e2e/catalog.ts b/tests/runner-e2e/catalog.ts index 8328108580a..f8f993f8c90 100644 --- a/tests/runner-e2e/catalog.ts +++ b/tests/runner-e2e/catalog.ts @@ -1226,7 +1226,7 @@ export const runnerSuites: readonly RunnerSuiteFixture[] = [ expectedMatrixSize: 24, definitionMetadata: { version: 1, instructions: "historical-default-hire-comparison", scheduling: "explicit-only", - comparison: { variant: "previous-instructions", candidateSha: "712dc98cf52a26fafd1c894e40c081da991c4fa7", restoredFrom: "e00d10d5d5594f6e2d1e8cf4e0ec81c074b0bd88", nativeCodexFix: "held-constant-14920" }, + comparison: { variant: "previous-instructions", candidateSha: "f02d8d0df327abb43b20c7e7beb86798239abbf5", restoredFrom: "e00d10d5d5594f6e2d1e8cf4e0ec81c074b0bd88", nativeCodexFix: "held-constant-14920" }, sourceDigest: stockHarnessSourceDigest(), grading: "public-default-bundle-and-delivered-prompts-plus-independent-lifecycle-oracles", vendorBaseEvidence: "required deterministic Codex driver/runnerd/Rust gate; task success is not vendor-base proof", diff --git a/tests/runner-e2e/stock-harness-checks.mjs b/tests/runner-e2e/stock-harness-checks.mjs index 1000f935309..0676864ae20 100644 --- a/tests/runner-e2e/stock-harness-checks.mjs +++ b/tests/runner-e2e/stock-harness-checks.mjs @@ -73,6 +73,9 @@ export function sourceFingerprint() { "packages/paperclip-runner/src/live/runnerd-codex-transport.ts", "packages/paperclip-runner/src/live/live-session.ts", "packages/paperclip-runner/runner/crates/runner-core/src/codex_provider.rs", + "packages/paperclip-runner/runner/crates/runner-core/src/bin/fake-codex-app-server.rs", + "packages/paperclip-runner/runner/Cargo.toml", "packages/paperclip-runner/runner/Cargo.lock", + "packages/paperclip-runner/runner/crates/runner-core/Cargo.toml", "packages/paperclip-runner/runner/crates/runner-core/tests/codex_provider.rs", ]); const sourceErrors = []; @@ -90,6 +93,7 @@ export function assertPreflightReceipt(report, current) { report.setup?.passed !== true || report.setup?.exitCode !== 0 || report.setup?.sdkExitCode !== 0 || report.setup?.runnerdExitCode !== 0 || report.setup?.runnerdSha256 !== current.runnerdSha256 || + report.setup?.fakeCodexSha256 !== current.fakeCodexSha256 || report.providerCalls !== 0 || report.sourceSha !== current.sha || report.sourceFingerprint !== current.fingerprint || report.sourceErrors?.length !== 0 || !Array.isArray(report.gates) || report.gates.length !== expected.length || @@ -115,6 +119,8 @@ export function main(args = process.argv.slice(2)) { sha: git.stdout.trim(), fingerprint: source.fingerprint, runnerdSha256: createHash("sha256").update(readFileSync(join(root, "packages/paperclip-runner/runner/target/debug", `paperclip-runnerd${process.platform === "win32" ? ".exe" : ""}`))).digest("hex"), + fakeCodexSha256: createHash("sha256").update(readFileSync(join(root, + "packages/paperclip-runner/runner/target/debug/fake-codex-app-server"))).digest("hex"), }); const output = resolve(verify, ".."); for (const gate of stockHarnessGates) { @@ -143,7 +149,7 @@ export function main(args = process.argv.slice(2)) { // cells do not download native artifacts, so compile it before TS discovery. const runnerd = setupRun.status === 0 ? spawnSync("cargo", ["build", "--locked", ...(args.includes("--allow-rust-network") ? [] : ["--offline"]), - "-p", "paperclip-runner-core", "--bin", "paperclip-runnerd"], { + "--workspace", "--bins"], { cwd: join(root, "packages/paperclip-runner/runner"), env, encoding: "utf8", timeout: 10 * 60_000, }) : null; writeFileSync(join(output, "runnerd-build.txt"), `${runnerd?.stdout ?? ""}\n${runnerd?.stderr ?? ""}`); @@ -163,6 +169,8 @@ export function main(args = process.argv.slice(2)) { const runnerdBinary = join(root, "packages/paperclip-runner/runner/target/debug", `paperclip-runnerd${process.platform === "win32" ? ".exe" : ""}`); setup.runnerdSha256 = createHash("sha256").update(readFileSync(runnerdBinary)).digest("hex"); + setup.fakeCodexSha256 = createHash("sha256").update(readFileSync(join(root, + "packages/paperclip-runner/runner/target/debug/fake-codex-app-server"))).digest("hex"); const results = []; for (const gate of stockHarnessGates) { console.log(`Checking ${gate.id}: ${gate.name}`); diff --git a/tests/runner-e2e/stock-harness-checks.test.mjs b/tests/runner-e2e/stock-harness-checks.test.mjs index 428cfa9ac0d..92d34337e11 100644 --- a/tests/runner-e2e/stock-harness-checks.test.mjs +++ b/tests/runner-e2e/stock-harness-checks.test.mjs @@ -40,9 +40,10 @@ describe("stock harness prerequisite coverage", () => { }); describe("stock harness prerequisite admission", () => { - const current = { sha: "a".repeat(40), fingerprint: "b".repeat(64), runnerdSha256: "c".repeat(64) }; + const current = { sha: "a".repeat(40), fingerprint: "b".repeat(64), runnerdSha256: "c".repeat(64), fakeCodexSha256: "e".repeat(64) }; const receipt = () => ({ schema: "paperclip.stock-harness-preflight.v3", passed: true, - setup: { passed: true, exitCode: 0, sdkExitCode: 0, runnerdExitCode: 0, runnerdSha256: current.runnerdSha256 }, + setup: { passed: true, exitCode: 0, sdkExitCode: 0, runnerdExitCode: 0, runnerdSha256: current.runnerdSha256, + fakeCodexSha256: current.fakeCodexSha256 }, providerCalls: 0, sourceSha: current.sha, sourceFingerprint: current.fingerprint, sourceErrors: [], gates: [...stockHarnessGates.map(g => g.id), "SH-1-rust"].map(id => ({ id, passed: true, exitCode: 0 })) }); it("admits the same passing source revision", () => expect(assertPreflightReceipt(receipt(), current).passed).toBe(true)); @@ -58,6 +59,7 @@ describe("stock harness prerequisite admission", () => { ["failed cold setup", r => { r.setup.passed = false; r.setup.exitCode = 1; }], ["missing daemon build", r => { delete r.setup.runnerdExitCode; }], ["changed daemon binary", r => { r.setup.runnerdSha256 = "d".repeat(64); }], + ["changed protocol fixture", r => { r.setup.fakeCodexSha256 = "d".repeat(64); }], ])("rejects %s before providers", (_name, mutate) => { const r = receipt(); mutate(r); expect(() => assertPreflightReceipt(r, current)).toThrow("exact source SHA and fingerprint"); }); diff --git a/tests/runner-e2e/stock-harness-comparison.json b/tests/runner-e2e/stock-harness-comparison.json index 3a92648e128..65d6bb060c3 100644 --- a/tests/runner-e2e/stock-harness-comparison.json +++ b/tests/runner-e2e/stock-harness-comparison.json @@ -1,7 +1,7 @@ { "schema": "paperclip.stock-harness-comparison.v1", "variant": "previous-instructions", - "candidateSha": "712dc98cf52a26fafd1c894e40c081da991c4fa7", + "candidateSha": "f02d8d0df327abb43b20c7e7beb86798239abbf5", "restoredInstructionsFrom": "e00d10d5d5594f6e2d1e8cf4e0ec81c074b0bd88", "nativeCodex14920": "held-constant; no before/after performance claim", "productionDifferences": [