From 8f62d053ee33e18cee01b32285234feee6f3d053 Mon Sep 17 00:00:00 2001 From: Mathias Date: Fri, 2 Oct 2026 16:43:46 +0200 Subject: [PATCH] test: the duration limit is checked against what is converted, not what the header claims (red; adversarial review F2) Co-Authored-By: Claude Sonnet 5.5 --- internal/uploads/intake_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/uploads/intake_test.go b/internal/uploads/intake_test.go index fb2e39c..4fc8dbd 100644 --- a/internal/uploads/intake_test.go +++ b/internal/uploads/intake_test.go @@ -106,7 +106,8 @@ func TestAccept_ValidAudioIsStoredProbedQueuedAndSubmitted(t *testing.T) { assert.Equal(t, audio, r.pr.seen, "the prober must see the complete uploaded bytes, on disk") require.Len(t, r.sub.jobs, 1) job := r.sub.jobs[0] - assert.Equal(t, uploads.Job{UserID: "user-1", UploadID: "up-1", Path: job.Path}, job) + assert.Equal(t, uploads.Job{UserID: "user-1", UploadID: "up-1", Path: job.Path, Duration: 10 * time.Minute}, job, + "the job carries what the file CLAIMED, so the worker can compare it with what was converted") assert.Equal(t, filepath.Dir(job.Path), r.tmp, "the temp file lives in the configured directory") got, err := os.ReadFile(job.Path) require.NoError(t, err)