diff --git a/docs/contracts/2026-11-21-droplet-deployment-and-first-device-run.md b/docs/contracts/2026-11-21-droplet-deployment-and-first-device-run.md index 831861a..0c0b80c 100644 --- a/docs/contracts/2026-11-21-droplet-deployment-and-first-device-run.md +++ b/docs/contracts/2026-11-21-droplet-deployment-and-first-device-run.md @@ -84,6 +84,10 @@ Quoted from the conversation of 2026-11-21, in order. Cody recorded after Round 9 that Dan's direct confirmation validates this contract. Section F was added afterwards, in the same way: Dan's words, quoted. +**Status of section F: not yet confirmed by Dan.** Cody's Round 11 verdict holds that the earlier +confirmation covers sections A to E only. F1 to F3 and F6 to F7 quote Dan; F4 and F5 are the +implementer's additions. Until Dan accepts or rejects F1 to F5, section F is a proposal. + | # | Dan said | Criterion | |---|---|---| | F1 | "another annoyance is that it stays on screen and never times out. I want the app to work like any other even app. call it to be used, and then it disappears but stays callable" | After a resting screen has been untouched for a set time, the app leaves the glasses by itself and can be called again. | diff --git a/docs/evidence/simulator/08-after-idle-exit.png b/docs/evidence/simulator/08-after-idle-exit.png new file mode 100644 index 0000000..ca7abe8 Binary files /dev/null and b/docs/evidence/simulator/08-after-idle-exit.png differ diff --git a/docs/handoff/2026-11-21-cody-round-12.md b/docs/handoff/2026-11-21-cody-round-12.md new file mode 100644 index 0000000..0656fac --- /dev/null +++ b/docs/handoff/2026-11-21-cody-round-12.md @@ -0,0 +1,55 @@ +# Handoff for Cody, Round 12 + +From: Claude (implementation). Date: 2026-11-21. + +**Not reviewed.** Round 11 (`1ae105e`): REVIEW BLOCKED, CODY-016, 017, 018 and the section F gate. + +| Item | Value | +|---|---| +| Branch | `cody/droplet-deploy` | +| `main` | `f02715fb6487f4e2ff0adeccfaad2403e1724aa5` (unchanged) | +| Reviewed in Round 11 | `1ae105ed18e2082ada59e4351136f5bc5e9cdca4` | +| Code fix | `bbde3c8` | +| New head | the tip after this push (this file and evidence only on top of `bbde3c8`) | + +## Section F gate + +Not resolved by this push, and not something the implementer can resolve. The contract now +states that section F is a proposal until Dan accepts or rejects F1 to F5. Dan has been asked +directly. No owner quote was added or changed. If Dan rejects F4 or F5, that behaviour will be +removed or revised in a further commit. + +## Findings + +| Finding | Change | Files | +|---|---|---| +| CODY-016 | The adapter subscribes to the launch source in its constructor (boot creates it as soon as the Even bridge is in hand), remembers it, and replays it to later listeners. Unsubscribe removes the controller's listener. `appMenu` does not arm. | `device/evenAdapter.ts`, `device/port.ts` | +| CODY-017 | README paragraph rewritten: one owner-reported beta run; pocketed, five-minute and ten-cycle runs unverified. | `README.md` | +| CODY-018 | `exitNow()` returns confirmation. One shutdown call at most, through the host-call queue; a repeat waits on the same call; a confirmed exit (even a late one) ends it. The controller is "gone" only on confirmation or a `system_exit`/`abnormal_exit` event; otherwise it retries after 3 s, up to 4 attempts in a row, under the same resting-screen and phone-grace guards; activity starts the count again. | `device/evenAdapter.ts`, `core/controller.ts`, `device/previewDevice.ts` | + +Also changed: a development-only `?idleExit=fast` (compiled out of production; checked in the +bundle) so the simulator suite can perform the exit, as Round 11 asked. + +## Where to push + +1. After 4 unconfirmed attempts the app stays open until the next activity. If the host never + confirms and nobody touches the glasses, Pepper stays on the display. That is the bounded + behaviour asked for, and it is also the original complaint in its worst case. +2. Confirmation is `=== true` from `shutDownPageContainer`. The simulator returns true. What the + real Even app returns is unknown; if it returns something else on success, the page is torn + down anyway, and if it returns something else while leaving the app open, the retries apply. +3. A retry that finds the earlier call still with the host counts as an attempt. +4. The fake-clock tests fake timers and `Date` only; start-up bridge calls are real. +5. The simulator scenario relaunches the simulator inside the suite; its console capture is + sliced from the relaunch. + +## State + +- 0.1.1 is **not** uploaded to Even, not installed on any device, not deployed. The pack check + wrote a local, git-ignored `hermeven.ehpk` only. +- Server: unchanged, bridge and page at `d90cd89`. +- Idle exit has never run on the glasses. + +## Checks + +All pass on `bbde3c8`, nothing omitted: `docs/test-evidence.md`, "Round 12". diff --git a/docs/test-evidence.md b/docs/test-evidence.md index 7349878..5d83220 100644 --- a/docs/test-evidence.md +++ b/docs/test-evidence.md @@ -522,3 +522,46 @@ the countdown on a gesture, which is redundant because every gesture already pas The simulator suite runs with `?idleExit=off` (a development-only switch, compiled out of production builds) because it drives the app for longer than the idle timeout between steps. **The exit itself (`shutDownPageContainer(0)`) has not been run in the simulator or on a device.** + +## Round 12: CODY-016, 017, 018 (2026-11-21) + +Run on `bbde3c8`. + +``` +$ npm ci exit 0 +$ npm run typecheck exit 0 +$ npm test Tests 251 passed (251) +$ vitest --project integration entryPoint + client-bridge + bridge + idleExitHost + clientSecurity + Tests 134 passed (134) +$ npm run client:build built +$ HERMEVEN_BRIDGE_ORIGIN=https://hermeven.xylo.gg npm run -w @hermeven/even-client pack + Stamped hermeven.ehpk (99923 bytes); not uploaded +$ npm run test:real-stt Tests 11 passed (11) +$ npm run test:real-hermes Tests 9 passed (9) +$ npm run test:simulator Tests 8 passed (8) +$ bash -n deploy/install.sh tests/deploy/runbook-proof.sh ok +$ tests/deploy/runbook-proof.sh exit 0 (Caddy "Valid configuration", fmt 0 changed lines; + systemd-analyze verify ok; unit active as hermeven) +$ git diff --check f02715f...HEAD ; git diff --check 1ae105e HEAD clean +``` + +No check was omitted. The production bundle was searched for the development-only +`?idleExit=` switch and its short timings: absent. + +| Finding | Where | Proven by | +|---|---|---| +| CODY-016 | `tests/integration/idleExitHost.test.ts`, production adapter, stand-in host | `glassesMenu` pushed while start-up is parked on a stalled storage read and before the HUD exists: armed, one exit. Under a fake clock with the default times: pushed before the controller starts, and pushed after it subscribed, each gives no exit at 29.9 s, one at 30.1 s, still one after ten more minutes. `appMenu` pushed early: no exit in ten minutes; after one gesture, one exit 30 s later. A stopped controller hears nothing. | +| CODY-018 | same file, plus `client-bridge.test.ts` and `clientSecurity.test.ts` | Host answers false, throws, or does not answer, then succeeds: retried and left exactly once. A held call is never joined by a second one (calls in flight never exceed 1), a late success after every attempt ran out is remembered and no further call is sent, a late refusal is followed by one fresh call. The exit waits behind an unfinished storage write. Bounded: a host that always refuses is asked 3 times (as configured), then again only after a gesture. A `system_exit` or `abnormal_exit` event stops both the exit and its retries. No unhandled rejection in any of these. No exit while recording, transcribing, thinking, awaiting approval, disconnected with a request outstanding, or in the phone grace period. | +| CODY-017 | `README.md` | Read the status table and the paragraph beneath it. | + +Deliberate breakages, each run against the new tests: launch source not replayed (6 tests +fail), a failed exit treated as final (7), a second shutdown call issued while one is in flight +(2), a late success forgotten (1), retries unbounded (2), the exit bypassing the host-call queue +(first run: not caught; a test was added and it is now caught, 1). + +Simulator (0.9.5), new eighth scenario, run with the development-only `?idleExit=fast` (5 s at +Ready) and without idle exit disabled: opened by URL with no gesture, nothing happens for 6.5 s; +after one swipe the app logs "leaving the glasses: idle on ready", the simulator's +`shutDownPageContainer(0)` answers true, the app logs "left the glasses", and the display is +empty (`docs/evidence/simulator/08-after-idle-exit.png`). This shows what the simulator does. It +is not evidence of what the Even app or the glasses do.