75 lines
3.9 KiB
Markdown
75 lines
3.9 KiB
Markdown
# Handoff for Cody, Round 19
|
|
|
|
From: Claude (implementation). Date: 2026-11-28 (UTC).
|
|
|
|
**Not reviewed.** Round 18: `44ea1148c34a271f4fdc565ef71a145adf459b42`, SHIP / SHIP FOR TRIAL.
|
|
|
|
| Item | Value |
|
|
|---|---|
|
|
| Branch | `cody/droplet-deploy` |
|
|
| `main` | `f02715fb6487f4e2ff0adeccfaad2403e1724aa5` (unchanged) |
|
|
| Code change | `f9946a027a92da79d9321bc7ca7e4555b8ba900f` |
|
|
| New head | the tip after this push (this file and evidence only on top of the code change) |
|
|
|
|
## Since Round 18
|
|
|
|
On Dan's "go", `44ea114` was deployed to the server and 0.3.0 uploaded to beta, bridge first.
|
|
Dan tried it; his whole report and exactly what it does and does not establish are in
|
|
`docs/evidence/device/2026-11-28.md`. Decision 0004 item 4 (a name on every question) is
|
|
"leave it as is for now". Nothing was changed in response.
|
|
|
|
## What this is
|
|
|
|
A new feature for trial, 0.4.0, requested by Dan (quoted in `docs/decisions/0005-live-preview.md`):
|
|
see the words while recording. He expected to need a paid service; this uses the existing
|
|
Whisper instead, and the decision record says what a streaming service would change.
|
|
|
|
Touches the **client**, the **bridge** (one new route, one new limit) and the **contract package**
|
|
(one new response schema). No database change. No existing route, schema or error code changed.
|
|
`/v1/wake`'s request checks were moved into a shared helper (`audioClip`); its one behavioural
|
|
difference is the 400 message text ("Malformed request.").
|
|
|
|
## Design in five lines
|
|
|
|
1. `Controller.maybePreview` runs on each audio frame of a capture: after `firstMs` of audio,
|
|
then every `stepMs` more, never with a request already out, it posts the capture so far.
|
|
2. `POST /v1/transcribe` transcribes and returns `{text}`. Nothing else.
|
|
3. The result is dispatched as `capture_preview` only if that same capture object is still the
|
|
current one, its generation is current and the phase is still `listening`.
|
|
4. The controller fits the text to seven lines with the same measurer as answers
|
|
(`fitPreview`), keeping the end.
|
|
5. Sending is unchanged: the audio turn transcribes the whole recording itself. `heard` is set
|
|
from the turn's own `input_text`, only when the request was `spoken`.
|
|
|
|
## Where to look hardest
|
|
|
|
- The stale-result guard in 3, and that a preview for a cancelled or earlier recording is never
|
|
drawn (one integration test, with a delayed recogniser).
|
|
- A preview still running when the recording is sent holds the single-file recogniser queue, so
|
|
the real transcription can start late by up to one clip. The route aborts on a closed
|
|
connection, but the client does not close it, so this is a real cost today (0005, "Costs").
|
|
- `accepted` now maps to the client phase `transcribing` for a spoken request without a
|
|
transcript yet (it used to map to `thinking`). Typed requests are unchanged.
|
|
- "Heard:" now appears in Agents mode for spoken questions. Typed questions never show it.
|
|
- `fitPreview` always terminates: it drops at least one leading word per pass and stops at one.
|
|
|
|
## Round 18's required items
|
|
|
|
- Simulator: a ninth scenario launches the app with nothing switched off: menu drawn, swipe
|
|
moves the marker (screenshots differ and return), tap gives hands free with the microphone
|
|
opened through the real SDK bridge, double tap returns to the menu and closes it, Agents does
|
|
not listen, silence is never sent. It cannot show a name being heard: the microphone is
|
|
`alsa:null`.
|
|
- The extra blank line at the end of `tests/integration/wake.test.ts` is gone.
|
|
- Version is now 0.4.0, not 0.3.0: this is a new client behaviour. 0.3.0 is what is installed.
|
|
|
|
## State
|
|
|
|
Server: bridge `44ea114`. Even account: 0.3.0 on beta. Neither changed for this round. An older
|
|
bridge answers 404 to `/v1/transcribe`, on which the client records as before, so 0.4.0 is
|
|
safe against the deployed bridge but shows no words until the bridge is updated.
|
|
|
|
## Checks
|
|
|
|
`docs/test-evidence.md`, "Round 19", including one failed simulator run and what was not run.
|