Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -0,0 +1,31 @@
// R-P12c — worker seam tests: envelope parsing (tenant mismatch fail-closed)
// and companion-consumer skip behaviour for non-automation events.
import { describe, expect, test } from "vitest";
import { AutomationExecutorJobError, parseAutomationExecutorOutboxJob } from "./automation-forward.js";
describe("parseAutomationExecutorOutboxJob", () => {
test("accepts a well-formed automation.execution.requested envelope", () => {
expect(
parseAutomationExecutorOutboxJob({
eventType: "automation.execution.requested",
tenantId: "tenant-a",
payload: { executionId: "exec-1", tenantId: "tenant-a" },
})
).toEqual({ tenantId: "tenant-a", executionId: "exec-1" });
});
test("rejects foreign event types, missing ids and tenant mismatches fail-closed", () => {
expect(() => parseAutomationExecutorOutboxJob({ eventType: "workflow.trigger.event", tenantId: "t", payload: {} })).toThrow(AutomationExecutorJobError);
expect(() => parseAutomationExecutorOutboxJob({ eventType: "automation.execution.requested", tenantId: "", payload: { executionId: "e" } })).toThrow(
AutomationExecutorJobError
);
expect(() =>
parseAutomationExecutorOutboxJob({
eventType: "automation.execution.requested",
tenantId: "tenant-a",
payload: { executionId: "exec-1", tenantId: "tenant-b" },
})
).toThrow(/tenantId mismatch/);
});
});