Add migration validation summary gate

This commit is contained in:
ZacharyZhang-NY committed 2026-05-23 21:35:21 -04:00
1 parent 62ac397459
commit babbf07cb2
4 files changed
+131 -3

No files matched your search

@@ -445,11 +445,14 @@ describe("domain services", () => {
tableChecksums: Record<string, string>;
idMaps: Record<string, string[]>;
failures: Array<{ table: string; reason: string }>;
validationSummary: { missingTableCount: number; passed: boolean };
rollbackPack: { sourceDatabasePath: string };
};
expect(report.tableChecksums.agents).toHaveLength(64);
expect(report.idMaps.agents).toEqual(["agent-1"]);
expect(report.failures.some((failure) => failure.reason === "missing_table")).toBe(true);
expect(report.validationSummary.missingTableCount).toBeGreaterThan(0);
expect(report.validationSummary.passed).toBe(false);
expect(report.rollbackPack.sourceDatabasePath).toBe(legacyPath);
connection.close();
});