fix(housekeeping): address task 14 review round 2

This commit is contained in:
Simo committed 2026-08-30 11:30:17 +02:00
1 parent d09eaa33d6
commit c524b305d7
17 files changed
+614 -130

No files matched your search

@@ -122,6 +122,32 @@ describe("Content production mutation adapter", () => {
expect(JSON.stringify(deps.writeAudit.mock.calls)).not.toContain("Hello");
});
it("routes a logo write through correlated intent and outcome audit", async () => {
const deps = dependencies();
await deps.adapter.execute(
"logo.save",
{ file: { name: "logo.png" } },
mutationContext,
);
expect(deps.executeOperation).toHaveBeenCalledWith(
"logo.save",
expect.anything(),
mutationContext,
);
expect(deps.writeAudit.mock.calls.map(([entry]) => entry)).toEqual([
expect.objectContaining({
action: "content.logo.save",
outcome: "intent",
correlationId: "production-matrix",
}),
expect.objectContaining({
action: "content.logo.save",
outcome: "success",
correlationId: "production-matrix",
}),
]);
});
it("returns typed partial when database committed but the external effect failed", async () => {
const deps = dependencies();
deps.executeOperation.mockRejectedValueOnce(