Files
PaperClipAI/tests/runner-e2e/stock-harness-manifest.ts
T
DottaandPaperclip b85668c406 Fix skill capability metadata and publish the bounded repair comparison
Regenerate both capability inventories for the early issue-document recipe and reject stale derived manifests before stock-harness provider admission. Preserve the eight measured repair results, automatic recovery cost, and OpenCode delivery diagnosis.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-02 16:30:31 -05:00

20 lines
876 B
TypeScript

import { readFileSync } from "node:fs";
import { execFileSync } from "node:child_process";
import { fileURLToPath } from "node:url";
import { buildContract } from "../../packages/paperclip-runner/scripts/generate-capability-contract.mjs";
/** Canonical derived metadata must match the instruction sources before providers. */
export async function verifyCapabilityManifest(
read = (path: string) => readFileSync(path, "utf8"),
checkInventory = () => execFileSync(process.execPath, [fileURLToPath(new URL(
"../../packages/paperclip-runner/scripts/check-capability-inventory.mjs", import.meta.url,
))], { stdio: "pipe" }),
) {
const expected = await buildContract();
for (const [path, content] of Object.entries(expected)) {
if (read(path) !== content) throw new Error(`Generated capability manifest drift: ${path}`);
}
checkInventory();
return true;
}