Integrate transcription checkpoints across lifecycle
This commit is contained in:
@@ -82,6 +82,28 @@ func TestExecuteRestoreRoundTripsPublishedExtractionAndManifestMetadata(t *testi
|
||||
remoteManifest.RunID = "20260519T010203Z-a1b2c3d4"
|
||||
producerRoot := "/prior/workspace/work/sample-campaign/2026-05-03"
|
||||
remoteManifest.LocalWorkDir = filepath.Join(producerRoot, "runs", remoteManifest.RunID)
|
||||
rawRelative := "transcripts/raw/alice.json"
|
||||
rawOutput := manifest.ArtifactRecord{
|
||||
Kind: "transcript_raw", LocalPath: filepath.Join(producerRoot, filepath.FromSlash(rawRelative)),
|
||||
ProducerRunID: remoteManifest.RunID, Checksum: strings.Repeat("b", 64),
|
||||
}
|
||||
remoteManifest.MarkStageSucceeded("transcribe", time.Now().UTC(), []manifest.ArtifactRecord{rawOutput})
|
||||
remoteManifest.Stages["transcribe"].TranscribeStateVersion = manifest.TranscribeStateContractVersion
|
||||
remoteManifest.Stages["transcribe"].TranscribeSpeakers = map[string]manifest.TranscribeSpeakerRecord{
|
||||
"alice": {
|
||||
FingerprintVersion: manifest.TranscribeFingerprintContractVersion,
|
||||
Fingerprint: strings.Repeat("c", 64),
|
||||
AudioPath: "audio/alice.flac",
|
||||
AudioSHA256: strings.Repeat("a", 64),
|
||||
AudioSize: 12,
|
||||
Output: manifest.ArtifactRecord{
|
||||
Kind: "transcript_raw", LocalPath: rawRelative,
|
||||
ProducerRunID: remoteManifest.RunID, Checksum: strings.Repeat("b", 64),
|
||||
},
|
||||
OutputSize: 15,
|
||||
ProducerRunID: remoteManifest.RunID,
|
||||
},
|
||||
}
|
||||
remoteManifest.Stages["extract"] = &manifest.StageRecord{
|
||||
Name: "extract", Status: manifest.StatusSucceeded,
|
||||
Outputs: []manifest.ArtifactRecord{{
|
||||
@@ -121,6 +143,13 @@ func TestExecuteRestoreRoundTripsPublishedExtractionAndManifestMetadata(t *testi
|
||||
if want := filepath.Join(sessionRoot, "artifacts", "encounters.json"); lane.LocalPath != want {
|
||||
t.Fatalf("rebased extraction path = %q, want %q", lane.LocalPath, want)
|
||||
}
|
||||
speaker := restored.Stages["transcribe"].TranscribeSpeakers["alice"]
|
||||
if speaker.AudioPath != "audio/alice.flac" || speaker.Output.LocalPath != rawRelative {
|
||||
t.Fatalf("restored speaker paths = %#v, want session-relative paths", speaker)
|
||||
}
|
||||
if _, err := os.Stat(filepath.Join(sessionRoot, filepath.FromSlash(rawRelative))); !os.IsNotExist(err) {
|
||||
t.Fatalf("unpublished raw transcript should not be restored; stat err=%v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestExecuteRestoreIncludeAudioRestoresAudio(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user