feat(api): expose transcript state via X-Transcript-Status header#37
Merged
Conversation
…oses #36) PullMD distinguishes YouTube transcript states internally (ok|none|blocked |error) but only conveyed them as English placeholder strings in the body, forcing programmatic consumers (collector) to brittle-string-match a transient 429 block vs a genuinely absent transcript. Surface yt.transcriptStatus on the extraction result and set it as the X-Transcript-Status response header on GET /api (and in the SSE result event). Header is only set for sources that carry a status (YouTube); absent otherwise. Transient blocks are never cached, so the header is always present for the actionable `blocked` case (served fresh). Documented in README (both header references). Tests: 764 JS (+3). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QzC4vKjJBjuAoD1JzyYAWp
syswave-dev
added a commit
that referenced
this pull request
Jun 25, 2026
…metadata on cache hits (#39) Strip 1x1 tracking pixels in cleanDom, add the sciencedaily-lead-image recipe (unwrap #text), and serve the full persisted metadata (og:image/twitter:image, description, author, …) on /api cache hits in both frontmatter and format=json. Batches untagged main commits since v3.1.0: #34 (youtube 429 vs missing transcript), #35 (bundle yt_transcript.py), #37 (X-Transcript-Status). Bumps version to 3.2.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #36. Follow-up to #33/#34.
Why
PullMD distinguishes YouTube transcript states internally (
ok | none | blocked | error) but only conveyed them as English placeholder strings in the response body. Programmatic consumers (notably the collector discovery pipeline) had to brittle-string-match to tell a transient 429 block from a genuinely absent transcript.What
lib/web.js: surfaceyt.transcriptStatuson the extraction result.server.js: setX-Transcript-Statusresponse header onGET /api; includetranscriptStatusin the SSEresultevent.blockedcase (served fresh).Consumer semantics
ok→ real transcript.blocked(HTTP 429) /error→ transient, not cached → skip persisting, retry later.none→ permanent negative.Tests
764 JS (+3): result surfaces
transcriptStatus;GET /apisets the header; header omitted for sources without a status.🤖 Generated with Claude Code