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
@@ -368,7 +368,13 @@ export class BinarySession
if (!written.ok) return written;
const closed = await this.#closeActive(options);
return closed.ok
? ok({ ...written.value, entries: snapshot.value.entries.length })
? ok({
...written.value,
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,
})
: closed;
});
}
@@ -22,6 +22,12 @@ export interface SavedAnalysisSnapshot {
readonly path: string;
readonly bytes: number;
readonly entries: number;
/** Eligible primitive query bindings; also reported by the legacy entries field. */
readonly primitive_entries: number;
/** Eligible composed workflow bindings, separate from primitive queries. */
readonly workflow_entries: number;
/** All retained Evidence records, including observations without a replay binding. */
readonly evidence_records: number;
}
/** Target lifecycle used by CLI and MCP without exposing a concrete provider. */