Round 19 handoff and evidence (documentation only)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Dan
2026-11-28 11:44:59 -08:00
co-authored by Claude Fable 5.2
parent f9946a027a
commit 31ae4efb13
2 changed files with 118 additions and 0 deletions
+74
View File
@@ -0,0 +1,74 @@
# 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.
+44
View File
@@ -773,3 +773,47 @@ test and more variants in `apps/even-client/test/layout.test.ts`.
| `/v1/wake` | match with text, name alone, greeting, alias; unaddressed speech returns empty text and appears in no log line; near miss is one word; 401 / 400 / 415; failed transcription is "not matched"; 404 with no speech-to-text or no named agent; one check at a time and a per-minute budget separate from turns; no run is posted to Hermes | | `/v1/wake` | match with text, name alone, greeting, alias; unaddressed speech returns empty text and appears in no log line; near miss is one word; 401 / 400 / 415; failed transcription is "not matched"; 404 with no speech-to-text or no named agent; one check at a time and a per-minute budget separate from turns; no run is posted to Hermes |
| Menu | opens on it with Hands free first, microphone closed, nothing sent; one tap is hands free; double tap at Ready returns to it and closes the microphone; double tap on it requests the system exit; Agents behaves as 0.2.0 including idle exit; an untouched menu leaves, hands free does not; Agents only where hands free cannot work; a turn in flight at relaunch is shown instead of the menu | | Menu | opens on it with Hands free first, microphone closed, nothing sent; one tap is hands free; double tap at Ready returns to it and closes the microphone; double tap on it requests the system exit; Agents behaves as 0.2.0 including idle exit; an untouched menu leaves, hands free does not; Agents only where hands free cannot work; a turn in flight at relaunch is shown instead of the menu |
| Hands free | one-breath question reaches the named agent as text with "Heard:" shown; microphone closed while in flight and reopened at rest; agents switch by name and keep their own conversations; name alone records and sends on a 1.2 s pause without reopening the microphone; a question finished before the name was recognised is not lost; name then silence sends nothing; a tap during a check wins; 404 from the bridge ends hands free and says so; refused or silent microphone is retried; closed on disconnect and stop | | Hands free | one-breath question reaches the named agent as text with "Heard:" shown; microphone closed while in flight and reopened at rest; agents switch by name and keep their own conversations; name alone records and sends on a 1.2 s pause without reopening the microphone; a question finished before the name was recognised is not lost; name then silence sends nothing; a tap during a check wins; 404 from the bridge ends hands free and says so; refused or silent microphone is retried; closed on disconnect and stop |
## Round 19 (2026-11-28): live preview, on `f9946a027a92da79d9321bc7ca7e4555b8ba900f`
```
$ npm run typecheck clean
$ npm test Test Files 18 passed (18); Tests 349 passed (349)
$ npx vitest run (the Round 18 list: wake, vad, layout, integration wake) Tests 66 passed (66)
$ npm run client:build built
$ HERMEVEN_BRIDGE_ORIGIN=https://hermeven.xylo.gg npm run -w @hermeven/even-client pack (twice)
hermeven.ehpk 105146 bytes, SHA-256
eba2103df81e0e7c35e5684fcd07915f03af1015f5f9c5acae730e25039f8d8f both times; not uploaded
$ npm run test:real-stt Tests 11 passed (11)
$ npm run test:real-hermes Tests 9 passed (9)
$ npm run test:simulator 4 runs with the ninth scenario: 9 passed (9) three times;
once 1 failed | 8 passed (see below)
$ bash -n deploy/install.sh tests/deploy/runbook-proof.sh ok
$ systemd-analyze verify deploy/hermeven-bridge.service exit 0; one message: /opt/node/bin/node
"is not executable" (it does not exist on the development desktop)
$ git diff --check origin/main...HEAD clean (run on the committed SHA)
```
Everything except the last line was run on the working tree immediately before it was committed
as the SHA above, not on a fresh checkout of it. `npm ci` was not re-run.
**The failed simulator run.** The first run after adding the ninth scenario failed in the
existing eighth scenario (idle exit with short waits), at
`waitConsole('leaving the glasses: idle on ready', 15_000)`: the line never appeared. The next
three runs passed all nine. The cause was not found. That scenario launches with
`wake=off&menu=off&preview=off`, where none of this round's client code runs
(`afterChange` and `maybePreview` return at once), but that is an argument, not a diagnosis.
**Not run:** `caddy validate` (caddy is not installed here), `tests/deploy/runbook-proof.sh`
(no file under `deploy/` changed in this round). No negative controls were run.
New tests, all in `tests/integration/wake.test.ts` (fakes: a tone, a scripted recogniser):
| | Asserted |
|---|---|
| `/v1/transcribe` | returns trimmed text; posts nothing to Hermes; the text is in no log line; 401, 400 (wrong format, odd byte count); failed transcription gives empty text; 404 without speech-to-text; one at a time per device and its own per-minute budget, separate from wake checks |
| Words while recording | the HUD shows each preview as the recording grows; after sending, the last preview stays under "Transcribing…"; "Heard:" then shows the turn's own transcript (which differs from the previews in the test); exactly one turn and one execution |
| Long text | the newest words are kept, with a leading "…", within nine measured lines |
| Stale preview | one that returns after a cancel, during the next recording, is not drawn |
| Fallbacks | without speech-to-text nothing is requested and recording works; a typed question never shows "Heard:" |
| Hands free | the question after a name alone shows its words and reaches the named agent |