fix(application): harden replay and process cleanup

This commit is contained in:
N0zoM1z0
2026-07-14 20:37:04 +00:00
parent c240ae19c6
commit b5dc7b70ec
16 changed files with 620 additions and 61 deletions
+17
View File
@@ -192,6 +192,23 @@ describe("historical source graph", () => {
).toThrow(/Complete inventory/u);
});
it("keeps distinct failure reasons for the same path and parser", () => {
const partial = graphInput();
partial.inventory_state = "partial";
partial.parse_failures = [
{ path: "src/main.ts", parser: "babel", reason: "First failure" },
{ path: "src/main.ts", parser: "babel", reason: "Second failure" },
];
expect(createHistoricalSourceGraph(partial).parse_failures).toEqual(
partial.parse_failures,
);
partial.parse_failures.push(partial.parse_failures[1]!);
expect(() => createHistoricalSourceGraph(partial)).toThrow(
/parse_failures.*unique/iu,
);
});
it("rejects strict unknown fields, invalid VCS, dangling internal edges, and false manifests", () => {
expect(() =>
createHistoricalSourceGraph({ ...graphInput(), surprise: true }),