Skip to content

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

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

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).
@MaxGhenis

Copy link
Copy Markdown
Owner Author

Closing as stale (idle since 2026-07-20; #148 fixed the self-heal loop it warns about by dropping the OSID requirement, and main's runbook now documents that fix, so this callout would add outdated advice; the stale-build checks are covered by #153 and #154). Max's PR sweep 2026-09-25. Reopen if still wanted.

@MaxGhenis MaxGhenis closed this Sep 25, 2026
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