Menu ▾ ▴

#437 Live check: repeatable sleep, network and worker-death tests

open
nobody
6 days ago
7 days ago
Anonymous
No

Originally created by: kristofferR

Problem

Chatpane's recovery (sync health, realtime health, worker recovery, silent recovery, auto refresh) has been validated by hand, one case at a time: docs/sync-recovery.md records CONNECT-proxy blackholes, closed MessagePorts and failed worker setups run once against a diagnostics build. Nothing re-runs them, so a change to reloads, connections or notifications can regress a case nobody re-tests.

Design

A repeatable live check, adapted from fMess's fmess-live-check skill (https://github.com/toanbku/fmess/tree/0cc6ecf/.claude/skills/fmess-live-check, MIT): simulate the case instead of releasing and waiting for reports.

  • Runs a diagnostics build through a local CONNECT proxy with modes blackhole (open tunnels pass nothing and never close), refuse (offline) and reset (every connection dropped). The proxy and any fault hooks exist only in debug builds.
  • Sleep is a clock jump between two ticks of the recovery timer (a debug-only hook); the encrypted-chats worker dies through Messenger's own calls; a message being typed is a hidden focused contenteditable, never Messenger's box.
  • Cases, each judged from Chatpane.log and page diagnostics with PASS/FAIL:
  • wake: short sleeps don't reload; after a long sleep, no reload while a draft exists, reload once it is sent; messages and encrypted chats talk to Facebook again within a bound.
  • network: a silent death, every connection dropped, short and long offline; at most one reload, back within a bound.
  • worker: Messenger's "Couldn't load chats" screen is recovered without a restart.
  • notifications: one sound per message; Do Not Disturb and Messenger's sound setting respected.
  • Never uses a real chat someone else sees; puts every setting back.
  • A skill (.claude/skills/chatpane-live-check/) says when to run it: before shipping any change to recovery, reloading, connections, notifications or sounds, and when a user reports stuck "Sending", missing notifications or a blank screen.
  • Turn the manual validations in docs/sync-recovery.md into cases where they can be scripted; keep the rest listed as manual.

Chatpane's recovery rules still apply: no backoff on reconnect loops, and a restart must never be needed.

Ref docs/sync-recovery.md

Discussion


Log in to post a comment.