TAS Portal

← TAS Portal · Documents · Engineering FAQ

Snoraire · Engineering review · 2 November 2026 · v1

Recording, analysis and results saving

Status and scope

This handoff covers one consumer recording session and the proposed structured-results save flow. It expands the product overview into engineering interactions. The diagrams describe intended behaviour; they do not establish implementation or release acceptance.

1. Capture and local analysis

Participants run left to right; numbered messages run downward. Analysis readiness, score eligibility and server-save status are separate states.

Phone storageLocal pipelineRecordingcontrollerSnoraire screensPhone storageLocal pipelineRecordingcontrollerSnoraire screensIntended consumer recording flow · 2 Nov 2026Local source patterns reused, policy and release acceptance remain separate.Capture ownership stays outside screen lifecycles.Locking the screen or navigating must not silently end capture.opt[Capture interrupted or app relaunched]alt[User stops][Eight-hour maximum reached]analysis.finalize is the only production writer.Wait for input dependencies.Screens do not compute fallback analysis.Analysis readiness does not imply score eligibility.Product direction: 2–8 recorded hours inclusive plus agreed quality rules.alt[Under two hours or fails agreed quality rules][Eligible and approved scoring contract available]opt[User requests retained playback]alt[Work still pending or retryable][Analysis retries exhausted][Analysis available]alt[Readiness or engine start fails][Capture starts]Raw consumer audio, playback clips and raw waveform stay on phone.Structured cloud saving is a separate proposed contract, see companion diagram.UserTap Record1Request capture2Check microphone, storage and capture readiness3Failure and recovery reason, roll back acquired resources4Explain retry or return Home, no active recording5Persist capture journal and local audio as captured6Recording active7Inspect saved capture facts and available media8Recoverable state and saved duration9Honest recovery outcome10Resume when supported, or finish with saved audio11Confirm Stop12stopRecording(reason)13Stop capture automatically14Finalise capture facts and retain saved audio15Processing, report is not ready yet16requestNightAnalysis(sessionId)17Read ledger and available inputs18analyzing with reason19Keep processing state, request again through pipeline20unavailable with reason21Analysis unavailable, recovery action per agreed policy22Persist versioned local analysis23ready with result24No eligible score, explain reason25Show available report and approved explanation26Read available local clip27Media or unavailable state28Play media or explain unavailable playback29User

2. Structured results saving — proposed

Target review contract, not a verified route inventory. Reuse equivalent existing endpoints where they satisfy the contract.

Results databaseAccount /results APILocal save queueSnoraire appResults databaseAccount /results APILocal save queueSnoraire appPROPOSED consumer save contract · not verified as implementedApproved payload, retention and deletion policy required before enabling.No audio, clips or raw waveform.Local report availability is independent of server-save success.alt[Unauthorized, other owner, revision conflict or deleted record][Valid request]alt[Offline][Online with valid session]opt[Timeout or lost response]Same key with different payload conflicts, no silent overwrite.Deletion must defeat stale retries. Sign-out/account change must not reassign queued data.Exact endpoints / schemas remain the linked API draft's review contract.Queue approved metadata, analysis revision and notes for verified owner1Pending, retain owner-bound work for retry2Save approved payload, operation key and expected revision3Authenticate, derive owner, validate schema and ownership4Explicit rejection or conflict5Failed / conflict, do not show Saved6Atomic owner-scoped write with idempotency / deletion checks7Persisted reference and revision, or same prior result8Confirm persisted result9Saved only after confirmation10Retry same operation key and same payload11Same persisted outcome or explicit failure12

Responsibilities and existing tracking

AreaEngineering boundaryExisting tracking
Capture / recoveryReuse the shared controller and ledger. Preserve rollback, saved-duration reporting and recovery from capture facts. Agree short-session retention and recovery actions.EAS-26 / EAS-27 device gates; EAS-88 screen states
Analysis / reportPreserve the sole analysis.finalize writer. Screens read/request analysis. Distinguish ready, analyzing and unavailable from score eligibility. Do not adopt provisional score parameters as approved.Current PRD duration/score sections; parameter and quality approval open
Account/results savingServer derives owner from verified session, validates payload/schema/units and enforces immutable analysis revisions, operation-key reuse and revision conflicts. No new auth provider or generic sync framework.EAS-98; data/API draft
Deletion / account changesNever move unsynced data between logins. Deletion defeats stale writes. Automatic audio pruning differs from manual Delete all recordings; exact scope and provider exceptions need approval.EAS-54 / EAS-126
Optional careOutside these diagrams. Authenticated consented SG/MY CRM submission, destination receipt and human response remain distinct. No booking/payment or silent country rerouting.EAS-87 / EAS-125; full app journey

Source check and implementation gaps

Inspected local Reverie commit: 653cf4707af83edf039a10c5e7150b3d9771618e. This is a pinned local review, not a claim about latest upstream or deployed code. Paths below are relative to that repository.

Inspected sourceWhat it establishes
apps/airese-mobile/lib/recording/session-controller.tsShared capture/stop controller, auto-stop path and research collection seam.
apps/airese-mobile/lib/analysis/request-night-analysis.tsReads existing analysis or requests a pipeline pass; returns ready, analyzing or unavailable.
apps/airese-mobile/docs/decisions/AMOB-0031-one-writer-of-the-night-analysis.mdSingle production writer and dependency handling. Its historical device evidence was not rerun.
apps/airese-mobile/lib/research-collection.tsProduct pipeline is local and adds no research upload stages. Research upload code is not consumer account/results saving.

Gap: the inspected source does not establish the proposed consumer save queue/API. Review exact auth/routes and map the agreed contract to implementation before enabling it. Research code comments describe retired account-level grants; the build split alone does not prove consent compliance.

Open decisions before implementation

Existing acceptance gates to demonstrate

  1. Capture: start failure/rollback, lock screen, interruption/relaunch and manual/automatic stop. Check 2h minus one second, exactly 2h, exactly 8h and attempted 8h plus one second. Capture must stop at the maximum.
  2. Analysis: pending inputs, exhaustion, retry/recompute, no duplicate final writer, accurate unavailable reasons and absent-media playback. Approved identical inputs produce repeatable outputs.
  3. Saving: offline local report; pending/failed/saved states; lost-response retry; same-key/different-payload conflict; stale revision; revoked session and cross-user rejection.
  4. Data safety: account changes do not reassign queued data; deleted data cannot be recreated by stale retries; remote pending/failure stays visible. Capture network/storage evidence that prohibited consumer media is absent.
  5. Devices: retain EAS-26/27: three consecutive eight-hour release-build nights per supported class; at least 98% coverage; no gap over 75s; Android flat memory and zero silent loss; iOS results within five minutes after reopening. Record build, phone, OS and failures as well as passes.

These restate the referenced gates. No acceptance pass is claimed.

Canonical references and editable sources

The diagrams are embedded: share this HTML without companion images. Editable sources are available from the links above; canonical references open in this portal. No canonical requirement, ticket acceptance criterion or generated dashboard snapshot was changed.