feat: make filesystem Evidence operational after materialization (P6)
This commit is contained in:
@@ -289,11 +289,16 @@ test("index schema fails closed when semantic preflight refuses the collection",
|
||||
expect(runChild).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
test("evidence stops before child execution for filesystem sources and refuses private HTTP hosts outside the allowlist", async () => {
|
||||
test("filesystem Evidence proceeds after materialization and private HTTP hosts outside the allowlist are refused", async () => {
|
||||
const filesystem = fixture(filesystemWorkspace);
|
||||
const blocked = await filesystem.service.preprocessEvidence({ workspaceId: "fs-workspace" });
|
||||
expect(blocked).toMatchObject({ status: "blocked", code: "evidence_materialization_required" });
|
||||
expect(filesystem.runChild).not.toHaveBeenCalled();
|
||||
filesystem.runChild.mockResolvedValueOnce({
|
||||
exitCode: 0,
|
||||
stdout: JSON.stringify({ status: "succeeded", counts: { added: 1 } }),
|
||||
stderr: "",
|
||||
});
|
||||
const materialized = await filesystem.service.preprocessEvidence({ workspaceId: "fs-workspace" });
|
||||
expect(materialized).toMatchObject({ status: "succeeded", code: "ok" });
|
||||
expect(filesystem.runChild).toHaveBeenCalledTimes(1);
|
||||
|
||||
const httpDataRoot = mkdtempSync(join(tmpdir(), "tht-preprocessing-service-"));
|
||||
roots.push(httpDataRoot);
|
||||
|
||||
Reference in New Issue
Block a user