fix(snapshot): report query workflow and Evidence counts separately

This commit is contained in:
N0zoM1z0
2026-10-09 18:13:50 +08:00
parent c5c75c38c3
commit 0e779533a9
6 changed files with 60 additions and 3 deletions
+7 -1
View File
@@ -347,7 +347,13 @@ describe("target-free MCP workflow", () => {
arguments: { snapshot_path: snapshotPath },
}),
).result,
).toMatchObject({ path: snapshotPath, entries: 0 });
).toMatchObject({
path: snapshotPath,
entries: 0,
primitive_entries: 0,
workflow_entries: 0,
evidence_records: 0,
});
expect(JSON.parse(await readFile(snapshotPath, "utf8"))).toMatchObject({
evidence_bundle: { records: [], unknowns: [] },
});
@@ -89,6 +89,16 @@ describe("MCP composed workflow snapshot replay", () => {
expect(closed.isError, JSON.stringify(closed.content)).not.toBe(true);
const snapshot = await readAnalysisSnapshot(snapshotPath);
if (!snapshot.ok) throw snapshot.error;
const receipt = toolContract("close_binary").outputSchema.parse(
closed.structuredContent,
).result;
expect(receipt).toMatchObject({
path: snapshotPath,
entries: snapshot.value.entries.length,
primitive_entries: snapshot.value.entries.length,
workflow_entries: snapshot.value.workflow_entries?.length ?? 0,
evidence_records: snapshot.value.evidence_bundle.records.length,
});
expect(snapshot.value.workflow_entries).toHaveLength(1);
expect(snapshot.value.evidence_bundle.records).toContainEqual(
expect.objectContaining({