fix(artifacts): bind session inventories to target identity

This commit is contained in:
Codex
2026-10-14 02:01:13 +08:00
parent 781827b7b4
commit 346275525e
10 changed files with 70 additions and 45 deletions
+19
View File
@@ -0,0 +1,19 @@
import { ArtifactResourceScope } from "../../src/artifacts/ArtifactResourceScope.js";
import { scanArtifactInventory } from "../../src/artifacts/inventory/ArtifactInventory.js";
/** Compute the root identity used by artifact-provider extraction fixtures. */
export const artifactGraphRootSha256 = async (
path: string,
): Promise<string> => {
const resources = new ArtifactResourceScope();
try {
const snapshot = await scanArtifactInventory(path, {
resourceScope: resources,
environment: process.env,
integrity: { mode: "fail" },
});
return snapshot.manifest.root_sha256;
} finally {
await resources.close();
}
};