Skip to content

feat: freeze/thaw Kalman state on reconnect#16

Merged
chrisuthe merged 1 commit intofeat/protocol-compliancefrom
task/freeze-thaw-kalman-on-reconnect
Mar 4, 2026
Merged

feat: freeze/thaw Kalman state on reconnect#16
chrisuthe merged 1 commit intofeat/protocol-compliancefrom
task/freeze-thaw-kalman-on-reconnect

Conversation

@chrisuthe
Copy link
Owner

Summary

  • On WebSocket disconnect, snapshot converged Kalman filter state (offset, drift, covariance)
  • On reconnect, restore with 10x inflated covariance for fast adaptation
  • Converges in 1-2 measurements instead of 5+ from scratch
  • Matches Android client's freeze/thaw pattern
  • Full disconnect discards frozen state (clean Reset)

Stacked on #15 (feat/protocol-compliance)

Test plan

  • Disconnect/reconnect WiFi — audio should resume faster than before
  • Verify logs show "State frozen" on disconnect and "State thawed" on reconnect
  • Fresh connection should still show "Clock synchronizer reset" (no frozen state)
  • Full disconnect + reconnect should reset from scratch (frozen state discarded)

🤖 Generated with Claude Code

On WebSocket disconnect, snapshot the converged Kalman filter state
(offset, drift, covariance). On reconnect, restore it with 10x inflated
covariance so the filter adapts quickly while preserving learned estimates.
Converges in 1-2 measurements instead of 5+ from scratch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chrisuthe chrisuthe merged commit 69a7fc9 into feat/protocol-compliance Mar 4, 2026
chrisuthe added a commit that referenced this pull request Mar 6, 2026
…nnect

feat: freeze/thaw Kalman state on reconnect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant