Round 17 handoff and evidence (documentation only)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Dan
2026-11-28 10:52:06 -08:00
co-authored by Claude Fable 5.2
parent e1d183b54d
commit 44ea1148c3
2 changed files with 101 additions and 0 deletions
+75
View File
@@ -0,0 +1,75 @@
# Handoff for Cody, Round 17
From: Claude (implementation). Date: 2026-11-28 (UTC).
**Not reviewed.** Round 16: `bb3a309` plus documentation, tip `75b7ea1`.
| Item | Value |
|---|---|
| Branch | `cody/droplet-deploy` |
| `main` | `f02715fb6487f4e2ff0adeccfaad2403e1724aa5` (unchanged) |
| Code change | `e1d183b54dc5aeb94822d8efeeeb358b6b14a664` |
| New head | the tip after this push (this file and evidence only on top of the code change) |
## What this is
A new feature for trial, 0.3.0: an opening menu, and a hands-free mode in which an agent is called
by name. Dan's requests are quoted in `docs/decisions/0004-always-listening.md`, which also lists
what the implementer chose ("Owner decisions pending") and what the change reverses. Under the
standing rule those are owner decisions pending the device trial.
It touches the **client**, the **bridge** (one new route, new config) and the **contract package**
(two new schemas). No database change. No existing route, schema or error code changed.
## Design in six lines
1. `AppState.mode` is `agents` or `handsfree`. Everything else (agents, conversations, turns) is
shared. A new `menu` phase is the root page; `back` at Ready returns to it and resets the mode.
2. Hands free: at rest the microphone is open. `core/vad.ts` (pure, loudness only) emits
utterances; each is sent to `POST /v1/wake`.
3. The bridge transcribes, and `wake.ts` matches a leading agent name, exactly. It answers
`{matched, agent_id, text, near_miss}` and creates nothing.
4. A match with text becomes an ordinary **text turn** (`wake_text`); a name alone starts an
ordinary **audio capture** that ends on a pause (`wake_listen`). Request-id persistence,
deduplication, cancel and recovery are the existing code.
5. The result of a wake check is dropped if the reducer generation changed meanwhile, so a tap,
a cancel or a new pairing always wins over what was heard.
6. With the `wake` option, all microphone opens and closes go through `Controller.syncMic()`,
one at a time, each deciding from the state at its turn. Without the option (every test
written before this round) the previous microphone code runs unchanged.
## Where to look hardest
- **A turn with tools can start with no button pressed** (security 3d). The guards are: first
word only, exact match, "Heard: ..." on the HUD, double tap to cancel. No confirmation step.
- **All nearby speech is uploaded while in hands free** (security 3c). `/v1/wake` returns empty
`text` unless matched and logs ids only; one test asserts unaddressed speech is in no log line.
- **One spoken word can reach the phone's Diagnostics**: a near miss, in memory only. This is a
deliberate exception to "Diagnostics never contain content".
- `syncMic` and `afterChange` in `core/controller.ts`: the ordering argument is in the comments.
- `startCapture(auto)` seeds the recording from speech already heard while the name was being
checked, capped at the capture limit.
- The exit rule: the menu is the root page, so the system exit dialog is two double taps from
Ready. Whether Even accepts that is unverified.
- The manifest's `g2-microphone` description changed.
## Known limits, stated
- The segmenter's thresholds are guesses; no G2 audio has been through it. Tests use a tone.
- The recogniser in the integration tests is the scripted fake. Whether Whisper writes "Wendy",
"Cody" and "Pepper" as configured from G2 audio is unknown; aliases exist for that.
- The simulator suite runs with `?wake=off&menu=off`: it still covers the tap path and idle exit
and does **not** exercise the menu or hands free.
- A wake check blocks further checks for that device until it returns; speech that ends during
one is kept one deep (the latest), older is dropped.
## State
Nothing deployed, uploaded or installed. Server and Even account as in Round 16. No Hermes
profile, credential or production state was read or changed for this round. An older bridge
answers 404 to `/v1/wake`, on which the client ends hands free for the session, so the bridge
must be deployed before 0.3.0 is useful.
## Checks
All pass, list and omissions in `docs/test-evidence.md`, "Round 17".
+26
View File
@@ -747,3 +747,29 @@ Negative controls, each run against those tests: reconciliation removed (the rev
behaviour): 2 failed, 63 passed of 65. Reconciling while her turn is still in flight: 2 failed. behaviour): 2 failed, 63 passed of 65. Reconciling while her turn is still in flight: 2 failed.
Relabelling her conversation as the default's instead of restoring the default's own: 2 failed. Relabelling her conversation as the default's instead of restoring the default's own: 2 failed.
Reducer applying the fallback while busy: 1 failed. Reducer applying the fallback while busy: 1 failed.
## Round 17 (2026-11-28): menu and hands-free mode, on `e1d183b54dc5aeb94822d8efeeeb358b6b14a664`
```
$ npm run typecheck clean
$ npm test Test Files 18 passed (18); Tests 341 passed (341)
$ npm run client:build built
$ npm run test:real-hermes Tests 9 passed (9)
$ npm run test:real-stt Tests 11 passed (11)
$ npm run test:simulator Tests 8 passed (8) (launched with ?wake=off&menu=off)
$ git diff --check clean
```
Omitted: `pack` (nothing is being uploaded), `tests/deploy/runbook-proof.sh` (no deploy file
changed except a comment block in `deploy/bridge.env.example`). No negative controls were run.
Everything about the menu and hands free is **fakes only**: a 440 Hz tone for speech, a scripted
recogniser for what it "said", the fake glasses. New tests: `services/bridge/test/wake.test.ts`
(9), `apps/even-client/test/vad.test.ts` (8), `tests/integration/wake.test.ts` (24), one HUD
test and more variants in `apps/even-client/test/layout.test.ts`.
| Asserted in `tests/integration/wake.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 |
| 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 |