Cover reconstruct_descriptor paths that had no test - #924
Conversation
|
Warning Review limit reached
Next review available in: 10 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Adds three unit tests for
reconstruct_descriptor, covering paths that were previously exercised only through a full session or not at all.A correction is owed here. An audit comment I posted on #790 stated this function had no test. That was wrong: two tests already existed, covering an invalid network string and a missing contribution. The grep behind that claim searched for lines containing both the function name and the word "test", and a test function's own name line contains neither the attribute nor the word, so it returned nothing. The function was never untested, and the item as written should not be closed on the basis I originally gave.
What was genuinely uncovered, and is covered here:
The two pre-existing tests are left alone. Two further tests I initially wrote were dropped before pushing because they duplicated those.
Test plan
cargo test -p keep-frost-net --lib reconstructpasses: 5 tests, the 2 existing and the 3 added.cargo fmt --checkclean.The new tests use placeholder extended keys in the same style as the surrounding tests. That is deliberate for the two error-path cases, which need a value that is well-formed enough to pass validation and not decodable. Note this means the conversion-failure test would still pass if conversion began rejecting for a different reason, so it pins the error path rather than the specific cause.
Part of #790.