Skip to content

docs: explore Podcasts with proxyless MOSS transcription - #258

Closed
aehlke wants to merge 44 commits into
feat/expo-android-web-migrationfrom
docs/podcasts-exploratory-spec-20261002
Closed

aehlke wants to merge 44 commits into
feat/expo-android-web-migrationfrom
docs/podcasts-exploratory-spec-20261002

Conversation

@aehlke

@aehlke aehlke commented Oct 2, 2026 •

Copy link
Copy Markdown

Mainline consolidation status (2026-11-09)

This documentation-only exploration was selectively imported through PR #279 and is now on main in merge ad61da3932bc4ed6f9b45ac2f0f93c4eb384cd62. This PR is closed to prevent duplicate integration. This administrative close does not approve Podcasts as a product feature or authorize product/runtime implementation. Preserve this branch for provenance.


Purpose

Deep exploratory handoff for a future Podcasts category on the Expo migration branch, focused first on Japanese native-immersion audio and local MOSS ASR.

This PR is intentionally documentation-only. It changes no production code, configuration, dependencies, tests, generated assets, or backend behavior.

Stacked on the ongoing Expo migration (#257) and targeted to feat/expo-android-web-migration, not main.

Current architectural conclusions

The spec now reflects the actual media/Expo code rather than a generic podcast-player design:

  • remote podcast bytes should enter through ByteSource + Mediabunny
  • current non-cloud identify() would otherwise hash remote media in 1 MiB reads, so a generic network source profile is a prerequisite
  • current v3 sparse MOSS is playhead-prioritized but ultimately fills the whole media item; Podcasts need a new versioned playback-lead coverage policy
  • bounded local podcast captions are distinct from existing portable Track publication
  • exact ContentKey hashing is optional until an existing portable/export/sync path actually needs it
  • logical ShowKey / EpisodeKey, active RenditionSession, transcript timeline and exact byte ContentKey are separate identities
  • podcast resume belongs to EpisodeKey, not ContentKey
  • publisher RSS transcripts remain a separate local episode document until their timing is safely bound to a delivered rendition
  • current Track.origin, Playback, media search and video_* sync contracts must not be silently overloaded
  • Books/Videos currently have separate section navigation implementations; Podcasts should trigger one shared host-owned Books/Videos/Podcasts switcher
  • Podcasts needs its own product flag plus a derived shared MOSS/media capability; MOSS packaging/search cannot remain synonymous with video learning
  • expo-audio, fast-xml-parser, DOMPurify and Mediabunny are already installed and should be qualified before new dependencies
  • Android background playback remains separately gated; current Expo config explicitly disables it
  • current service-worker Range/cross-origin pass-through behavior is favorable and should be preserved

Provider/CORS refinement

The provider matrix now distinguishes evidence quality. Observing Access-Control-Allow-Origin in a packet/network capture is not treated as equivalent to proving Manabi-origin JavaScript can read the body.

Evidence order:

  1. target-origin browser fetch() body evidence
  2. current HTTP header/wire evidence
  3. current provider statement/documentation
  4. current directory/feed URL-shape evidence
  5. historical evidence

Current working provider picture:

  • Megaphone: strongest candidate; current chain is ACAO/Range-header-positive, but still requires target-origin JS fetch and rendition tests
  • RedCircle: core service likely CORS-friendly; real blockers are third-party measurement-prefix chains and dynamic insertion
  • Spotify for Creators / Anchor: public RSS is normal, but the actual Anchor-wrapper/CloudFront body+Range path remains unproven; keep MOSS disabled until a real browser probe passes
  • SoundCloud: final CDN is ACAO/Range-header-positive; exact publisher enclosure chain still needs qualification
  • Omny/Triton: promising historical evidence, current exact Japanese enclosure proof required
  • Podbean/Simplecast/Libsyn: feed CORS is known; audio CORS/Range is not established
  • ART19: retained as the redirect-hop CORS regression class

Redirect/CORS details now captured

The spec now explicitly covers:

  • only a single contiguous Range is used; multi-range leaves the safelisted path
  • no If-Range / ETag conditional request headers in v1
  • redirect: manual cannot reveal a cross-origin Location to script
  • intermediate redirect responses are part of CORS success/failure
  • cross-origin redirect taint can serialize later request Origin as null
  • wildcard ACAO is particularly robust for the credentialless multi-hop case
  • browser redirect behavior is tested in Chromium, WebKit and packaged Android WebView instead of inferred from headers
  • playback-first then ASR-fetch and ASR-fetch then playback are both tested
  • Vary: Origin matters when ACAO is conditional; otherwise a cached no-CORS media response can poison a later CORS fetch
  • credentials: include is not used to stabilize ads; v1 does not depend on third-party cookies

Session versus reopen stability

Dynamic ads no longer cause an overly broad exclusion.

The qualification model now distinguishes:

MOSS_SESSION
  readable Range path
  exact size
  ASR ranges coherent during active session
  playback and ASR use the same effective timeline

MOSS_REOPEN
  MOSS_SESSION
  plus later evidence matches saved timed captions

MOSS_SESSION_ONLY
  current session is coherent
  later/fresh rendition differs or is not safely reusable

UNSTABLE_SESSION
  ASR ranges disagree inside one session
  or playback and ASR receive incompatible timelines

For session-only sources, old text may remain useful after reopen, but old timestamps cannot silently drive new audio.

This is especially relevant for RedCircle's documented listener-specific dynamic insertion and Spotify's off-platform targeted ads.

Playback ↔ ASR coherence

A further dynamic-host issue is now explicit: the media element and JS fetch() have different request metadata/modes, so a host could hand playback and MOSS different ad renditions even when all MOSS ranges agree with each other.

The Phase-0 harness therefore records both request paths and, where browser tooling safely exposes overlapping response bytes, compares their hashes. Otherwise it compares final/session URLs, validators, sizes and durations and leaves the result unknown rather than guessing.

Anonymous-CORS playback is tested per MOSS-qualified source; it is not forced globally.

Exact-size proof

When Content-Range is not exposed but RSS provides declared length N, the spec now uses one contiguous proof:

Range: bytes=N-1-N

Per RFC 9110:

  • exact size N -> 206 + exactly 1 readable byte
  • actual size > N -> 206 + 2 bytes
  • actual size < N -> 416

This replaces the earlier two-request boundary check and reduces publisher/analytics traffic.

Qualification is not browse traffic

Production does not probe every episode during browse/search.

Two layers are separated:

release/provider-shape qualification
  scheduled/manual browser harness

runtime exact-episode admission
  only after user explicitly enables local MOSS captions

Browsing, catalog search and publisher-transcript search remain enclosure-network-free.

The runtime admission uses the smallest Range/size/decode work needed for the active RenditionSession; fresh-context provider stability testing stays in qualification tooling.

Browser qualification matrix

Normal CI uses controlled local origins for:

  • wildcard CORS Range success
  • multi-origin redirect chains
  • broken intermediate redirects
  • redirect-tainted Origin behavior
  • no-CORS playback then CORS fetch
  • CORS fetch then playback
  • correct and missing Vary: Origin
  • dynamic responses keyed by Sec-Fetch-Dest
  • session-stable / fresh-context-different renditions
  • exact-size boundary outcomes
  • playback/ASR mismatch detection

Live-provider checks stay manual/scheduled and never become ordinary PR CI dependencies.

Review boundary

Current Expo base reviewed/synchronized:

53d4534ca681d4bf8f49f9b236d8330c41784811

No review comments or inline review threads are currently open on this draft.

Verification

Current GitHub compare against feat/expo-android-web-migration:

  • 0 commits behind
  • exactly 1 changed file
  • docs/expo/PODCASTS-EXPLORATORY-SPEC.md
  • 2,511 documentation lines added
  • 0 deletions
  • PR reports mergeable
  • no production code/config/test changes

No runtime/test pass is claimed for this docs-only PR.

Handoff

The next worker should begin with the controlled provider/deployment qualification harness, not product UI. It should not infer JS readability from CORS-looking headers, treat fresh-session ad changes as intra-session failure, probe every catalog episode during browse, strip publisher tracking prefixes, or reuse current v3 whole-media scheduling for long podcasts.

aehlke added 30 commits October 2, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant