* fix(hopper): normalize string-backed addresses and update verification * feat(native): add inspection primitives, dispatch traces and approved UI observation * test: prioritize real artifact E2E and captured golden regressions * fix(process): queue observed output before reactive rendering actions * test: prune redundant cases and strengthen boundary assertions * fix(cli): route native value tracing through shared workflows * test: replace synthetic success with real workflows and captured data * fix(catalog): separate portable metadata from native host availability
30 lines
987 B
TypeScript
30 lines
987 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import {
|
|
resolveArtifactIntegrityPolicy,
|
|
resolveNativeMountPolicy,
|
|
} from "./ArtifactInventory/policy.js";
|
|
|
|
describe("artifact inventory policy resolution", () => {
|
|
it("admits native mounting only when caller and operator both allow it", () => {
|
|
expect(resolveNativeMountPolicy(false, true)).toEqual({
|
|
status: "disabled",
|
|
});
|
|
expect(() => resolveNativeMountPolicy(true, false)).toThrow(
|
|
"disabled by operator policy",
|
|
);
|
|
expect(resolveNativeMountPolicy(true, true)).toEqual({
|
|
status: "approved",
|
|
});
|
|
});
|
|
|
|
it("admits parsed continuation intent only under operator policy", () => {
|
|
expect(() =>
|
|
resolveArtifactIntegrityPolicy({ mode: "record-and-continue" }, false),
|
|
).toThrow("requires explicit approval and operator policy");
|
|
expect(
|
|
resolveArtifactIntegrityPolicy({ mode: "record-and-continue" }, true),
|
|
).toEqual({ mode: "record-and-continue" });
|
|
});
|
|
});
|