{
  "findings": [
    {
      "title": "Join an error-path listener termination during shutdown",
      "body": "When a live listener emits `error`, `died()` clears the shared `listener` reference before its detached `terminateChild()` finishes. If the child ignores the initial kill and `session_shutdown` runs before `close`, `stopResources()` sees no child and the shutdown promise can resolve while the grace/force timer and listener process are still live, violating the bounded shutdown/reap and timer-cleanliness contract. Keep the in-progress listener termination in a shared promise (or retain shared ownership of the child), and make `stopResources()` await that same promise; add a deterministic `error` -> ignored SIGTERM -> concurrent shutdown sequence.",
      "priority": 1,
      "confidence": 0.99,
      "file_path": "adapter/strings/omp-spt.mjs",
      "line_start": 723,
      "line_end": 731
    },
    {
      "title": "Account accepted custody in bytes rather than UTF-16 characters",
      "body": "`acceptedBytesLimit` is enforced with `event.envelope.length`, which counts UTF-16 code units, not the UTF-8 bytes received from the subprocess. A queue of envelopes containing non-ASCII text can therefore exceed the configured byte budget while still being accepted (for example, each emoji consumes four UTF-8 bytes but only two code units), violating the accepted-byte bound. Compute `Buffer.byteLength(event.envelope, \"utf8\")`, store/subtract that byte count, and extend the byte-overflow test with a multibyte frame.",
      "priority": 2,
      "confidence": 1,
      "file_path": "adapter/strings/omp-spt.mjs",
      "line_start": 780,
      "line_end": 789
    }
  ],
  "overall_correctness": "incorrect",
  "explanation": "FAIL. The hardening still has a reproducible listener error/shutdown race that can return from teardown before the child and its termination timer are gone, and the custody limit counts UTF-16 characters despite being specified as bytes. The existing deterministic tests do not exercise either failure mode.",
  "confidence": 0.99
}