From d90cd8972af0ed26a1c4c25a6acdbda775fcf8a7 Mon Sep 17 00:00:00 2001 From: Dan Date: Sat, 21 Nov 2026 13:38:35 -0800 Subject: [PATCH] Round 9 handoff and evidence section (documentation only) Co-Authored-By: Claude Fable 5.2 --- docs/handoff/2026-11-21-cody-round-9.md | 103 ++++++++++++++++++++++++ docs/test-evidence.md | 35 ++++++++ 2 files changed, 138 insertions(+) create mode 100644 docs/handoff/2026-11-21-cody-round-9.md diff --git a/docs/handoff/2026-11-21-cody-round-9.md b/docs/handoff/2026-11-21-cody-round-9.md new file mode 100644 index 0000000..c9b36de --- /dev/null +++ b/docs/handoff/2026-11-21-cody-round-9.md @@ -0,0 +1,103 @@ +# Handoff for Cody, Round 9 + +From: Claude (implementation). Date: 2026-11-21. + +**Not reviewed.** Round 8's result (REVIEW BLOCKED) applies to `09e21f6` only. + +| Item | Value | +|---|---| +| Repository | `git@git.xylo.gg:Xylo-Digital/hermeven.git` | +| Branch | `cody/droplet-deploy` | +| `main` | `f02715fb6487f4e2ff0adeccfaad2403e1724aa5` (SHIP; unchanged) | +| Reviewed in Round 8 | `09e21f6368deed7917a9f5dcd2eadce5547eca04` | +| New head | the tip of `cody/droplet-deploy` after this push; exact SHA in the push report | + +## The contract + +`docs/contracts/2026-11-21-droplet-deployment-and-first-device-run.md`. + +It was written by the implementer. Dan was asked to supply an independent one and answered: "you +supply the contract. why am I needed for this trivial nonsense?" The contract says so at the top, +and ties each criterion to Dan's quoted words or to a correction Cody required. It is the owner's +decision that this is the contract; it is not independent of the implementer. + +## This branch is no longer small + +Round 8 covered a start-up change. Since then Dan ran the app on his glasses for the first time +and the branch grew. Commits since `09e21f6`: + +| Commit | Kind | What | +|---|---|---| +| `7f055d4` | client, tests, docs | CODY-014; contract; first device evidence | +| `b8191a7` | client | "Glasses input" line in Diagnostics (event types only) | +| `9cb34b3` | client, tests | Long press handled; hold-to-talk | +| `fd99255` | manifest | App name "Pepper", package id `xylo.hermeven` | +| `bc00ae9` | **bridge**, tests | `HERMEVEN_ALLOWED_ORIGINS` accepts `http://127.0.0.1:*` | +| `fb0a6b9` | docs | README, decision record, contract, evidence | +| next | docs | This handoff and the Round 9 evidence section | + +Bridge files changed since `main`: `services/bridge/src/config.ts`, `services/bridge/src/server.ts` +(and their tests). Nothing else under `services/` or `packages/`. + +## CODY-014 + +| Required | Done | +|---|---| +| 1. Immediate accessible loading surface | `#startup` in the static HTML, `role="status"`, `aria-live="polite"`, inline-styled, ahead of the script. | +| 2. Keep delayed-host detection; select EvenDevice when a callable host appears | Unchanged logic, now in `src/boot.ts`. | +| 3. After timeout, replace with the labelled preview | Yes. | +| 4. No eager fallback | Nothing is mounted and no device chosen until detection answers. | +| 5. Remove the start-up surface when the real page mounts | `startup.remove()` after `mountPhoneUi`. | +| Proof 1 to 3 | `tests/integration/entryPoint.test.ts`, with the real `index.html`, `boot()` and Even SDK in happy-dom. | +| Proof 4: physical Even-app probe | For the build of `7f055d4`: Dan read from the phone, inside the Even app, "Even app host (SDK 0.0.16), found after 4 ms", "HUD created", and the glasses showing the Ready screen. **Later client builds were not probed for those two lines**; see below. | + +## What needs the most scrutiny + +1. **`bc00ae9` loosens an origin restriction.** Earlier rounds said not to. It is the only way an + Even Hub installed app can call the bridge: the Even phone app serves it from + `http://127.0.0.1:` with a new port each launch (Dan observed the change). It is off by + default, loopback only, http only, numeric port only, and matched as whole-string text. It is + **not deployed**: Dan was offered "deploy now, review after" and chose "send to cody". +2. **Hold-to-talk keeps the microphone open for as long as a finger is down**, up to the capture + cap, and a hold released in under 0.7 s leaves it open until the next tap. Is that the right + reading of "explicit user-triggered capture"? +3. **The Glasses input line** shows envelope names and numeric codes. Check that nothing derived + from audio or content can reach it. +4. **The precautionary host-detection wait** is still there (2.5 s) though the device showed the + host arriving in 4 ms. It costs an ordinary browser 2.5 s and protects against nothing observed. + +## What was and was not seen on the device + +All in `docs/evidence/device/2026-11-21.md`. In short: four spoken questions were answered on the +glasses (QR sideload, phone unlocked, build `09e21f6`); the `7f055d4` build was probed as above; +long-press events were observed on `b8191a7`; the installed private build opens but cannot reach +the bridge without `bc00ae9`. **Hold-to-talk has not been used on the device. The final client +build's Runtime and HUD lines were not read back.** + +## Production state right now + +Changed today with Dan's approval each time (table in `docs/evidence/droplet/2026-11-21.md`): + +- Bridge code: still `f02715f`. +- Static page: a build of `fd99255` (unreviewed client code). +- `HERMEVEN_ALLOWED_ORIGINS=http://127.0.0.1:40315`: a single exact origin that no longer matches + anything, left in place. +- Even's portal: private build "Pepper" `xylo.hermeven` 0.1.0, built from `fd99255`. + +## Checks + +All of Round 8's required checks pass on `fb0a6b9`, with nothing omitted: `docs/test-evidence.md`, +"Round 9". + +## Mistakes made this session, so they are not found later + +- The implementer told Dan a tap failure might be a regression before knowing; it was a long + press that the code ignored. +- The first allowed-origin fix (`:40315`) was applied to production knowing the port might change. + It did. +- Earlier the same day: the Chrome-versus-Even-app misdiagnosis recorded in the Round 7 handoff. + +## Not claimed + +Nothing in this branch is merged. `bc00ae9` is not deployed. No locked-phone, ring, menu, paging +or hold-to-talk evidence from the device. diff --git a/docs/test-evidence.md b/docs/test-evidence.md index b98d03e..666d8d9 100644 --- a/docs/test-evidence.md +++ b/docs/test-evidence.md @@ -445,3 +445,38 @@ not exist there, which is expected. No check was omitted. The proof output, the live-server header and CORS checks and the page load are in `docs/evidence/droplet/2026-11-21.md`. The 7 tests added since Round 5 are for host detection (`tests/integration/hostDetect.test.ts`). + +## Round 9: after Cody's Round 8 review, and the first device session (2026-11-21) + +Cody reviewed `09e21f6`: REVIEW BLOCKED for lack of a contract, with CODY-014 open (blank page +during host detection). Since then the branch also gained changes that came out of the first +session on a physical G2. All checks below were run on `fb0a6b9`. + +``` +$ npm ci exit 0 +$ npm run typecheck exit 0 +$ npm test Tests 224 passed (224) +$ vitest hostDetect + entryPoint Tests 15 passed (15) +$ npm run client:build built +$ npm run test:real-stt Tests 11 passed (11) +$ npm run test:real-hermes Tests 9 passed (9) +$ npm run test:simulator Tests 7 passed (7) +$ bash -n deploy/install.sh tests/deploy/runbook-proof.sh ok +$ tests/deploy/runbook-proof.sh exit 0 (disposable Ubuntu 24.04 host with systemd) + Caddy 2.6.2: "Valid configuration"; fmt --diff 0 changed lines + systemd-analyze verify: ok; unit active, running as hermeven + app tree: 0 files not root-owned, 0 group/other-writable +$ git diff --check clean +``` + +No check was omitted. + +| Change | Tests | Negative control | +|---|---|---| +| CODY-014: start-up status, no eager fallback | `tests/integration/entryPoint.test.ts`: the real `index.html`, the real `boot()` and the real Even SDK in a DOM. Status visible before any script; still waiting just before the timeout; preview only after it; a callable host appearing mid-wait selects the Even adapter, initialises the SDK bridge and creates the HUD page; status removed on mount. | 6 ways of undoing it, all caught | +| Glasses input diagnostic | Same file: events pushed through the SDK's own entry point show up by type; audio is counted and its payload never appears. | | +| Long press and hold-to-talk | `tests/integration/client-bridge.test.ts` (5 tests), `apps/even-client/test/events.test.ts`, and the simulator's `long_press` / `long_press_release` actions. | | +| Loopback any-port origins | `tests/integration/bridge.test.ts` (4 tests) and `services/bridge/test/units.test.ts`: any port on a configured loopback host is echoed; 17 look-alike, LAN, https and foreign origins are refused; no other wildcard is accepted by configuration; an allowed origin without a credential still gets 401. | 5 ways of loosening it; 4 caught, 1 is an equivalent change (an empty list already refuses) | + +What happened on the device is in `docs/evidence/device/2026-11-21.md`; what was changed on the +server, and with whose approval, is in `docs/evidence/droplet/2026-11-21.md`.