---
status: reconciled-partial
coverage_depth: deep-for-shipped-boundary
last_reconciled: 2026-07-18
specs:
  - apps/oshun/web/e2e/first-tara-sit-deepening.spec.ts
  - apps/oshun/bff/src/tara/ambient-audio.test.ts
source: WALKTHROUGH/results/external-dependencies/README.md
---

# Dependency result: Real Tara sit audio and CDN

- **Opened**: 2026-05-29 when the sit result described synthetic media and no
  external delivery seam for real recordings.
- **Reconciled**: 2026-07-18 against the procedural ambient generator,
  authenticated audio routes, env-gated ElevenLabs guidance seam, Tara player,
  service tests, and first-sit browser suite. This was a source reconciliation,
  not a live CDN or voice-provider walk.
- **Verdict**: **partial** — Tara now serves a real playable BFF-generated WAV
  and the sit player fetches, loops, mixes, and honestly reports its
  availability. A separate guidance route can call the configured voice provider
  and fails closed without credentials. The player does not consume that
  guidance route, and no recording catalog, object-store/CDN pipeline,
  entitlement-aware signed URL, HLS path, or DRM boundary exists in the audited
  flow.
- **Primary specs**: `apps/oshun/bff/src/tara/ambient-audio.test.ts` and
  `apps/oshun/web/e2e/first-tara-sit-deepening.spec.ts`.

## Result at a glance

| Evidence lane           | Current result                                                                      | Authority limit                                                         |
| ----------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| Ambient generation      | Deterministic three-layer drone plus noise renders a valid mono PCM WAV             | Procedural soundscape, not an authored or teacher-recorded sit          |
| Audio delivery          | Authenticated BFF route, bounded duration, private cache, and small in-memory cache | BFF CPU/memory path; no object store, CDN, range delivery, or HLS       |
| Player integration      | Fetch with bearer token, Blob-backed audio, loop, play/pause, and mix state         | Only ambient track; voice-speed control has no narrated media consumer  |
| Guidance seam           | Opening/midpoint/closing scripts can use configured ElevenLabs and fail closed      | Endpoint-level proof; player timing and production credentials unproved |
| Automated evidence      | WAV structure/energy/auth/fail-closed tests plus browser availability states        | Browser suite intercepts audio; no acoustic or live-provider validation |
| Paid-content protection | No signed URL, TTL, entitlement check, CDN key, HLS playlist, or DRM path found     | External distribution dependency remains open                           |

## Evidence map

The solid branch is the shipped first-sit ambient experience. The narrated and
recorded-media branches remain separate or external.

```mermaid
flowchart LR
    A[Authenticated Tara player] --> B[BFF ambient WAV route]
    B --> C[Deterministic procedural synthesis]
    C --> D[Blob audio loop and mix]
    E[Guidance phase request] --> F{Voice credentials}
    F -->|missing| G[503 not configured]
    F -->|present| H[ElevenLabs audio response]
    H -. player not connected .-> D
    I[Recorded sit catalog] -. absent .-> J[Signed CDN or HLS]
    J -. absent .-> D
```

## Proven observations

### Ambient audio is real and deterministic

- `planAmbientForSession()` hashes the session id, chooses a drone root, and
  derives detuned root/fifth/octave layers with independent slow modulation and
  a filtered noise bed. `synthesizeAmbientWav()` emits mono 22.05 kHz, 16-bit
  PCM with bounded 30–180 second duration and fades.
- The service test proves deterministic plans, different sessions, RIFF/WAVE
  structure, declared PCM length, non-silent signal energy, fade behavior, and
  duration clamping. The authenticated route test proves anonymous denial and a
  playable WAV response.
- The player fetches the route with the member bearer token, converts the body
  to an object URL, loops it, applies the ambient-mix slider, and exposes
  loading or unavailable state rather than pretending failed audio is playing.

### Voice guidance has an honest provider boundary

- The BFF exposes opening, midpoint, and closing editorial scripts through a
  separate guidance route. With both ElevenLabs environment values it invokes
  the voice-synthesis provider; without them it returns the explicit
  `voice_guidance_not_configured` 503.
- This seam is meaningful provider preparation, but `TaraSitPlayer` currently
  fetches only `ambient.wav`. Its transcript, captions, and voice-speed control
  do not schedule, play, or resample the guidance response.
- The first-sit browser suite exercises player states and the visible ambient
  unavailable contract using an intercepted media response; it does not judge
  waveform quality or contact a live voice service.

## Boundaries and gaps

- **Procedural ambient is not guided narration.** The shipped audible layer is a
  generated soundscape. It does not contain teacher speech, phase timing, or a
  narrated curriculum performance.
- **A provider route is not player integration.** The guidance endpoint can
  synthesize a phase, but no browser path requests it, synchronizes it with the
  timer/transcript, or binds voice-speed and caption timing.
- **A BFF WAV is not a media delivery platform.** Audio is synthesized and
  cached in process. There is no object-store ingest, global edge cache, byte
  range policy, adaptive stream, offline media manifest, or bandwidth telemetry.
- **Authentication is not paid-content protection.** The route requires a member
  but does not prove per-sit entitlement, short-lived signed URLs, revocation,
  link leakage resistance, or DRM.
- **Automated playback state is not acoustic validation.** Tests establish
  signal energy and UI behavior, not loudness normalization, clipping across the
  catalog, voice intelligibility, accessibility review, or device output
  quality.
- **Source configuration is not live-provider evidence.** No ElevenLabs account,
  CDN tenant, recording, signed request, regional latency, or production failure
  recovery was exercised in this reconciliation.

## Re-run evidence

The current shipped boundary is covered by the audio service suite and the
first-sit browser suite:

```bash
pnpm exec vitest run apps/oshun/bff/src/tara/ambient-audio.test.ts

PW_BROWSER_CHANNEL=chrome pnpm exec playwright test \
  -c apps/oshun/web/playwright.config.ts \
  apps/oshun/web/e2e/first-tara-sit-deepening.spec.ts \
  --workers=1
```

A green run proves procedural WAV generation, route safety, and current player
states. It must not be represented as a narrated sit, live ElevenLabs delivery,
signed CDN playback, HLS, DRM, or catalog-wide media quality.

## Source trail

- [External-dependency index](./README.md)
- [Ambient synthesis](../../../apps/oshun/bff/src/tara/ambient-audio.ts)
- [Ambient and guidance routes](../../../apps/oshun/bff/src/tara/ambient-audio-routes.ts)
- [Audio service test](../../../apps/oshun/bff/src/tara/ambient-audio.test.ts)
- [Tara sit player](../../../apps/oshun/web/src/components/lilith/TaraSitPlayer.tsx)
- [First-sit browser suite](../../../apps/oshun/web/e2e/first-tara-sit-deepening.spec.ts)
- [First Tara sit result](../first-tara-sit.md)

## Cross-references

- [First Tara sit journey](../../journeys/first-tara-sit.md)
- [First Tara sit result](../first-tara-sit.md)
- [Tara daily ritual journey](../../journeys/tara-daily-ritual.md)
- [Offline first-use journey](../../journeys/offline-first-time-use.md)
- [External-dependency convention](./README.md)

## Open questions

- Is the target experience procedural ambient, provider-synthesized guidance,
  human recordings, or a layered combination, and which contract schedules the
  layers against transcript and captions?
- Which storage/CDN pipeline owns ingest, transcoding, checksums, range/HLS
  delivery, regional latency, and cache invalidation?
- How will free and paid sits enforce entitlement, short-lived access,
  revocation, offline licensing, and leak-resistant URLs without overstating
  DRM?
- What player work binds guidance phases and voice speed while preserving
  reduced-motion, screen-reader, caption, and offline behavior?
- Which automated media checks cover loudness, clipping, silence, corrupt
  assets, duration drift, provider failure, and representative real devices?
