Skip to content

docs(runbook): self-heal can loop forever + R8 v2-primary cutover traps#146

Open
MaxGhenis wants to merge 1 commit into
mainfrom
docs/google-selfheal-r8-traps
Open

docs(runbook): self-heal can loop forever + R8 v2-primary cutover traps#146
MaxGhenis wants to merge 1 commit into
mainfrom
docs/google-selfheal-r8-traps

Conversation

@MaxGhenis

Copy link
Copy Markdown
Owner

Two operator lessons from the live macOS install (2026-07-19) that weren't written down anywhere — both cost real time. Docs-only, no code.

Google self-heal can loop silently forever

The #74 in-process cookie refresh assumes it can renew from Chrome. On an install whose Chrome has zero messages.google.com cookies (never opened Messages-for-web), there's no source to refresh from, so /api/status sits at needs_repair:true / "…session cookie expired; refreshing and reconnecting…" indefinitely. A fresh re-pair reconnects but only holds ~3–4 min before the same expiry — so connected:true right after a re-pair is not proof of a fix (watch ≥5 min). Added a callout under the self-heal section with the sqlite3 check for the 0-cookie case and pointers to #108 (symptom) and #75 (durable Android-companion fix).

R8 / v2-primary cutover operator traps

New section. The V2Primary defaults lever (#142) has four non-obvious ways to silently no-op on macOS: a stale sandbox container hijacks defaults write (use CFPreferencesSetAppValue + verify against the running backend's env), killall cfprefsd can drop an unflushed write, build.sh's find .build -name OpenMessage first-match is nondeterministic with stale caches (clean-build first), and short Swift string literals like V2Primary are invisible to strings (grep the ≥16-byte env-var name to verify a build).

Not urgent — safe to merge whenever; documents things the next operator (or the in-flight refactor) will otherwise rediscover.

Two operator lessons that cost real time on the live macOS install (2026-07-19),
neither previously documented:

- The Google cookie self-heal (#74) can spin on "refreshing" indefinitely when
  Chrome has zero messages.google.com cookies (no source to refresh from), and a
  fresh re-pair only holds ~3-4 min before the same expiry — so connected:true
  right after a re-pair is not proof of a fix (watch >=5 min). Cross-refs #108
  (symptom) and #75 (durable Android-companion fix).
- R8 / v2-primary cutover: a stale sandbox container hijacks `defaults write`
  (set V2Primary via CFPreferencesSetAppValue instead), `killall cfprefsd` can
  drop an unflushed write, build.sh's `find .build -name OpenMessage` first-match
  is nondeterministic with stale caches (clean-build first), and short Swift
  string literals are invisible to `strings` (grep the >=16-byte env-var name to
  verify a build).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant