# Tara practice surfaces · discovery for the remaining room audit

This is inspected-source discovery, not completed teaching. Relevant files are
byte-identical between primary pin `1ceae52c7896a59ac74a4429d410f3218f0b91c6`
and implementation baseline `4d893c29bb7a24f7c1b1dde051ae4d075db0d6ae`. Continue
alongside [scheduling](v1-tara-scheduling-discovery.md) and the remaining
player, companion, mentor and content-workbench work in the
[V1 program](v1-completion.md).

## Source read in this increment

- Complete `apps/oshun/bff/src/routes/tara.ts` and
  `apps/oshun/bff/src/adapters/tara-read-adapters.ts`.
- Complete `libs/oshun/domain-tara/src/canonical-adapter.ts` and `adapter.ts`.
- `apps/oshun/web/src/components/lilith/rooms.tsx` imports and the complete
  TaraRoom function (lines 1–325); other room functions remain unread here.
- Complete web `app/tara/page.tsx`, `lib/lilith-data/tara.ts` and
  `tara-room.ts`.
- Discovery excerpt of BFF `routes/domain-stubs.ts` around room/today/sittings
  registration. Its catalog builders, auth helpers, persistence adapters and
  registration context still need complete review before claiming integration.

## Mechanisms to explain

The dedicated Tara routes apply abuse/auth prehandlers and require domain:tara
or domain:\*. Successful guarded operations are no-store; caught downstream
exceptions return a generic 502 domain_unavailable. Recommendations, continue,
favorites, streak and history call the domain adapter with the authenticated
subject. Favorite IDs are trimmed and empty IDs rejected. Integer query parsing
is permissive normalization, not a full route schema.

Adapter capability/availability/search routes accept shell/admin/assistant as a
query selection after the domain guard. This is not proof of an authenticated
admin role. The read registry returns the same underlying adapter object for all
three roles; TypeScript Pick types and declared capability lists do not remove
methods at runtime. Review actual authorization separately.

Canonical home reads continuation, course progress and favorites concurrently;
one rejection rejects the aggregate. Continue combines two reads. Search takes a
recommendation pool (default 12, at least result limit), then applies every
lowercased whitespace token as a substring of title/summary/tags, intensity and
maximum duration, before slicing (default 8). This is local filtering over a
bounded upstream pool, not proof of exhaustive full-catalog search.

Courses/favorites in search require configured searchUserId. The BFF read
registry creates the canonical adapter without that option, so its search path
does not add member course/favorite results through those branches. Trace
downstream recommendation context before making a personalization claim.

Bridge recommendations infer a ritual moment from the source entity kind, fetch
a pool (default 6), score by intensity for that moment, then select results
(default 3). Morning favors high intensity; the other mapped moments favor low,
with sleep high at zero. These are actual ranking heuristics, not a clinical
suitability or consent decision. Practice catalog construction still needs full
practice-models.ts review.

## Actual web room

The `/tara` page awaits getTara and renders TaraRoom. The loader reads
`/v1/tara/room` with revalidateSeconds 60 and returns taraUnavailable when no
sittings field is present. It does not use the dedicated `/recommended` route
directly. The room endpoint lives in the separately named domain-stubs module;
its name alone cannot establish whether a particular response is a fixture or a
member-aware projection.

TaraRoom shows today's sit, a course list, teachers, daily breath ritual,
optional Nisaba passage cue and the live-class booking component. Sitting rows
all link to `/tara/sit/<id>` with replay/begin/preview labels according to
state. Teacher rows are divs with a decorative arrow in this component. Inspect
deeper teacher routes and subnavigation before presenting these rows as working
links.

The today's-sit eyebrow hardcodes 12 minutes, while the Begin label calculates
minutes from durationSeconds. The unavailable room has zero duration, no
sittings/teachers and an unavailable identifier, but retains a fixed two-minute
breath ritual. The component still constructs the Begin link. Characterize the
actual empty/error UI rather than inferring all affordances are disabled.

The room endpoint excerpt uses real completed sitting IDs when a database and
subject are available, otherwise a default room; the sittings endpoint assigns
done from completed IDs and here to the first remaining catalog item. The today
endpoint has a separate fixture fallback. Complete builders and callers must be
reviewed before source assignments or screenshots claim a real member result.
Use controlled fixtures and explicit capture provenance for teaching.

## Web player and checkpoint discovery · 8 September

Read the complete 1,007-line `TaraSitPlayer.tsx`, its complete nine-case test
file, the complete `/tara/sit/[id]` page, the complete `session-launch.ts`
parser and the complete 389-line `save-resume-flow.test.ts`. In `types.ts`, read
the completion/continuation functions, their 5%/12-hour constants and the
recent-timestamp predicate. These six files are byte-identical from the primary
pin through `c0001c6c3f5f26db07f90bb30569d314579ffacf` and the current worktree.
This records source reading; these tests were not run in this discovery
increment.

The web sit page resolves the identifier from the room response or calls
notFound. It passes the selected sitting's script/duration/index but today's
teacher, path and session metadata even for a different course row. The player
initializes elapsed time to zero and local state to not-started; it does not
consume the shared audio-session manager or restore a persisted checkpoint.

While started, a one-second interval advances elapsed time by one. The timer
checks reaching the full duration before checking the 90-second interaction idle
threshold. Only transport/scrub actions call markInteraction; changing captions,
transcript, text size or mix does not reset that clock. Scrubbing clamps
position and changes drifted to paused. Finishing early uses elapsed /
duration >= 0.8; scrubbed position therefore participates in that calculation.
Space/k avoids interactive targets, but the global arrow handlers do not apply
that same target guard. Avoid treating elapsed position as observed listening
time or claiming attention measurement.

Ambient audio is an authenticated fetch of a 90-second session WAV, converted to
a looping object URL. The mix slider controls this element's volume. The
voice-speed state changes its label but is not connected to a voice media
element or playbackRate here. Captions are five generic progress bands; the
transcript prefers sitting.script with a generic fallback. These controls must
be explained independently rather than suggesting synchronized spoken guidance.

Start checks response.ok and can retry on a later started transition. Completion
sets its once-only ref before fetching, does not inspect response.ok and queues
only thrown failures. Both localStorage keys use the sitting ID. The component
does not replay those keys. Exact-key and Tara/localStorage searches across
apps, libs and tools found only these writes; that search does not prove the
absence of every possible generic consumer. Do not promise replay without an
owning reader and delivery test.

The online reflection handler waits 300 ms and sets saved without a network
request. Offline it writes text/mood/time to localStorage, or reports tab-only
state if storage throws. The completion effect runs before the member edits the
post-session reflection and deliberately excludes later text changes from its
dependencies. Thus the visible online Saved label cannot establish a persisted
reflection. Cross-domain next steps are plain links to the three room roots;
their labels alone do not establish an attached routine or passage.

The separate canonical completion model records a checkpoint when resume seconds
are positive or progress is at least 5%. Completion/reflection/continuation are
separate fields. A completed, reflection-available record enters reflect only
when its activity is neither future-dated nor older than 12 hours (inclusive);
other completed records replay. Error restarts; ended-early or no-checkpoint
restarts; remaining active checkpoints resume. The save/resume integration tests
construct persisted records and route-aware HTTP fixtures in test code, then
explicitly seek the manager to the returned position. They do not demonstrate a
web player save endpoint or live durable storage.

Next read the remaining actual application consumers, start/completion
persistence and scoped authorization. Build the next guide around a concrete
selected sit, its actual controls, local-versus-confirmed state and later
return. Keep the feature's partial-completion unit unassigned until this
explanation and the remaining callers are reviewed.

## Further inspected boundaries

This worktree uses sparse checkout. The Tara BFF directory was added to the
local sparse selection before reading the complete `tara/room.ts`, its five
tests and `ambient-audio-routes.ts`. Missing files in the earlier filesystem
search were a checkout-selection issue. A tracked-tree search then found the
existing `first-tara-sit-deepening.spec.ts` reflection cases (read lines
535–705): the tests explicitly expect the offline reflection to remain queued
after reconnect, and distinguish unavailable localStorage from durable local
writes. Those tests were read, not run here.

The room builder contains twelve curated sittings from 3 to 15 minutes, each
requiring an authored script. Missing script throws during composition. Done
identifiers mark rows done; the first unfinished row becomes here and today's
sit; remaining rows are next. Today's sessionIndex is doneCount + 1, not the
selected row index. With all twelve done, today's sit falls back to the final
row while sessionIndex becomes 13 and pathTotal stays 12. Teachers, breath
ritual and Nisaba cue are fixed editorial values, not inferred member activity.
Review the full script set separately before describing its instructional depth.

Read the complete Tara route block in `domain-stubs.ts` (1454–1734), the
optional/required identity helpers and private 60-second cache constant. Room
reads use verified optional identity for the completion overlay; missing DB
returns the fresh default. Start/completion writes require origin, CSRF and auth
prehandlers and a database, returning 503 without it and 202 after the
repository operation. Start rounds a positive planned duration or stores null;
completion rounds a positive elapsed duration or stores zero. Completion trims
reflection and uses completionState only for the Arete-recovery projection in
this block. Repository idempotence and transaction behavior still need review.
The separate today route retains its fixture when DB or identity is absent; do
not transfer the room's honest fresh-state claim to that response.

The ambient endpoint uses auth/abuse guards and a cached procedural WAV. Its
separate guidance endpoint supports opening/midpoint/closing editorial scripts,
returns 503 when no configured voice client exists and 502 on synthesis failure.
The web player only calls ambient.wav. Availability of the guidance route is not
evidence that its voice is wired into the player's speed control.

Read the complete 391-line `audio-session-manager.ts` and 759-line
`audio-session.ts`. They model tracks, engine callbacks, markers, interruptions
and snapshot/event state. They do not themselves render media or persist a
checkpoint. Starting replaces an active session; valid state transitions gate
control operations. Loading tracks sorts markers and enters ready but does not
apply seekToSeconds or autoPlay; the caller/engine must enact them. Engine
updates, not a timer inside this manager, advance position. Active-listen time
adds nonnegative wall-clock deltas only when both prior playback and incoming
update are playing. Zero-duration markers cannot satisfy the active interval
predicate. A tracked application search locates consumers in mobile
`app/domain/[domainId].tsx` and `src/audio/meditationPlaybackEngine.ts`; these
callers and their device behavior remain unread/unverified here. Preserve the
V1.1 native release boundary when explaining them.

## Web practice delivery review

The dedicated [web practice guide](v1-tara-web-practice.md) now follows the full
room/player journey in 21 slides. The complete pinned room builder and all
sitting scripts execute in an immutable-source fixture. Ten characterization
cases cover sparse/all-done progress, distinct scripts, the actual repository
start/completion methods, repeated identity, second-query failure and readback.
The selected methods are complete AST properties from the pinned PostgreSQL
adapter; the harness replaces Pool responses and time. It establishes emitted
queries and records, not actual PostgreSQL durability or a live transaction
test.

The inspected repository inserts a source row, then a canonical projection, with
no transaction wrapper inside either method. Each invocation generates a new
source identity. A failure of the second query can leave the first write; ON
CONFLICT on the canonical source reference does not make repeated requests
idempotent. Completion sets canonical state to completed and method to
audio-ended, leaves sessionId and planned duration null, and separately copies
member, sitting, elapsed duration and reflection. The player's partial state is
not passed into this repository projection. Start and completion do not share a
returned start ID in this web caller.

The room's completed-ID query uses distinct sitting identifiers for the member
without a duration or local-state predicate. The streak walks adjacent recorded
UTC dates, accepts up to 36 hours between steps and never compares the newest
date with today. The fixture demonstrates an old two-day run still returning
two. Start history distinguishes an omitted origin filter, explicit null and a
named origin, with a limit clamped to 1–100.

Thirteen controlled browser cases run the complete pinned TaraSitPlayer and the
AST-exact TaraRoom function with actual Lilith primitives and CSS. Eight real
continuous crops retain exact PNG dimensions and digests. HTTP, auth, clock,
optional outside-crop components and storage seams are declared in the capture
manifest. This is source-component characterization, not a deployed member
session. The final guide uses three focused crops with native callouts;
transitions, thresholds, requests and persisted fields use selectable diagrams.

## Practice catalog and model discovery for the next guide

The complete 804-line `libs/oshun/domain-tara/src/practice-models.ts` was read.
Its canonical practice, meditation, breathing-session and teacher objects are a
separate construction path from the twelve-row web room. Follow their actual
adapter consumers before claiming that a property powers that room.

Defaults include an editorial guide, lineage/source references, a named
editorial license, a null consent-record identifier and a fixed fallback
creation timestamp. These are emitted metadata; the builder does not verify a
teacher, rights clearance, consent or current editorial review. Practice
modality can be inferred from ordered title/summary string checks. Minutes are
clamped to 1–720; the duration band receives the original input. Taxonomy tokens
and teacher IDs are deduplicated; explicit taxonomy is reused. Meditation
media-asset identifiers can remain null.

The breathing builder normalizes its canonical modality/pattern separately from
its timing defaults, which use the original breathPattern. For example,
extended_exhale maps to a canonical 4-7-8 label but defaults to 4/0/8 seconds.
An explicit breathwork modality can also differ from the original pattern's
timing. The box default contains inhale 4, hold 4, exhale 4 and no separate
final hold field in this domain model. Coherent is 5/0/5, energizing 2/0/2 and
freeform 4/0/6. These observations describe code, not breathing guidance. The
default cycle count is rounded minutes × 6 with a minimum of one; it is not
derived from those durations. Breathing minutes are independently clamped to
1–240.

Transcript, captions and reduced-motion availability default true. Breathwork
also defaults vibration pacing true. Such flags do not establish actual media,
transcripts, captions or device haptics. Catalog construction from
recommendations creates one practice per input, then a breathing or meditation
record according to subtype. Read and characterize the taxonomy source, schema,
recommendation policy, concrete runtime callers and their failure paths before
promoting this next subject or assigning the combined feature unit. Native
engine callers, companions, mentors and workbench depth remain open.

The next-guide trace also inspected `canonical-adapter.ts` and `adapter.ts`.
Both, and practice-models.ts, are byte-identical between the primary pin and
`4d605bc2a5`. Home cards request continuation, course progress and favorites
concurrently. Search requests a recommendation pool, conditionally adds courses
and favorites only when a configured searchUserId exists, then filters
intensity, maximum duration and every whitespace-separated query token against
combined lowercase title/summary/tags. Limits are rounded with a minimum of one
and no ceiling in this helper. Final result ordering still needs the owning
buildTaraSearchResults review. A rejected Promise.all dependency rejects the
composition; no partial-result fallback appears in these methods.

Practice catalog reads recommendations and builds the canonical catalog from
that returned set. Saved-item toggles delegate add/remove using the supplied
user and meditation IDs. Bridge recommendations sort a returned pool by a fixed
ritual-moment/intensity score, take the requested count and build launch cards;
morning favors high intensity, while the other listed moments favor low. Related
entity kind supplies a fallback ritual moment. This is a deterministic adapter
heuristic, not evidence of clinical suitability or a learned ranking. The read
registry returns the same adapter object for shell, admin and assistant;
TypeScript views and capability arrays alone do not strip runtime methods. The
assistant array includes saved_items while its Pick interface omits
getSavedItems. Inspect the BFF read-adapter wrapper and actual consumers before
making an access-control or surface-parity claim. These findings are discovery
for the next guide, not newly assigned coverage in the current web-player
delivery.
