From 821d5f99cd6f5554b3ece965c5a26889524d782a Mon Sep 17 00:00:00 2001 From: Mathias Date: Tue, 9 Jun 2026 23:37:54 +0200 Subject: [PATCH] =?UTF-8?q?docs(bdd):=20scenario=20for=20transcript=20reus?= =?UTF-8?q?e=20=E2=80=94=20re-analysis=20never=20re-fetches?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Capture the ADR-021 promise as a mapped BDD scenario: re-analyzing a stored video reads the stored transcript and does not fetch captions. Since paste-a-URL and the onboarding burst summarize through the same engine chokepoint (resolveTranscript, store-first), this one scenario covers their reuse path too — there is exactly one gated caption entry point (youtube.FetchTranscript → WaitFetchGate) and one engine caller in front of it, so the dedup is structural, not per-feature. Mapped to TestProcessNewVideo_SecondSummarizeDoesNotRefetch. Co-Authored-By: Claude Opus 4.8 (1M context) --- docs/use-cases/summarize_new_video.feature | 11 +++++++++++ test/acceptance/scenario_coverage_test.go | 1 + 2 files changed, 12 insertions(+) diff --git a/docs/use-cases/summarize_new_video.feature b/docs/use-cases/summarize_new_video.feature index 1249dac..39b5e40 100644 --- a/docs/use-cases/summarize_new_video.feature +++ b/docs/use-cases/summarize_new_video.feature @@ -31,5 +31,16 @@ Feature: Summarize new videos from subscribed channels When the watcher sees "Designing for Attention" again Then Tapir does not produce a second summary for it + Scenario: Re-analyzing a stored video does not re-fetch its transcript + Given a transcript for "Designing for Attention" is already stored + When the video is summarized again + Then Tapir reads the stored transcript + And Tapir does not fetch captions from YouTube + # Captions-first is the core path (ADR-007). Audio-download + speech-to-text is # deferred and intentionally has no scenario here yet. + # + # Transcript persistence (ADR-021): the stored transcript is shared, keyed by + # (provider, provider_video_id) and read before any caption fetch, so the + # re-analysis scenario above also covers paste-a-URL and the onboarding burst — + # both summarize through the same engine chokepoint. diff --git a/test/acceptance/scenario_coverage_test.go b/test/acceptance/scenario_coverage_test.go index 912ac10..a4a4708 100644 --- a/test/acceptance/scenario_coverage_test.go +++ b/test/acceptance/scenario_coverage_test.go @@ -67,6 +67,7 @@ var scenarioCoverage = map[string]string{ "A subscribed channel posts a video with no usable transcript": "TestVideoWithNoTranscriptIsSkipped", "A channel I am not subscribed to posts a video": "TestUnsubscribedChannelVideoIsNotProcessed", "The same video is not summarized twice": "TestAlreadySummarizedVideoIsNotReprocessed", + "Re-analyzing a stored video does not re-fetch its transcript": "TestProcessNewVideo_SecondSummarizeDoesNotRefetch", } var (