Enforce requested adapter output paths

This commit is contained in:
2026-08-10 21:57:54 +00:00
parent 702f622e18
commit 8ff1b4fa66
15 changed files with 137 additions and 126 deletions

View File

@@ -139,13 +139,10 @@ func (transcribeStage) Run(ctx context.Context, env *Env, m *manifest.Manifest)
continue
}
if strings.TrimSpace(res.OutputRawTranscriptPath) == "" {
res.OutputRawTranscriptPath = j.outPath
}
if filepath.Clean(res.OutputRawTranscriptPath) != filepath.Clean(j.outPath) {
if _, err := authoritativeOutputPath(j.outPath, res.OutputRawTranscriptPath); err != nil {
mu.Lock()
if firstErr == nil {
firstErr = fmt.Errorf("speaker %q: adapter output path %q did not match expected %q", j.speakerID, res.OutputRawTranscriptPath, j.outPath)
firstErr = fmt.Errorf("speaker %q: %w", j.speakerID, err)
cancel()
}
mu.Unlock()