Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions apps/server/src/shepherd/live-runtime.composition.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { readFile } from "node:fs/promises";
import path from "node:path";
import { describe, expect, it } from "vitest";

function liveVerifierArguments(source: string): string {
const expression = "new ContainerVerifier(registry(), {";
const start = source.indexOf(expression);
if (start < 0) throw new Error("live verifier composition site was not found");
const close = /^\s*\}\);/mu.exec(source.slice(start));
if (!close) throw new Error("live verifier composition site was not terminated");
return source
.slice(start, start + close.index)
.replace(/\/\/[^\n]*/gu, "")
.replace(/\/\*[\s\S]*?\*\//gu, "");
}

describe("live Runtime verifier composition", () => {
it("addresses independent verification snapshots through the controller state volume", async () => {
const source = await readFile(
path.resolve(process.cwd(), "src/shepherd/live-runtime.integration.test.ts"),
"utf8",
);
Comment on lines +1 to +22
const options = liveVerifierArguments(source);

expect(options).toContain("stateRoot: config.containerStateRoot");
expect(options).toContain("stateVolume: config.containerStateVolume");
});
});
2 changes: 2 additions & 0 deletions apps/server/src/shepherd/live-runtime.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,8 @@ describe.skipIf(!liveEnabled)("Shepherd live Codex Runtime gate", () => {
maxTimeoutMs: config.shepherdVerificationTimeoutMs,
maxOutputBytes: config.codexMaxOutputBytes,
sensitiveValues: [config.arkApiKey, config.authToken],
stateRoot: config.containerStateRoot,
stateVolume: config.containerStateVolume,
});
verifiers.push(verifier);
const store = new JsonStore(statePath, {
Expand Down