Files
hermes-agent/scripts/whatsapp-bridge
unsupportedpastels 029574fa01 fix(whatsapp): fold the session check into main's multiplex connect path
Follow-up to the cherry-picked session handshake, rebased onto the
multiplex bridge ownership that landed in #132518:

- connect(): the foreign-session fatal sits ahead of main's
  secondary-aware pidfile/port reaping, so neither path signals a bridge
  that serves another profile's session.
- Drop the separate "no session -> restart" branch. A bridge without the
  field runs an older bridge.js, so its scriptHash already marks it
  stale and it restarts through the existing path.
- Inline sessionIdentity() as path.resolve() in /health and drop its
  node test, which only exercised path.resolve and no CI lane runs.
- Collapse the four adapter cells into one parametrized invariant (own
  session adopted; another session never adopted or killed, connected or
  disconnected). The read-receipt test now reports its own session, so
  it still restarts for the read-receipt reason rather than a missing
  field.
- Docs: fold the separate-gateway guidance into the existing "Multiple
  profiles" section instead of a second multi-profile section.

Co-authored-by: Victor Kyriazakos <victor@rocketfueldev.com>
2026-10-03 23:43:03 -04:00
..