Bug: Audio-Only Session Never Appears in Memory Feed
Summary
Recording an audio-only session (captureMode="audio_only") uploads successfully and ends the session, but the resulting memory never appears in /memories/feed. The feed only ever returns type: "visual" memories.
Symptoms
- Session created, audio uploaded, session ended — all succeed (HTTP 200).
- After
session_ended, the feed refresh shows no new entry. - All memories in the feed have
type: "visual". - No
type: "audio"entries ever appear.
Root Cause
ingest_window.lambda_handler (line 127) hard-gates on the presence of frames before doing any work:
frames_b64 = _load_frames_from_s3(session_id, window_index, frame_count)
if not frames_b64:
return {"status": "skipped", "reason": "no frames"}
For audio-only sessions, frameCount=0 is passed to ingest (set at sessions/audio/app.py line 88 and sessions/end/app.py line 86). _load_frames_from_s3 loops range(0) and returns []. The function early-returns "skipped" before ever loading audio, transcribing, or creating a WorldMMSegment.
The feed endpoint's _derive_type() correctly returns "audio" for segments with transcript and no s3_frames_key, but no segment is ever written to the database, so the feed has nothing to return.
Fix
ingest_window.py Step 2: Only skip when frames were expected but missing (frame_count > 0 and not frames_b64). When frame_count == 0 (audio-only), bypass the frames gate and proceed to audio loading and transcription.
ingest_window.py Step 4 (segment creation): Set s3_frames_key=None for audio-only segments instead of constructing a frames path that doesn't exist.
ingest_window.py Step 5 (GPU enrichment): Skip GPU enrichment entirely when there are no frames; mark segment complete directly after transcription.
Evidence
Client log trace:
capture_audio_uploaded {"sizeBytes": 718124, "windowIndex": 0}
session_ended {"sessionId": "264326cc-a253-45fe-9995-c8e6c32fdaf3"}
feed_query_succeeded {"memories": [...type:visual only...]} # no audio entry
Regression Test
tests/unit/test_ingest_window_audio_only.py — verifies that lambda_handler with frameCount=0 creates a segment with transcript and no s3_frames_key, and returns status: "ok".