Route all remaining agent/API audioUrl emits through the cached host - #134
Merged
Conversation
Follow-up to #133: extend publicAudioUrl() to every remaining agent/API audioUrl emit site so "use audioUrl" is always the Cloudflare-cached host, not the raw DigitalOcean CDN. The helper is idempotent, so wrapping values that already flowed through #133's formatters is a safe no-op. - jamieExploreRoutes (3D/hierarchy), researchSessions, tapeShared, workflowSteps (x2), workflowOutputFormatter, neo4jTools, entitlementMiddleware - docs/details-apis/HIERARCHY_API.md: audioUrl examples -> audio.pullthatupjamie.ai - skills/.../podcast-rra.md: use audioUrl verbatim; don't construct CDN URLs llms.txt + openapi are already clean; EXTERNAL_VIDEO_PARENT_ID.md cascdr refs are the video-edit allowlist (left as-is); RSS-origin emits point at podcaster hosts (nothing to rewrite). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Why
Follow-up to #133. That PR rewrote
audioUrl→ the Cloudflare-cached host(
audio.pullthatupjamie.ai) at the three main playback formatters. But severalother agent/API-facing endpoints still returned the raw DigitalOcean host, and one
doc showed a raw-host
audioUrlexample — so agents hitting those surfaces (orcopying the doc) would still bypass the cache and bill DO egress.
Changes
Wrap
publicAudioUrl()at every remaining agent/APIaudioUrlemit site so"just use
audioUrl" is always the cached host. The helper is idempotent(no-ops on already-rewritten URLs, on podcaster-hosted RSS URLs, and on
null/sentinels), so double-wrapping downstream of #133's formatters is safe.routes/jamieExploreRoutes.js— 3D-search / hierarchy API (×2)routes/researchSessions.js— research-session clipsservices/tape/tapeShared.js— tape resultsutils/workflowSteps.js(×2) +utils/workflowOutputFormatter.js— agent workflow outputagent-tools/neo4jTools.js— graph toolutils/entitlementMiddleware.js— Mongo-mirror clip DTODocs / skill:
docs/details-apis/HIERARCHY_API.md— the twoaudioUrlexamples now showaudio.pullthatupjamie.aiinstead of the rawcascdr-…host.skills/.../podcast-rra.md— note on theaudioUrlfield: use it verbatim;do not construct audio URLs from
feedId/guidor hardcode a CDN host.Deliberately left as-is
llms.txt+openapi.json— already clean (llms.txt points agents at/api/search-quotes→ theaudioUrlfield and shows no raw host; openapi'saudioUrlis a bareformat: uri). Note:llms.txtis served from thefrontend repo, not here.
docs/EXTERNAL_VIDEO_PARENT_ID.mdcascdrrefs — those document thevideo-edit CDN allowlist, not audio playback; changing them would be wrong.
LandingPageService,PodcastRssCacheManager) — those setaudioUrlfrom the podcaster's own enclosure (itemUrl), not our bucket, sothere's nothing to rewrite (and the helper would no-op anyway).
Tests
node --checkclean on all 7 changed source files.audioUrlemit remains unwrapped(only schema defs,
"URL unavailable"sentinels, and RSSitemUrlremain, asintended).
publicAudioUrlunit behavior + live Worker serving were proven in Serve audio playback through the Cloudflare-cached host (audio.pullthatupjamie.ai) #133.🤖 Generated with Claude Code