diff --git a/docs/handoff/2026-11-29-cody-round-25.md b/docs/handoff/2026-11-29-cody-round-25.md new file mode 100644 index 0000000..e050fe9 --- /dev/null +++ b/docs/handoff/2026-11-29-cody-round-25.md @@ -0,0 +1,95 @@ +# Handoff for Cody, Round 25 + +From: Claude (implementation). Date: 2026-11-29 (UTC). + +**Not reviewed.** Your Round 24 on `958567453c2ab651c2c5517c2ff01dfef5123672`: NEEDS CHANGES, +CODY-025 (blocking) and CODY-026. + +| Item | Value | +|---|---| +| Branch | `cody/droplet-deploy` (as in every round so far; say if you want a new branch name) | +| `main` | `f02715fb6487f4e2ff0adeccfaad2403e1724aa5` (unchanged) | +| Code change | `2a4af63f0054c2212a58adc5708e83a4b16ea635` | +| New head | the tip after this push (this file and evidence only on top of the code change) | + +## CODY-025: confirmed, corrected + +You were right. The controller dropped late audio from the *bridge*, but once the bytes were +handed to the speaker nothing could call off the resume or the decode. + +`createSpeaker` now keeps a generation counter. `play()` takes the next number and silences +whatever is sounding; `stop()` advances the number and silences. After `resume()` and again +after `decodeAudioData()`, a play whose number is no longer current returns (resolving, since +"stopped" is not a failure) without creating a source. Only the current play ever assigns +`current`, so an older play cannot start, stop or replace a newer one. Stopping an active +source and natural completion are as before. + +`apps/even-client/test/speaker.test.ts`, with a fake `AudioContext` whose `resume()` and +`decodeAudioData()` are settled by the test: + +| Test | Result on `9585674`'s speaker.ts | On this commit | +|---|---|---| +| no sound engine: no speaker | pass | pass | +| plays to the end (natural completion) | pass | pass | +| stop while sounding stops that source once | pass | pass | +| stop during resume: nothing decoded or started | **fail** | pass | +| stop during decode: never started | **fail** (your control) | pass | +| overlapping decodes, older finishing last | **fail** | pass | +| overlapping decodes, older finishing first | **fail** | pass | +| new answer while one sounds: old stopped, new plays, old's late "ended" ignored | pass | pass | +| blocked engine and undecodable audio reject, nothing left playing | pass | pass | + +The negative control was run: 4 failed, 5 passed on the old file; 9 passed on the new. + +## CODY-026: corrected + +"Not in this slice" now excludes speech made on the phone or by a native component, and +knowing the output or wear state, and says the 0.5.0 candidate's spoken answers are generated +by the bridge and played by the page. The spoken-answers status row says the playback code is +tested against a fake sound engine and that the real provider, real MP3 decoding and playback, +upload, installation and the device are all untested. + +## One addition you did not ask for + +`Controller.notePhoneActivity` writes one diagnostic line when phone-page activity begins to +hold off the idle exit ("phone page touched: not leaving the glasses while it is in use"). No +behaviour changes. Reason: the simulator's idle-exit scenario failed in 2 of 9 runs today +(below), and this is the one silent reason the app has for not leaving. + +## Simulator: two kinds of failure seen, neither explained + +Thirteen runs today on this round's code (nine before the diagnostic line, four after): + +| Runs | Result | +|---|---| +| 10 | 9 passed | +| 2 | "idle exit for real" failed: the console never showed "leaving the glasses: idle on ready" within 15 s. The Round 19 failure. | +| 1 | "as shipped" failed its last assertion: one `[unhandledrejection]` with an empty message (Vite printed "Unknown Error: null"). Not seen before or since. | + +Hypothesis for the idle exit, **not shown**: the simulator is a real window on a desktop Dan +was using at those moments; a key or click landing in it counts as phone-page activity and +holds the exit off for two minutes. The four runs after the diagnostic line all passed, so the +line has not yet had the chance to confirm or refute it. The unhandled rejection I cannot +attribute: it could be this round's code (the speaker is created in that scenario, though +`play` is never called there) or the simulator. Round 24's three runs and ten of today's did +not show it. + +## Unchanged from Round 24 + +The bridge (routes, adapter, limits, shutdown change), the menu switch, the controller's +speech lifecycle, the docs' risk statements. No credential in source, tests, logs or this text; +the real provider has not been called. + +For your information, not part of this SHA: Dan has since added an ElevenLabs key and three +voice ids to `/etc/hermeven/bridge.env` himself. I checked only that the four names are present +once each and well-formed, without printing values. The running bridge (`d65beea`) does not +read them. + +## State + +Server: bridge `d65beea`. Even account: 0.4.1 on beta. Nothing in this round is deployed, +uploaded or installed. + +## Checks + +`docs/test-evidence.md`, "Round 25". diff --git a/docs/test-evidence.md b/docs/test-evidence.md index 67d42c9..cc2a02c 100644 --- a/docs/test-evidence.md +++ b/docs/test-evidence.md @@ -975,3 +975,47 @@ another device's turn, an unfinished turn, an unknown id and a voiceless agent a provider call; over-budget 429 while an already-made clip is still served; provider failure is a fixed message with nothing of the provider's or the answer's text in the reply or the log; no fetch or playback with Voice off; late audio not played; no `/v1/transcribe` in hands free. + +## Round 25 (2026-11-29): CODY-025, CODY-026, on `2a4af63f0054c2212a58adc5708e83a4b16ea635` + +On the committed code: + +``` +$ npm run typecheck clean +$ npm test Tests 384 passed (384) +$ npx vitest run --project even-client apps/even-client/test/speaker.test.ts Tests 9 passed (9) +$ npm run client:build built (as part of pack) +$ HERMEVEN_BRIDGE_ORIGIN=https://hermeven.xylo.gg npm run -w @hermeven/even-client pack (twice) + hermeven.ehpk 107946 bytes, SHA-256 + 17839ae104a7b408c52b58d5ebb901b144f14017869f3ec230519f4ceb52af3d both times; not uploaded +$ npm run test:simulator 4 runs, 9 passed each time +$ git diff --check origin/main...HEAD ; git diff --check 9585674 HEAD clean +``` + +On the same code minus the one diagnostic line in `Controller.notePhoneActivity` (added +afterwards; `npm test` above includes all of these again except the last four): + +``` +$ npm ci ok +$ npm rebuild @evenrealities/evenhub-simulator +$ npx vitest run --project integration tests/integration/voice.test.ts tests/integration/wake.test.ts Tests 52 passed (52) +$ npx vitest run --project even-client apps/even-client/test/soundCheck.test.ts Tests 6 passed (6) +$ npm run test:real-stt Tests 11 passed (11) +$ npm run test:real-hermes Tests 9 passed (9) (isolated gateway, stub model) +$ bash -n deploy/install.sh tests/deploy/runbook-proof.sh ok +$ systemd-analyze verify deploy/hermeven-bridge.service + exit 1: "Command /opt/node/bin/node is not executable: No such file or directory" + (this machine has no /opt/node; no other message) +$ npm run test:simulator 9 runs: 6 passed all nine; 2 failed "idle exit for real"; + 1 failed "as shipped" on an unhandled rejection with no message +``` + +The pack on that earlier tree was 107913 bytes, `5b458b45...`, twice; superseded by the hash +above. The simulator failures are described in the handoff; they are reported, not explained. + +Negative control for CODY-025: `speaker.ts` replaced by its `9585674` version with the new +test file: 4 failed, 5 passed. Restored: 9 passed. + +**Not run:** `caddy validate` (not installed here); `tests/deploy/runbook-proof.sh`. No call +to the real ElevenLabs API. No MP3 decoding or playback in a real browser, the simulator, the +Even app or on a phone: the speaker tests use a fake sound engine.