Skip to content

fix: Preserve Rust 1.78 dependency compatibility - #277

Merged
marandaneto merged 4 commits into
mainfrom
docs/refresh-agent-instructions-20261002-133550
Oct 6, 2026
Merged

marandaneto merged 4 commits into
mainfrom
docs/refresh-agent-instructions-20261002-133550

Conversation

@marandaneto

@marandaneto marandaneto commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

💡 Motivation and Context

Keep the SDK's declared Rust 1.78 minimum and verify it in CI. The previous lockfile selected dependencies that require newer Rust, so it could not build the SDK library on Rust 1.78.

  • Resolve a Rust 1.78-compatible lockfile without restricting the Reqwest or UUID version ranges. The checked-in graph uses Reqwest 0.13.3 and UUID 1.20.0.
  • Allow SHA-1 versions from 0.10.7 through 0.11.x. SHA-1 0.11 requires newer Rust, while 0.10.7 supports the minimum compiler. Neither version is exposed through the SDK's public API.
  • Add locked Rust 1.78 library checks for async capture-v1 and blocking error-tracking plus capture-v1.
  • Allow the deprecation warning only on the AtomicUsize::fetch_update statement. Its replacement is unavailable on Rust 1.78, so the call and its behavior remain unchanged.
  • Document the difference between the SDK minimum compiler, development tooling, and newer dependency versions.
  • Preserve the agent instruction cleanup and the published-spec exemption for external API reviews.

The Rust minimum remains 1.78.0. The earlier compiler bump and its changeset have been removed.

The locked Reqwest 0.13.3 does not include the redirect and proxy credential fixes released in 0.13.4 and 0.13.5. The published dependency range still permits newer 0.13 releases for customers on newer Rust. This keeps the minimum-compatible graph available without imposing an upper version cap below those fixes.

💚 How did you test it?

  • Before the dependency changes, Rust 1.78 could not parse the selected cpufeatures package because it uses edition 2024.
  • Both new locked library checks passed on Rust 1.78.0 locally and on hosted Ubuntu CI.
  • The compatible graph passed 276 async and 273 blocking library tests on the current development toolchain. Development dependencies still require newer Rust than the SDK library.
  • An isolated copy resolved newer dependencies, including Reqwest 0.13.5, SHA-1 0.11.0, and UUID 1.27.0. Both async and blocking library checks passed there on newer Rust.
  • Rust 1.99 Clippy reproduced the deprecated fetch_update failure before the fix and passed afterward with warnings denied. Both Rust 1.78 checks and all 549 library tests passed again. Clippy and both MSRV jobs also passed on hosted Ubuntu for the current commit.
  • Formatting, actionlint, whitespace, Markdown links, and changed-file scope checks passed.
  • Deslop required no cleanup. Isolated autoreview reported no actionable findings for commit d6c53b6358727a92380d7e028f7405e42a7342d5 against origin/main.

No runtime test source, fixtures, harnesses, or test discovery configuration changed. CI adds compiler checks. The only SDK source change is a statement-scoped deprecation allowance with its MSRV rationale. Runtime behavior and the public API snapshot are unchanged.

📝 Checklist

  • I reviewed the submitted changes.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

Existing runtime tests and new MSRV compilation checks cover this change. No changeset is included, as requested.

If releasing new changes

  • Ran sampo add to generate a changeset file

The earlier changeset was removed. This PR does not raise the compiler minimum.

Agent context

Autonomy: Human-driven (agent-assisted)

Tools: Pi, Git, GitHub CLI, Cargo, rustup, actionlint, TruffleHog, and isolated Pi autoreview. The human driver requested retaining Rust 1.78 support and allowing customers to resolve newer dependency versions. Compatibility was checked with actual compiler builds because dependency metadata alone missed async-compression's newer Rust syntax. Human review is still required. No public session link is available.

@marandaneto marandaneto self-assigned this Oct 5, 2026
@greptile-apps

greptile-apps Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Retrigger

[High risk] Downgrades dependencies to support older Rust compiler.

The PR should not merge until credentialed requests are protected against HTTPS-to-HTTP redirects with the locked Reqwest version.

Reviews (2) · Last reviewed commit: "fix: Keep the locked dependency graph co..."

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

posthog-rs-v1 Compliance Report

Date: 2026-10-05 09:45:18 UTC
Duration: 22783ms

✅ 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 ✅ 113ms
Endpoint And Method.Does Not Use Legacy Endpoints ✅ 112ms
Required Headers.Has Authorization Bearer Header ✅ 110ms
Required Headers.Has Content Type Json ✅ 114ms
Required Headers.Has Posthog Sdk Info Format ✅ 112ms
Required Headers.Has Posthog Attempt Header ✅ 115ms
Required Headers.Has Posthog Request Id ✅ 111ms
Required Headers.Has Posthog Request Timestamp ✅ 110ms
Required Headers.Has User Agent ✅ 110ms
Body Format.Body Has Created At And Batch ✅ 110ms
Body Format.No Api Key In Body ✅ 119ms
Body Format.No Sent At In Body ✅ 120ms
Event Format.Event Has Required Root Fields ✅ 120ms
Event Format.Event Uuid Is Valid ✅ 120ms
Event Format.Event Timestamp Is Rfc3339 ✅ 120ms
Event Format.Distinct Id Is String ✅ 118ms
Event Format.Distinct Id At Root Not Properties ✅ 119ms
Event Format.Custom Properties Preserved ✅ 121ms
Event Format.Set Properties Preserved ✅ 117ms
Event Format.Set Once Properties Preserved ✅ 115ms
Event Format.Groups Properties Preserved ✅ 103ms
Event Format.Sdk Generates Uuid If Not Provided ✅ 105ms
Event Format.Event Has Required Root Fields Batch ✅ 129ms
Event Format.Event Uuid Is Valid Batch ✅ 129ms
Event Format.Event Timestamp Is Rfc3339 Batch ✅ 141ms
Event Format.Distinct Id Is String Batch ✅ 141ms
Event Format.Distinct Id At Root Not Properties Batch ✅ 141ms
Event Format.Custom Properties Preserved Batch ✅ 141ms
Event Format.Set Properties Preserved Batch ✅ 141ms
Event Format.Set Once Properties Preserved Batch ✅ 139ms
Event Format.Groups Properties Preserved Batch ✅ 121ms
Event Format.Sdk Generates Uuid If Not Provided Batch ✅ 124ms
Batch Behavior.Multiple Events In Single Batch ✅ 129ms
Batch Behavior.Batch Envelope Smoke ✅ 134ms
Batch Behavior.Flush With No Events Sends Nothing ✅ 82ms
Batch Behavior.Flush At Triggers Batch ✅ 1113ms
Batch Behavior.Created At Reflects Batch Creation Time ✅ 89ms
Deduplication.Generates Unique Uuids ✅ 135ms
Deduplication.Different Events Same Content Different Uuids ✅ 105ms
Deduplication.Preserves Uuid On Retry ✅ 5094ms
Deduplication.Preserves Timestamp On Retry ✅ 5065ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5065ms
Deduplication.No Duplicate Events In Batch ✅ 98ms
Header Behavior On Retry.Attempt Header Starts At One ✅ 69ms
Header Behavior On Retry.Attempt Header Increments On Retry ✅ 10070ms
Header Behavior On Retry.Request Id Preserved On Retry ✅ 5047ms
Header Behavior On Retry.Different Requests Have Different Request Ids ✅ 2054ms
Header Behavior On Retry.Request Timestamp Changes On Retry ✅ 5052ms
Response Format Validation.Success Response Has Uuid Keyed Results ✅ 37ms
Response Format Validation.Success Response Has Ok For Each Event ✅ 28ms
Response Format Validation.Success No Retry After When All Ok ✅ 23ms
Response Format Validation.Success Retry After Present When Retry Events ✅ 25ms
Response Format Validation.Success No Retry After When Drop Only ✅ 25ms
Response Format Validation.Response Echoes Request Id ✅ 22ms
Retry Behavior.Retries On 408 ✅ 5029ms
Retry Behavior.Retries On 500 ✅ 5021ms
Retry Behavior.Retries On 503 ✅ 5022ms
Retry Behavior.Retries On 504 ✅ 5021ms
Retry Behavior.Retryable Errors Have Retry After ✅ 2022ms
Retry Behavior.Respects Retry After On Retryable Error ✅ 8035ms
Retry Behavior.Does Not Retry On 400 ✅ 2036ms
Retry Behavior.Does Not Retry On 401 ✅ 2024ms
Retry Behavior.Does Not Retry On 402 ✅ 2020ms
Retry Behavior.Does Not Retry On 413 ✅ 2021ms
Retry Behavior.Does Not Retry On 415 ✅ 2021ms
Retry Behavior.Non Retryable Errors Have No Retry After ✅ 2023ms
Retry Behavior.Implements Backoff ✅ 15029ms
Retry Behavior.Max Retries Respected ✅ 15026ms
Partial Batch Handling.Handles 200 Full Success ✅ 2030ms
Partial Batch Handling.Handles 200 With All Ok ✅ 3037ms
Partial Batch Handling.Does Not Retry Dropped Events ✅ 3031ms
Partial Batch Handling.Does Not Retry Limited Events ✅ 3024ms
Partial Batch Handling.Prunes Ok Events On Partial Retry ✅ 5022ms
Partial Batch Handling.Prunes Dropped Events On Partial Retry ✅ 5022ms
Partial Batch Handling.Retries Only Retry Events From Partial ✅ 5022ms
Partial Batch Handling.Partial Retry Preserves Uuids ✅ 5022ms
Partial Batch Handling.Partial Retry Attempt Header Increments ✅ 5024ms
Partial Batch Handling.Partial Retry Request Id Preserved ✅ 5026ms
Partial Batch Handling.Respects Retry After On Partial ✅ 5020ms
Partial Batch Handling.Unknown Result Treated As Terminal ✅ 3020ms
Partial Batch Handling.Mixed Ok Drop Limited No Retry ✅ 3030ms
Compression.Sends Gzip Content Encoding ✅ 31ms
Compression.No Content Encoding When Disabled ✅ 19ms
Compression.Compressed Body Is Decompressible ✅ 18ms
Error Handling.Does Not Retry On Unknown 4Xx ✅ 2020ms
Event Options.Cookieless Mode Override ✅ 20ms
Event Options.Disable Skew Correction Override ✅ 19ms
Event Options.Process Person Profile Override ✅ 19ms
Event Options.Product Tour Id Override ✅ 19ms
Event Options.Unset Options Omitted ✅ 18ms
Event Options.Options Override In Batch ✅ 19ms
Geoip And Historical Migration.Geoip Disable Injected Into Properties ✅ 18ms
Geoip And Historical Migration.Historical Migration Set In Body ✅ 19ms
Geoip And Historical Migration.Historical Migration Absent By Default ✅ 19ms

Feature_Flags Tests

✅ 17/17 tests passed

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

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

posthog-rs-v0 Compliance Report

Date: 2026-10-05 09:45:38 UTC
Duration: 15528ms

✅ All Tests Passed!

46/46 tests passed


Capture Tests

✅ 29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields ✅ 140ms
Format Validation.Event Has Uuid ✅ 150ms
Format Validation.Event Has Lib Properties ✅ 152ms
Format Validation.Distinct Id Is String ✅ 152ms
Format Validation.Token Is Present ✅ 152ms
Format Validation.Custom Properties Preserved ✅ 150ms
Format Validation.Event Has Timestamp ✅ 146ms
Retry Behavior.Retries On 503 ✅ 5156ms
Retry Behavior.Does Not Retry On 400 ✅ 2152ms
Retry Behavior.Does Not Retry On 401 ✅ 2152ms
Retry Behavior.Respects Retry After Header ✅ 5117ms
Retry Behavior.Implements Backoff ✅ 15113ms
Retry Behavior.Retries On 500 ✅ 5105ms
Retry Behavior.Retries On 502 ✅ 5108ms
Retry Behavior.Retries On 504 ✅ 5109ms
Retry Behavior.Max Retries Respected ✅ 15109ms
Deduplication.Generates Unique Uuids ✅ 112ms
Deduplication.Preserves Uuid On Retry ✅ 5026ms
Deduplication.Preserves Uuid And Timestamp On Retry ✅ 10045ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry ✅ 5037ms
Deduplication.No Duplicate Events In Batch ✅ 27ms
Deduplication.Different Events Have Different Uuids ✅ 26ms
Compression.Sends Gzip When Enabled ✅ 25ms
Batch Format.Uses Proper Batch Structure ✅ 28ms
Batch Format.Flush With No Events Sends Nothing ✅ 37ms
Batch Format.Multiple Events Batched Together ✅ 105ms
Error Handling.Does Not Retry On 403 ✅ 2094ms
Error Handling.Does Not Retry On 413 ✅ 2077ms
Error Handling.Retries On 408 ✅ 5092ms

Feature_Flags Tests

✅ 17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id ✅ 61ms
Request Payload.Flags Request Uses V2 Query Param ✅ 64ms
Request Payload.Flags Request Hits Flags Path Not Decide ✅ 23ms
Request Payload.Flags Request Omits Authorization Header ✅ 60ms
Request Payload.Token In Flags Body Matches Init ✅ 42ms
Request Payload.Groups Round Trip ✅ 56ms
Request Payload.Groups Default To Empty Object ✅ 34ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False ✅ 43ms
Request Payload.Disable Geoip Omitted Defaults To False ✅ 40ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key ✅ 40ms
Request Lifecycle.No Flags Request On Init Alone ✅ 25ms
Request Lifecycle.No Flags Request On Normal Capture ✅ 64ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests ✅ 54ms
Request Lifecycle.Mock Response Value Is Returned To Caller ✅ 49ms
Retry Behavior.Retries Flags On 502 ✅ 238ms
Retry Behavior.Retries Flags On 504 ✅ 249ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event ✅ 47ms

@marandaneto marandaneto changed the title build: Correct minimum Rust version and refresh agent guidance fix: Preserve Rust 1.78 dependency compatibility Oct 5, 2026
@marandaneto
marandaneto marked this pull request as ready for review October 5, 2026 09:36
@marandaneto
marandaneto requested a review from a team as a code owner October 5, 2026 09:36
Comment thread Cargo.lock
@marandaneto
marandaneto merged commit 26b75f2 into main Oct 6, 2026
28 checks passed
@marandaneto
marandaneto deleted the docs/refresh-agent-instructions-20261002-133550 branch October 6, 2026 05:19
eli-r-ph pushed a commit that referenced this pull request Oct 12, 2026
* build: Correct minimum Rust version and refresh agent guidance

* docs: Remove Rust minimum-version changes from instruction cleanup

* fix: Keep the locked dependency graph compatible with Rust 1.78

* fix: Preserve MSRV when allowing atomic method deprecation

(cherry picked from commit 26b75f2)
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