kcode-audio-session-ingress 0.2.5

Application-level facade over AudioIngress and exact Session History handoff
Documentation
# Audio Session Ingress

`kcode-audio-session-ingress` 0.2.5 is the application-level facade that
coordinates durable `kcode-audio-ingress` recordings with exact
`kcode-session-history` handoff.

`kcode-audio-ingress` remains the sole owner of original audio, transcription
processing, recording retries, speaker confirmation, and completed
transcripts. `kcode-session-history` remains the sole owner of session
persistence and ingress lifecycle. This library owns no persistence, provider,
HTTP, messaging, or deployment behavior.

Deterministic transcript-piece planning is delegated to
`kcode-audio-transcript-plan` 0.1.1 through
`kcode-audio-history-handoff` 0.1.1. The handoff leaf owns History presence
checks, cross-store projection, synchronization, canonical piece correlation,
and exact memory-ingress retry.

Deterministic facade view adaptation is delegated to
`kcode-audio-session-view` 0.1.1. Submission, recording lists, and recording
history pass each matching Audio status and handoff projection to its `render`
operation. That leaf owns recording fields, ingress-piece fields, processing
stage mapping, speaker-review summaries, and combined status selection. This
facade publicly re-exports the leaf's `Recording`, `SpeakerReview`, and
`IngressPiece` types, preserving the established
`kcode_audio_session_ingress::{Recording, SpeakerReview, IngressPiece}` source
paths, fields, and `Clone, Debug` derives without duplicate definitions.

The cloneable `Coordinator` is scoped to one configured application user. It:

- attributes new submissions to that user and fails closed when AudioIngress's
  global SHA-256 deduplication returns another user's recording;
- exposes, looks up, retries, confirms, and projects only recordings whose
  `RecordingStatus.user_id` exactly matches the configured user;
- batches recording projection through one History listing while preserving
  AudioIngress input order;
- exposes AudioIngress correction packets and applies exact human speaker
  confirmations through its typed API;
- leaves classifier-aware completed transcripts in `speaker_review` until the
  complete observed-speaker mapping is human-confirmed;
- synchronizes authorized completed transcripts through deterministic
  `audio:<recording-id>:<piece-index>` identities; and
- retries memory ingress only after the handoff leaf validates the retained
  History record against the exact current configured-user audio piece.

An exact retry of an accepted confirmation is idempotent and synchronizes the
recording. A different confirmation is rejected once any matching audio
ingress identity is present, including a retained malformed suffix under the
recording's canonical prefix. This preserves confirmation conflict precedence.

The established facade states remain unchanged. Audio processing reports
`uploaded`, `chunking`, `transcribing`, `analyzing_speakers`,
`training_speakers`, `reconciling`, `speaker_review`, or `failed`. An
authorized completed recording with no represented pieces is
`ready_for_ingress`; represented pieces project `ingressing`,
`ingress_failed`, or `complete` according to their retained History phases.

The public optional `RetryIngress.state` remains for 0.2 wire compatibility.
When supplied, it must exactly equal current retained Session History state.
Caller state never replaces retained state; retry passes the retained state and
the caller's optimistic version through the handoff.

Public types, fields, coordinator methods, state strings, and
InvalidInput/NotFound/Conflict/Internal categories remain compatible with
0.2.3. Audio errors keep their established facade mapping. Handoff errors map
to the matching facade category with their contained messages; raw Session
History storage messages remain visible for compatibility. Recording history
retains the final transcript and correction packet before the owned Audio
status is passed to the view renderer.

This migration does not change transcript payload sizing, Unicode token
estimation, confirmation concurrency, projection currentness, resumable
partial effects, full-store scans, projected timing, raw History storage
messages, or state strings. Publication, host adoption, deployment, provider
work, and live audio effects are separate lifecycle gates.