Add bounded CDP heartbeat and sanitized disconnect diagnostics

Merged
MI
2mo ago
+423-14

Adds configurable single-flight CDP heartbeat with bounded waits and lifecycle cleanup. Sanitized CDP_DROP diagnostics retain transport failure context without logging raw payloads or credentials.

Automatic reconnect is excluded. Error followed by close records the first failure once; heartbeat timers are unrefed and cleared during shutdown.

Nested transport causes are retained in a bounded, sanitized CDP_DROP diagnostic, without changing terminal behavior.

Validation: 49 CDP tests, 44 SDK AST guards and SDK typecheck/format checks; CDP lifecycle/heartbeat/drop-diagnostic unit tests.

Stack base: evals/consolidation-03-capture-recovery. Review this PR relative to its immediate predecessor.

Reviewer entry points:

Current open stack: #2893 → #2894 → #2902 → #2903 → #2889 → #2904 → #2905 → #2906 → #2907.