refactor(workflows): simplify evidence reference inputs

This commit is contained in:
morluto
2026-09-29 11:37:54 +08:00
parent 53db3a476b
commit 24e1fa9a76
9 changed files with 107 additions and 119 deletions
@@ -1,6 +1,7 @@
import { describe, expect, it } from "vitest";
import { projectManagedApplicationGraphEvidence } from "../../../src/application/ManagedApplicationGraphService.js";
import { managedApplicationGraphReferenceInputSchema } from "../../../src/contracts/managedWorkflowToolContracts.js";
import { traceApplicationFeatureEvidence } from "../../../src/application/JavaScriptApplicationWorkflowService.js";
import { MANAGED_STATIC_PROVIDER } from "../../../src/application/InvestigationProviders.js";
import { createEvidence, parseEvidence } from "../../../src/domain/evidence.js";
@@ -159,6 +160,26 @@ describe("managed application graph projection", () => {
});
});
describe("managed application graph request", () => {
it("accepts any nonempty set of sources and rejects duplicate IDs", () => {
const id = `ev_${"a".repeat(64)}`;
expect(
managedApplicationGraphReferenceInputSchema.safeParse({
managed_members_evidence_id: id,
}).success,
).toBe(true);
expect(
managedApplicationGraphReferenceInputSchema.safeParse({}).success,
).toBe(false);
expect(
managedApplicationGraphReferenceInputSchema.safeParse({
managed_members_evidence_id: id,
managed_native_boundaries_evidence_id: id,
}).success,
).toBe(false);
});
});
describe("managed application graph coverage", () => {
it("preserves partial parser coverage in graph and per-fact coverage", () => {
const bytes = buildManagedPeFixture();