Cotal TypeScript packages
    Preparing search index...

    Function verifyIdentityPin

    • THE open-verify step every teardown runs BEFORE signalling (#969). Read the pidfile's bare pid, then the sibling pin, and adjudicate the pairing:

      • no-pid -> no pid is recorded, so there is no process to verify or signal
      • legacy -> the caller warns and signals for upgrade compatibility
      • match -> safe to signal; the process behind the pid is the recorded one
      • gone -> ESRCH-proven dead; the caller may clear the record
      • mismatch -> PID REUSE: the pid now fronts a DIFFERENT start; NEVER signal
      • torn-pin/torn-pairing/unreadable-pin/unpinned -> cannot establish identity on a live pid; refuse, preserve

      The pidfile argument is the SIBLING'S base path (the pidfile itself), and the bare pid is read from it here so the pairing check cannot drift from however the caller read the pid.

      Parameters

      Returns PinVerdict