Eve library

Tara audio state and native playback · delivered increment

Guide

Revision 1

On this page

The next linked guides explain the shared audio state machine and its actual native caller. They extend the ritual-session guide without equating its validated ritual lifecycle with the separate eight-phase audio lifecycle. Offline storage, reflection, quick reset, sleep, companions and the remaining V1 subjects remain required follow-on teaching; discovery below is not delivery.

Implementation baseline: 4d252910f85edd5009f23dead20220f62513d763. Primary source snapshot: 1ceae52c7896a59ac74a4429d410f3218f0b91c6.

Design and sequence#

Visual thesis: retain the cream field guide and use terracotta relationships to make a playback command, an observed status and a saved record distinguishable. Content plan: begin with an interrupted practice, explain the two state records, follow commands and status updates, then show the native launch and feedback loop. Finish with a concrete recovery and evidence check. Interaction thesis: reuse slide entrance, source reveal and diagram inspection with reduced-motion support; the complete explanation must remain readable in the exported PDF.

The shared-state guide will cover handoff fields, initial state and identity; track/metadata/marker ownership; every legal transition including rejected controls; interruption; the two completion paths; update precedence; duration, position and measured time; marker intervals, ordering and repeat behavior; event/subscription/snapshot behavior; and a worked recovery trace.

The native guide will cover the actual domain-screen metadata lookup and constructed track records; route/lesson/session identity; asynchronous module attachment; native audio-mode configuration; subscription before launch; track creation and lock-screen metadata; command translation; status feedback; resume seek ordering; visible controls and retry; error and teardown boundaries; and the evidence required to establish actual device playback. Native delivery belongs to V1.1 even though the shared library is used in Tara's V1 model.

Use state transitions, a directed feedback loop, record specimens, a timing trace, interval/marker comparisons and concrete command/result examples. Tables are appropriate for reference fields and legal controls. Peer rows do not get an automatic highlight. Show exact observed case values rather than invented playback, reliability or engagement metrics.

Source findings to exercise before final teaching#

  • audio-session.ts and audio-session-manager.ts were read in full. Command transitions and engine updates are different paths. A manual completion fills progress to the duration; an engine finish retains the reported position. Active listening accumulates wall time only when the previous playback phase and the incoming playing flag both indicate playing.
  • meditationPlaybackEngine.ts and its owning test file were read in full. Attachment configures the module before subscribing. It does not replay an already loaded track. Attachment failure returns false and clears references; the method comment's promised manager error report is absent from the body. The domain effect discards the returned readiness boolean.
  • Native play/pause calls are synchronous listener calls; seek rejection is handled asynchronously. Player status reports error: null; load exceptions and missing URI have explicit report paths. Teardown wraps pause, lock-screen cleanup and player removal in one try block. Earlier exceptions can prevent later cleanup calls. Test the actual consequences before diagramming them.
  • The source handbook's audio-controls paragraph attributes ambient mixing and sleep fade to the shared audio modules. Those modules expose state fields, play/pause/seek and interruption behavior; a field or event type alone does not implement a native setter, mix or fade. Trace the separate caller before repeating the broader claim.
  • The actual native screen has a fixed twelve-entry audio metadata library. Its standard/high/preview URLs are constructed, not discovered through a media availability check. Resume positions include 344 seconds for the evening practice and 420 seconds for a course lesson. The caller starts the manager, resolves tracks, invokes play and then seeks from positive metadata; it does not await a native loaded callback before announcing readiness.

Wider native discoveries retained for the following guides#

The complete taraOfflineCache.ts, download-manager.ts, transfer test helper, mobileTaraReflection.ts and reflection card component were read. Owning cache and reflection-model tests were also read. These findings still need dedicated source cases, teaching and delivery:

  • Tara recents default to memory storage, three entries and fourteen-day retention. The download manager has a real native transfer port. Its hash comparison and Tara's descriptive checksum string need an actual comparison; the healthy test port returns whichever checksum the queued item expects.
  • A completed download exposes localPath, while Tara's playback-track resolver creates an offline:// URI. A complete manifest entry alone does not prove that the native player can resolve that URI. Trace any registered resolver.
  • Cache selection, quality fallback, expiry, pruning, preference disabling, presence-media treatment and manifest removal have distinct consequences. Do not imply that manifest removal proves physical-file deletion.
  • The reflection model labels the greater of measured listening and total duration as minutes listened. Its continuation builder supplies completed, 100% and end-of-duration fields without checking the input phase. The actual completed-session effect supplies its caller guard.
  • The native reflection handlers update component state and show saved/skipped labels. Locate any persistence consumer before claiming a saved return after remount. Telemetry's configured sink logs to the console; it is not a checkpoint store. The real reflection component supports 420 characters, starter suggestions, disabled empty save, saved preview, edit, skip and Done.

The source fixtures now pass 120 unmodified owning tests, 19 added audio cases and nine exact native-caller cases. The latter extracts complete named functions and metadata declarations through the TypeScript AST, using the actual shared manager with explicit cache, resolver, analytics, haptic and UI state-setter seams. It does not mount the native screen. The first expectation confused the manager's session_created event with the screen's session_preparing funnel stage; the source comparison corrected the fixture and manuscript.

The authored pair has 23 shared-state slides and 19 native-playback slides. Draft optical review replaced repeated headlines and takeaways with concrete case/specimen names and distinct lessons. The semantic check rejected lifecycle rows whose starting states existed only in attributes; the visible descriptions now name every source state. Final publication, export and optical evidence is recorded in the delivery receipt when those checks settle. No current device playback, human listening or durable storage acceptance is claimed.

Delivery evidence#

The receipt binds the 42-slide pair and 2910.381 seconds of new narration. Final guide review passes 302 checks with 168 captures, 126 embedded axe runs, eight enlarged-text cases and five rejected content removals. Focused center review covers all 42 slides in two embedded contexts, four audio boundaries and 42 PDF pages. All 70 prior guide HTML files, four shared UI files and 792 earlier recordings remain exact. Source fixtures and their hashes retain the actual evidence scope. Final PDF optical review is recorded separately from draft checks. The first final review found both closing slides extending beyond the 720-pixel desktop frame; shorter case titles, detail and captions restore fit without changing narration.

The native guide is under V1.1 with both shared audio and native orientation as prerequisites. The shared-state guide follows ritual sessions under V1.0. No automatic peer-row emphasis is used; ownership diagrams focus the command owner explicitly. In-app browser control was unavailable because its required JavaScript tool was not exposed; repository Playwright and rendered-image review provided the applicable fallback. Full V1 and human/device acceptance stay open.