Repository navigation
Conversation
…nd test - Audio encryption: the ChaCha20-Poly1305 nonce was the 16-bit RTP seq, which wraps after 65,536 packets (8 min 43 s) under the same session key. Use a 64-bit counter from a random start instead. The fake HomePod now records every nonce and the end-to-end test asserts they are distinct and wider than 16 bits. - Linux capture: request 10 ms fragments. With the server default, pipewire-pulse delivered ~136 ms chunks, more than the 100 ms Cushion can hold, so the queue ran dry ~6 times a second (58 dropouts per 10 s on Debian/PipeWire 1.6). pulse_monitor_capture now asserts chunks stay under 50 ms; it fails without the fix (171 ms) and passes with it. - end_to_end_against_fake_homepod (red on main in CI): start the 2.5 s stop timer when streaming begins, not before pairing, which is slow in debug builds and left no time for the first keep-alive. CPU-heavy tests now share a lock that the real-time end-to-end test takes alone, so they no longer starve it into gaps in the tone. - Comments on the values that look like secrets but are public: the RFC 5054 prime, the transient PIN, HKDF labels, shk, test vectors. - README: streaming from Linux to a real HomePod is now tested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Merged into main locally instead (952f48e). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found while testing podbeam on Debian 14 with PipeWire 1.6 against a real HomePod.
Fixes
seq. It wraps after 65,536 packets (8 min 43 s) while the session key stays the same, so every session over 9 minutes reused nonces. Now a 64-bit counter from a random start. The fake HomePod records every nonce; the end-to-end test asserts they are distinct and wider than 16 bits (fails with the old code: "audio nonce is only 16 bits").Cushionmaximum, so the queue ran dry ~6×/s (58–59 dropouts per 10 s, real hardware sink, no network loss). Now 10 ms fragments: 1 dropout at start-up, buffer settles at 15–20 ms.pulse_monitor_capturenow asserts chunks < 50 ms (fails without the fix: 171 ms).end_to_end_against_fake_homepodstarted its 2.5 s stop timer before pairing, which is slow in debug builds, so the first keep-alive never went out ("no keep-alive"). The timer now starts when streaming begins. CPU-heavy tests share anRwLockthe end-to-end test takes exclusively, so they no longer starve it into gaps (seen as 995/1008 Hz tone failures). 8/8 debug runs green locally, 4/4 on 2 cores.Also
shk, test vectors), for reviewers.Tested
cargo fmt --check,cargo clippy --locked --all-targets -- -D warnings,cargo test(debug and release), both ignored Pulse tests against PipeWire.🤖 Generated with Claude Code