Repository navigation
test(live): an idle frame that advances its sequence fails closed - #54
Merged
Merged
Conversation
The transport refuses an idle live reply (no frame) whose sequence moved past the acknowledged one, but only the non-contiguous frame case was tested. Add the idle case to the fake socket and pin that the transport closes without delivering effects.
Tiny Sweeper reviewReviewed head: Verdict: Ready for maintainer review · Priority: none Diagnostics and supporting detailsFull summaryPull request purpose (title): test(live): an idle frame that advances its sequence fails closed. Tiny Sweeper completed its review; deterministic results follow. Review snapshot
Completeness: Complete Features
Tests
FindingsNo active actionable findings. Before mergeNone. Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Comment |
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.
Summary
The live transport loop refuses an idle reply from the host's input callback (
frame: None) whosesequenceis not the acknowledged one, failing with "idle live frame advanced its sequence" and closing the transport. Without that check an idle reply could move the host's sequence one past what the module acknowledged, so the next real frame would be judged against the wrong ack. The non-contiguous frame case was tested; the idle case was not. This adds that test only.Related issue
None.
API or behavior changes
None (tests only).
Validation
rustfmt --edition 2024 --checkon the touched filecargo clippy --all-targets --all-features -- -D warnings: left to CIcargo build --all-targets --all-features: left to CIcargo test --all-features: only the new test ran locally (below); CI runs the suiteCARGO_INCREMENTAL=0 cargo test --manifest-path crates/tinyvoice-module/Cargo.toml --all-features --lib an_idle_frame_that_advances_its_sequence_fails_closedok. 1 passed; 0 failed.FAILED. 0 passed; 1 failed("fixture deadline": the transport kept polling and never closed).Tests
service/live/transport_tests.rs: the fake socket gainsinvalid_idle_sequence(an idle reply withsequence = ack + 1), andan_idle_frame_that_advances_its_sequence_fails_closedasserts the transport closes within 1 s and delivers no effects, mirroringnoncontiguous_socket_input_fails_closed_without_applying_effects.Documentation
Not needed (tests only).
Checklist
#[allow(...)],#[ignore], or relaxed lints.envcontents in the diff or the description