Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/worker/src/trajectoryExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export interface RolloutProvenance {
schema_version: "rollout-wire/v1";
evidence_source: "client_reported";
redaction_version: "bscode/pii-redact/v1";
/** SHA-256 of the full redacted JSONL batch (from EvidenceManifest.content_hash). */
batch_manifest_hash?: string;
}

// ── AEP re-exports (for consumers that import from trajectoryExport) ──────────
Expand Down Expand Up @@ -107,6 +109,7 @@ export function buildRolloutRecord(opts: {
buildResult: BuildResultSnapshot | null;
toolCallSequence?: ToolCallEvent[];
finalAnswer?: string;
batchManifestHash?: string;
}): RolloutWireRecord {
const {
jobId,
Expand All @@ -116,6 +119,7 @@ export function buildRolloutRecord(opts: {
buildResult,
toolCallSequence = [],
finalAnswer = "",
batchManifestHash,
} = opts;

// Strict binary encoding: 'success' → 1, any failure → 0, no-build → 0 with status=unknown.
Expand Down Expand Up @@ -146,6 +150,7 @@ export function buildRolloutRecord(opts: {
schema_version: "rollout-wire/v1",
evidence_source: "client_reported",
redaction_version: "bscode/pii-redact/v1",
...(batchManifestHash ? { batch_manifest_hash: batchManifestHash } : {}),
},
};
validateRolloutRecord(record);
Expand Down
Loading