Keep one verified copy of session audio

This commit is contained in:
2026-11-30 01:41:12 +00:00
parent c07d4f24a2
commit 3094ad892f
39 changed files with 278 additions and 1570 deletions

View File

@@ -262,7 +262,7 @@ func TestExecuteRestoreIncludeAudioRestoresAudio(t *testing.T) {
}
}
func TestExecuteRestoreIncludeAudioUsesCacheAfterWorkspaceDeletion(t *testing.T) {
func TestExecuteRestoreIncludeAudioDownloadsAfterWorkspaceDeletion(t *testing.T) {
workspaceRoot := t.TempDir()
pipelinePath, campaignPath, sessionPath := writeValidConfigFiles(t, workspaceRoot)
@@ -295,8 +295,8 @@ func TestExecuteRestoreIncludeAudioUsesCacheAfterWorkspaceDeletion(t *testing.T)
if code != 0 {
t.Fatalf("second restore exit code = %d, want 0; stderr=%q", code, stderr.String())
}
if got := fakeDownloadCount(fake, committedAudioKey); got != 1 {
t.Fatalf("audio downloads after cached restore = %d, want still 1", got)
if got := fakeDownloadCount(fake, committedAudioKey); got != 2 {
t.Fatalf("audio downloads after restored session was removed = %d, want 2", got)
}
mustReadEquals(t, filepath.Join(sessionRoot, "audio", "alice.flac"), "remote-audio")
}