Skip to content

chore: bump quinn-proto (Dependabot #1) and lint tests with clippy - #311

Merged
lucasheriques merged 3 commits into
mainfrom
lucas/quinn-proto-clippy-tests
Oct 27, 2026
Merged

lucasheriques merged 3 commits into
mainfrom
lucas/quinn-proto-clippy-tests

Conversation

@lucasheriques

@lucasheriques lucasheriques commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

Two small housekeeping fixes found while working on the Rust MCP analytics SDK:

  1. Dependabot alert #1: quinn-proto 0.11.14 -> 0.11.15 (the advisory's first patched version). One-line lockfile change. quinn-proto is reachable only through reqwest's unstable http3 path, so no shipped feature compiles it. Pinned to 0.11.15 rather than the latest 0.11.19 because 0.11.19 depends on rand 0.10, whose edition2024 manifest Cargo 1.78 cannot parse, which breaks the --locked MSRV jobs even though quinn is never compiled.
  2. Clippy on test code: CI's clippy steps omit --tests, so test code had drifted. Fixed:
    • httpmock 0.8 deprecations (the bulk of the diff, mechanical renames with identical signatures): matches -> is_true, assert_hits[_async] -> assert_calls[_async], hits -> calls.
    • tests/test_on_error.rs used the deprecated personal_api_key; now secret_key.
    • tests/common/mod.rs: type alias for the complex return type; #[allow(dead_code)] on default_user_agent, matching capture_error_sink, since not every test crate uses it.
    • src/client/minimal_gate_test_support.rs: inner #![cfg(test)] duplicated the #[cfg(test)] on its mod declaration (the sibling local_payload_test_support already omits it).
    • src/error_tracking.rs test: the crate is edition 2018, so "should strip {name:?}" in an assert! was printed literally. The argument is now passed explicitly.
    • .github/workflows/ci.yaml: both clippy steps now pass --tests so this stays clean. This touches .github/, so a maintainer with workflow rights (Lucas) needs to merge.

No changeset: no published code or behaviour changes.

💚 How did you test it?

  • cargo clippy --lib --tests --features mcp,tower -- -D warnings: clean
  • cargo clippy --tests -- -D warnings and cargo clippy --tests --features mcp -- -D warnings (the new CI steps): clean
  • cargo +1.78.0 check --locked (both MSRV variants) and cargo +1.88.0 check --locked --features mcp: pass
  • cargo fmt -- --check: clean
  • cargo test --features mcp,tower: all pass
  • cargo test --no-default-features --features capture-v1: all pass
  • Cargo.lock no longer contains quinn-proto 0.11.14

📝 Checklist

  • All commits are signed (see Commit signing)
  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

Clears Dependabot alert 1 (quinn-proto 0.11.14). Lockfile-only:
quinn-proto is only reachable through reqwest's unstable http3 path, so
no shipped feature compiles it. The bump also drops rand 0.9 and
zerocopy from the lockfile in favour of rand_pcg 0.10.

Tested: cargo test --features mcp,tower (all pass).
CI's clippy steps omitted --tests, so test code had drifted:
- httpmock 0.8 deprecations: matches -> is_true, assert_hits ->
  assert_calls, hits -> calls (same signatures).
- test_on_error used the deprecated personal_api_key; now secret_key.
- tests/common: type alias for the complex return type, allow
  dead_code on default_user_agent (not every test crate uses it).
- minimal_gate_test_support had #![cfg(test)] duplicating the
  #[cfg(test)] on its mod declaration.
- error_tracking test: crate is edition 2018, so "{name:?}" in an
  assert! message was printed literally; pass the arg explicitly.
- ci.yaml: add --tests to both clippy steps.

Tested: cargo clippy --lib --tests --features mcp,tower -D warnings,
cargo clippy --tests [--features mcp] -D warnings, cargo fmt --check:
clean. cargo test --features mcp,tower and
cargo test --no-default-features --features capture-v1: all pass.
@lucasheriques
lucasheriques requested a review from a team as a code owner October 27, 2026 12:57
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

posthog-rs-v0 Compliance Report

Date: 2026-10-27 13:06:21 UTC
Duration: 15361ms

✅ All Tests Passed!

46/46 tests passed


Capture Tests

✅ 29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields ✅ 106ms
Format Validation.Event Has Uuid ✅ 107ms
Format Validation.Event Has Lib Properties ✅ 107ms
Format Validation.Distinct Id Is String ✅ 112ms
Format Validation.Token Is Present ✅ 111ms
Format Validation.Custom Properties Preserved ✅ 111ms
Format Validation.Event Has Timestamp ✅ 114ms
Retry Behavior.Retries On 503 ✅ 5115ms
Retry Behavior.Does Not Retry On 400 ✅ 2111ms
Retry Behavior.Does Not Retry On 401 ✅ 2111ms
Retry Behavior.Respects Retry After Header ✅ 5074ms
Retry Behavior.Implements Backoff ✅ 15077ms
Retry Behavior.Retries On 500 ✅ 5077ms
Retry Behavior.Retries On 502 ✅ 5068ms
Retry Behavior.Retries On 504 ✅ 5071ms
Retry Behavior.Max Retries Respected ✅ 15072ms
Deduplication.Generates Unique Uuids ✅ 73ms
Deduplication.Preserves Uuid On Retry ✅ 5020ms
Deduplication.Preserves Uuid And Timestamp On Retry ✅ 10028ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5032ms
Deduplication.No Duplicate Events In Batch ✅ 19ms
Deduplication.Different Events Have Different Uuids ✅ 18ms
Compression.Sends Gzip When Enabled ✅ 18ms
Batch Format.Uses Proper Batch Structure ✅ 31ms
Batch Format.Flush With No Events Sends Nothing ✅ 22ms
Batch Format.Multiple Events Batched Together ✅ 75ms
Error Handling.Does Not Retry On 403 ✅ 2067ms
Error Handling.Does Not Retry On 413 ✅ 2056ms
Error Handling.Retries On 408 ✅ 5054ms

Feature_Flags Tests

✅ 17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id ✅ 46ms
Request Payload.Flags Request Uses V2 Query Param ✅ 43ms
Request Payload.Flags Request Hits Flags Path Not Decide ✅ 28ms
Request Payload.Flags Request Omits Authorization Header ✅ 28ms
Request Payload.Token In Flags Body Matches Init ✅ 57ms
Request Payload.Groups Round Trip ✅ 36ms
Request Payload.Groups Default To Empty Object ✅ 33ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False ✅ 38ms
Request Payload.Disable Geoip Omitted Defaults To False ✅ 39ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key ✅ 40ms
Request Lifecycle.No Flags Request On Init Alone ✅ 14ms
Request Lifecycle.No Flags Request On Normal Capture ✅ 55ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests ✅ 66ms
Request Lifecycle.Mock Response Value Is Returned To Caller ✅ 41ms
Retry Behavior.Retries Flags On 502 ✅ 226ms
Retry Behavior.Retries Flags On 504 ✅ 225ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event ✅ 27ms

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

posthog-rs-v1 Compliance Report

Date: 2026-10-27 13:07:27 UTC
Duration: 23028ms

✅ All Tests Passed!

111/111 tests passed


Capture_V1 Tests

✅ 94/94 tests passed

View Details
Test Status Duration
Endpoint And Method.Targets V1 Endpoint ✅ 154ms
Endpoint And Method.Does Not Use Legacy Endpoints ✅ 152ms
Required Headers.Has Authorization Bearer Header ✅ 151ms
Required Headers.Has Content Type Json ✅ 152ms
Required Headers.Has Posthog Sdk Info Format ✅ 151ms
Required Headers.Has Posthog Attempt Header ✅ 151ms
Required Headers.Has Posthog Request Id ✅ 151ms
Required Headers.Has Posthog Request Timestamp ✅ 152ms
Required Headers.Has User Agent ✅ 151ms
Body Format.Body Has Created At And Batch ✅ 149ms
Body Format.No Api Key In Body ✅ 130ms
Body Format.No Sent At In Body ✅ 144ms
Event Format.Event Has Required Root Fields ✅ 143ms
Event Format.Event Uuid Is Valid ✅ 145ms
Event Format.Event Timestamp Is Rfc3339 ✅ 145ms
Event Format.Distinct Id Is String ✅ 145ms
Event Format.Distinct Id At Root Not Properties ✅ 151ms
Event Format.Custom Properties Preserved ✅ 146ms
Event Format.Set Properties Preserved ✅ 144ms
Event Format.Set Once Properties Preserved ✅ 144ms
Event Format.Groups Properties Preserved ✅ 136ms
Event Format.Sdk Generates Uuid If Not Provided ✅ 129ms
Event Format.Event Has Required Root Fields Batch ✅ 160ms
Event Format.Event Uuid Is Valid Batch ✅ 164ms
Event Format.Event Timestamp Is Rfc3339 Batch ✅ 160ms
Event Format.Distinct Id Is String Batch ✅ 175ms
Event Format.Distinct Id At Root Not Properties Batch ✅ 158ms
Event Format.Custom Properties Preserved Batch ✅ 176ms
Event Format.Set Properties Preserved Batch ✅ 164ms
Event Format.Set Once Properties Preserved Batch ✅ 171ms
Event Format.Groups Properties Preserved Batch ✅ 150ms
Event Format.Sdk Generates Uuid If Not Provided Batch ✅ 152ms
Batch Behavior.Multiple Events In Single Batch ✅ 194ms
Batch Behavior.Batch Envelope Smoke ✅ 148ms
Batch Behavior.Flush With No Events Sends Nothing ✅ 97ms
Batch Behavior.Flush At Triggers Batch ✅ 1145ms
Batch Behavior.Created At Reflects Batch Creation Time ✅ 116ms
Deduplication.Generates Unique Uuids ✅ 192ms
Deduplication.Different Events Same Content Different Uuids ✅ 135ms
Deduplication.Preserves Uuid On Retry ✅ 5142ms
Deduplication.Preserves Timestamp On Retry ✅ 5069ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5107ms
Deduplication.No Duplicate Events In Batch ✅ 123ms
Header Behavior On Retry.Attempt Header Starts At One ✅ 101ms
Header Behavior On Retry.Attempt Header Increments On Retry ✅ 10069ms
Header Behavior On Retry.Request Id Preserved On Retry ✅ 5075ms
Header Behavior On Retry.Different Requests Have Different Request Ids ✅ 2055ms
Header Behavior On Retry.Request Timestamp Changes On Retry ✅ 5064ms
Response Format Validation.Success Response Has Uuid Keyed Results ✅ 50ms
Response Format Validation.Success Response Has Ok For Each Event ✅ 49ms
Response Format Validation.Success No Retry After When All Ok ✅ 31ms
Response Format Validation.Success Retry After Present When Retry Events ✅ 35ms
Response Format Validation.Success No Retry After When Drop Only ✅ 33ms
Response Format Validation.Response Echoes Request Id ✅ 30ms
Retry Behavior.Retries On 408 ✅ 5041ms
Retry Behavior.Retries On 500 ✅ 5029ms
Retry Behavior.Retries On 503 ✅ 5025ms
Retry Behavior.Retries On 504 ✅ 5025ms
Retry Behavior.Retryable Errors Have Retry After ✅ 2033ms
Retry Behavior.Respects Retry After On Retryable Error ✅ 8032ms
Retry Behavior.Does Not Retry On 400 ✅ 2029ms
Retry Behavior.Does Not Retry On 401 ✅ 2028ms
Retry Behavior.Does Not Retry On 402 ✅ 2026ms
Retry Behavior.Does Not Retry On 413 ✅ 2028ms
Retry Behavior.Does Not Retry On 415 ✅ 2028ms
Retry Behavior.Non Retryable Errors Have No Retry After ✅ 2028ms
Retry Behavior.Implements Backoff ✅ 15032ms
Retry Behavior.Max Retries Respected ✅ 15030ms
Partial Batch Handling.Handles 200 Full Success ✅ 2033ms
Partial Batch Handling.Handles 200 With All Ok ✅ 3031ms
Partial Batch Handling.Does Not Retry Dropped Events ✅ 3026ms
Partial Batch Handling.Does Not Retry Limited Events ✅ 3035ms
Partial Batch Handling.Prunes Ok Events On Partial Retry ✅ 5036ms
Partial Batch Handling.Prunes Dropped Events On Partial Retry ✅ 5026ms
Partial Batch Handling.Retries Only Retry Events From Partial ✅ 5027ms
Partial Batch Handling.Partial Retry Preserves Uuids ✅ 5028ms
Partial Batch Handling.Partial Retry Attempt Header Increments ✅ 5027ms
Partial Batch Handling.Partial Retry Request Id Preserved ✅ 5026ms
Partial Batch Handling.Respects Retry After On Partial ✅ 5028ms
Partial Batch Handling.Unknown Result Treated As Terminal ✅ 3026ms
Partial Batch Handling.Mixed Ok Drop Limited No Retry ✅ 3026ms
Compression.Sends Gzip Content Encoding ✅ 23ms
Compression.No Content Encoding When Disabled ✅ 23ms
Compression.Compressed Body Is Decompressible ✅ 23ms
Error Handling.Does Not Retry On Unknown 4Xx ✅ 2023ms
Event Options.Cookieless Mode Override ✅ 25ms
Event Options.Disable Skew Correction Override ✅ 23ms
Event Options.Process Person Profile Override ✅ 24ms
Event Options.Product Tour Id Override ✅ 23ms
Event Options.Unset Options Omitted ✅ 25ms
Event Options.Options Override In Batch ✅ 25ms
Geoip And Historical Migration.Geoip Disable Injected Into Properties ✅ 23ms
Geoip And Historical Migration.Historical Migration Set In Body ✅ 23ms
Geoip And Historical Migration.Historical Migration Absent By Default ✅ 23ms

Feature_Flags Tests

✅ 17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id ✅ 15ms
Request Payload.Flags Request Uses V2 Query Param ✅ 18ms
Request Payload.Flags Request Hits Flags Path Not Decide ✅ 14ms
Request Payload.Flags Request Omits Authorization Header ✅ 15ms
Request Payload.Token In Flags Body Matches Init ✅ 19ms
Request Payload.Groups Round Trip ✅ 15ms
Request Payload.Groups Default To Empty Object ✅ 15ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False ✅ 20ms
Request Payload.Disable Geoip Omitted Defaults To False ✅ 15ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key ✅ 16ms
Request Lifecycle.No Flags Request On Init Alone ✅ 13ms
Request Lifecycle.No Flags Request On Normal Capture ✅ 25ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests ✅ 19ms
Request Lifecycle.Mock Response Value Is Returned To Caller ✅ 16ms
Retry Behavior.Retries Flags On 502 ✅ 222ms
Retry Behavior.Retries Flags On 504 ✅ 219ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event ✅ 24ms

0.11.19 depends on rand 0.10, whose edition2024 manifest Cargo 1.78
cannot parse, so the MSRV jobs failed with --locked even though quinn
is never compiled. 0.11.15 is the advisory's first patched version and
still uses rand 0.9, so the lockfile diff vs main is now one line.

Tested: cargo +1.78.0 check --locked --lib --features capture-v1 and
--no-default-features --features error-tracking,capture-v1;
cargo +1.88.0 check --locked --lib --features mcp; clippy --tests
(default, mcp, mcp+tower) -D warnings; cargo test --features mcp,tower:
all pass.

@marandaneto marandaneto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good; no qualifying findings. Verdict: correct.

@lucasheriques
lucasheriques merged commit 8e53b15 into main Oct 27, 2026
31 checks passed
@lucasheriques
lucasheriques deleted the lucas/quinn-proto-clippy-tests branch October 27, 2026 13:54
lucasheriques added a commit that referenced this pull request Oct 27, 2026
The crate is on edition 2018, where an assert! message with no arguments is not a format string, so these six messages printed their {placeholders} literally on failure. Found by main's new clippy --tests step after merging #311.

Tested: cargo clippy --tests (default and --features mcp,tower) clean; cargo test --features mcp,tower 507 passed, default 387 passed.
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.

2 participants