mirror of
https://github.com/morluto/rea.git
synced 2026-12-04 22:11:12 +00:00
fix(elf): retain verified artifact reports through descriptor finalization
This commit is contained in:
1 parent
ba093e0777
commit
fbf79630d2
14 files changed
+271
-76
No files matched your search
@@ -131,3 +131,21 @@ it("retains a completed observation when the caller cancels as the provider comp
|
||||
normalized_result: report,
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps a failed report for a different artifact outside admitted Evidence", async () => {
|
||||
const foreignReport = {
|
||||
...report,
|
||||
artifact: { ...report.artifact, path: "/artifacts/other" },
|
||||
};
|
||||
const failure = new AnalysisCancelledError("inspect_elf_notes", {
|
||||
partialObservation: foreignReport,
|
||||
});
|
||||
const service = new ElfNotesService({
|
||||
identity,
|
||||
inspect: async () => ({ ok: false, error: failure }),
|
||||
});
|
||||
const result = await service.inspect({ path });
|
||||
if (result.ok) throw new Error("Expected the original provider failure");
|
||||
expect(result.error).toBe(failure);
|
||||
expect(result.error.partialObservation).toBe(foreignReport);
|
||||
});
|
||||
Reference in new issue
Block a user