Skip to content

A personal assistant that lives on your desktop, remembers what matters, and can use your Mac for you.

TypeScript

docs(odd): record the rotation race finding

Alan Buscagliaa6b6390ac3a3
diff --git a/odd/tasks/gentle-dot.md b/odd/tasks/gentle-dot.md
index db7c479..88c812f 100644
--- a/odd/tasks/gentle-dot.md
+++ b/odd/tasks/gentle-dot.md
@@ -152,4 +152,5 @@ Environment notes: Node v24.14.1 and pnpm are present. `cargo` is on PATH but `r
- **L42 (2026-10-08, T20 evidence):** The child gets `ENGRAM_DATA_DIR=<real ~/.engram>` (gentle-engram 0.3.0 accepts a server only when `<data dir>/.instance-id` matches `/health`, `index.ts:580-649`), and the user's `ENGRAM_URL`/`ENGRAM_PORT` are kept. The project comes from `<data>/workspace/.engram/config.json` `{"project_name":"gentle-dot"}` (Engram detection step 0). A custom workspace becomes `preferredFolder` (an extra `--append-system-prompt`, never the cwd, nothing written in it). `GENTLE_DOT_ENGRAM=private` keeps the old private mode. RED 9 → GREEN 49/49. Probe against a stand-in global server: observation saved under `gentle-dot`, HOME hash identical, no private `.engram` created. Parent follow-ups (`400ec73`): the identity now pins memory to project `gentle-dot` (an explicit `project` in mem_save would otherwise win), and the stale `GENTLE_DOT_WORKSPACE` was removed from the Dockerfile, entrypoint, and e2e serve (`sh -n` OK, e2e 12/12). Docker build not re-run because Docker Desktop is stopped. On the user's Mac: the app restarted, the old private Engram (PID 93883, `~/.gentle-dot/home/.engram`) was stopped by PID with nothing listening on 7438, and the global server resolves `~/.gentle-dot/workspace` to project `gentle-dot` (source config). Memories saved earlier in the private store were not migrated (test data from today; the DB file is left in place).
- **L43 (2026-10-08, user):** "un item mas al final de todo, que haga como codex y que permitas controlar tu computadora, que pueda manejar tus aplicaciones y tal". Recorded as S24/T21, the last item, after T19, T18, and T14.
- **L44 (2026-10-08, T19 evidence):** The UI hides conversations behind `ready.features.conversations` (default off; `GENTLE_DOT_CONVERSATIONS=1`), and the daemon refuses `new_conversation`/`open_conversation` with `conversations_off` when off. Rotation (`rotation.ts`) triggers on 20 MB or 10 compactions, only when idle. The handoff is a hand-written Pi v3 session file (header with `parentSession` plus one `custom_message`, `display:false`, `customType gentle-dot.handoff`) followed by `switch_session`, with a verification of `get_state` and `get_messages` and a `new_session` fallback; formats are copied from `session-manager.js` with paths cited. History now reads the session files (including pre-compaction messages) with 100-message pages, `hasEarlier`, and `get_earlier` across the chain persisted in `state.json`. Finding: Pi emits `message_end` on stdout before writing the entry to the file, so history reads do a `get_state` round trip first. The Stop pill is centered (inline-flex, no vertical padding; measured 7/8 px). Design §4/§6/§7/§9/§10 and the README were updated. RED → GREEN for protocol, UI, and the daemon module; e2e written after the code. 260 tests, typecheck, lint, e2e 14/14. Parent real-engine probe (bundled engine, temp HOME/data, private Engram on a temp port, stopped by PID): `switch_session` to the hand-written file returned `cancelled:false`, `get_state.sessionFile` equals the file, and `get_messages` holds one `custom` message of type `gentle-dot.handoff` with the probe text. Open: the tray still shows "New conversation" (apps/desktop follow-up); with the flag on, conversation switches combined with the chain are untested.
-- **Next step:** T18 (connectors), with the tray item follow-up in the next apps/desktop batch; then T14 (Linux) and T21 (computer control); a Docker build check when Docker runs.
+- **L45 (2026-10-08, T18a finding):** The T18a writer found `rotation.test.ts` flaky in full runs (4/4 runs on a clean `git archive HEAD` copy, each time a different rotation test timing out; 3/3 in isolation). The likely cause is a T19 race in bridge.ts: when the prompt response and `agent_settled` arrive in one stdout chunk, `rotateWhenIdle` runs while `sending` is still 1, so rotation is skipped until the next run settles. In production this only delays rotation to the next run, but it is a real defect. Decision: fix in T18a, test first, with a single in-flight rotation flag and at least 3 full runs. The parent's two earlier green full runs were luck.
+- **Next step:** T18a (running), then T18b; then T14 (Linux) and T21 (computer control); a Docker build check when Docker runs.