Add residential proxy data to Anonymizer#434
Conversation
|
Warning Review limit reached
Next review available in: 40 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: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Code Review
This pull request introduces support for the new Residential proxy data property within the Anonymizer response, updating the corresponding unit tests, test data, and release notes. The reviewer feedback highlights a critical missing change: the .csproj file must be updated to reference MaxMind.GeoIP2 version 6.1.0 or greater to prevent compilation and CI failures. Additionally, the reviewer suggests improving the unit tests by explicitly asserting that the Residential property is not null before verifying its nested properties.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| residential proxy data for the network: `Confidence`, `NetworkLastSeen` | ||
| (`DateOnly` on .NET 6.0+), and `ProviderName`. `Anonymizer.Residential` may be | ||
| populated even when none of the other `Anonymizer` properties are set. This | ||
| requires `MaxMind.GeoIP2` 6.1.0 or greater. |
There was a problem hiding this comment.
Please ensure that the MaxMind.GeoIP2 package reference is updated to 6.1.0 in the project's .csproj file(s) as part of this pull request. Currently, the .csproj changes are missing from this PR, which will cause compilation/CI failures since the Residential property is not available in older versions of the dependency.
There was a problem hiding this comment.
Claude, on behalf of Greg: The version bump is intentionally deferred: MaxMind.GeoIP2 6.1.0 is not yet published, so bumping now would break restore for everyone. The red CI here is expected until that release ships; the bump is called out in the release notes and tracked on the release ticket. The tests were verified against a locally packed 6.1.0 build of the GeoIP2 PR.
| Assert.Equal(82, anonymizer.Residential?.Confidence); | ||
| #if NET6_0_OR_GREATER | ||
| Assert.Equal("2026-05-11", anonymizer.Residential?.NetworkLastSeen?.ToString("yyyy-MM-dd")); | ||
| #endif | ||
| Assert.Equal("quickshift", anonymizer.Residential?.ProviderName); |
There was a problem hiding this comment.
It is safer and more idiomatic to explicitly assert that anonymizer.Residential is not null before asserting its properties. This avoids potential null reference issues and provides clearer test failure messages.
Assert.NotNull(anonymizer.Residential);
Assert.Equal(82, anonymizer.Residential.Confidence);
#if NET6_0_OR_GREATER
Assert.Equal("2026-05-11", anonymizer.Residential.NetworkLastSeen?.ToString("yyyy-MM-dd"));
#endif
Assert.Equal("quickshift", anonymizer.Residential.ProviderName);There was a problem hiding this comment.
Claude, on behalf of Greg: Done in the current revision — since Anonymizer.Residential is non-nullable with an empty-object default in GeoIP2 6.1.0, the conditional access was replaced with direct property access (matching the GeoIP2-dotnet tests); an explicit Assert.NotNull would be redundant.
| Assert.Equal(82, anonymizer.Residential?.Confidence); | ||
| #if NET6_0_OR_GREATER | ||
| Assert.Equal("2026-05-11", anonymizer.Residential?.NetworkLastSeen?.ToString("yyyy-MM-dd")); | ||
| #endif | ||
| Assert.Equal("quickshift", anonymizer.Residential?.ProviderName); |
There was a problem hiding this comment.
It is safer and more idiomatic to explicitly assert that anonymizer.Residential is not null before asserting its properties. This avoids potential null reference issues and provides clearer test failure messages.
Assert.NotNull(anonymizer.Residential);
Assert.Equal(82, anonymizer.Residential.Confidence);
#if NET6_0_OR_GREATER
Assert.Equal("2026-05-11", anonymizer.Residential.NetworkLastSeen?.ToString("yyyy-MM-dd"));
#endif
Assert.Equal("quickshift", anonymizer.Residential.ProviderName);There was a problem hiding this comment.
Claude, on behalf of Greg: Done in the current revision — since Anonymizer.Residential is non-nullable with an empty-object default in GeoIP2 6.1.0, the conditional access was replaced with direct property access (matching the GeoIP2-dotnet tests); an explicit Assert.NotNull would be redundant.
| Assert.Equal(82, response.IPAddress.Anonymizer.Residential?.Confidence); | ||
| #if NET6_0_OR_GREATER | ||
| Assert.Equal(new DateOnly(2026, 5, 11), response.IPAddress.Anonymizer.Residential?.NetworkLastSeen); | ||
| #endif | ||
| Assert.Equal("quickshift", response.IPAddress.Anonymizer.Residential?.ProviderName); |
There was a problem hiding this comment.
It is safer and more idiomatic to explicitly assert that response.IPAddress.Anonymizer.Residential is not null before asserting its properties. This avoids potential null reference issues and provides clearer test failure messages.
Assert.NotNull(response.IPAddress.Anonymizer.Residential);
Assert.Equal(82, response.IPAddress.Anonymizer.Residential.Confidence);
#if NET6_0_OR_GREATER
Assert.Equal(new DateOnly(2026, 5, 11), response.IPAddress.Anonymizer.Residential.NetworkLastSeen);
#endif
Assert.Equal("quickshift", response.IPAddress.Anonymizer.Residential.ProviderName);There was a problem hiding this comment.
Claude, on behalf of Greg: Done in the current revision — since Anonymizer.Residential is non-nullable with an empty-object default in GeoIP2 6.1.0, the conditional access was replaced with direct property access (matching the GeoIP2-dotnet tests); an explicit Assert.NotNull would be redundant.
8a8c10e to
331450d
Compare
Surface the new Residential sub-object on the anonymizer object in the Insights and Factors response models. This is inherited directly from MaxMind.GeoIP2.Model.Anonymizer via MaxMind.MinFraud.Response.IPAddress, which extends MaxMind.GeoIP2.Responses.InsightsResponse, so no new model code is needed here. Test data and tests are updated to cover the new residential field, including the case where the anonymizer object contains only the residential sub-object. The Residential property relies on MaxMind.GeoIP2.Model.AnonymizerFeed, which is only available starting in MaxMind.GeoIP2 6.1.0, so the minimum dependency version in MaxMind.MinFraud.csproj is bumped to 6.1.0. STF-997 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Run `mise up` to refresh pinned tool versions (dotnet, precious, hugo, lychee, node, prettier). lychee 0.24 replaced the boolean `include_fragments` config key with a string enum (`none`/`anchor-only`/`text-only`/`full`); migrate lychee.toml to `full` to check both anchor fragments (`#section`) and the newly added text fragments (`#:~:text=example`). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
331450d to
c74aa0d
Compare
Summary
Surfaces the new
residentialsub-object of theanonymizerobject in the minFraud Insights and Factorsip_addressresponse. The models reuse the GeoIP2 library's Anonymizer record, so this is a fixtures/tests/changelog change; the field flows through via the dependency.Depends on maxmind/GeoIP2-dotnet#494. At release time the
MaxMind.GeoIP2PackageReference must be bumped to 6.1.0 once published.Testing
With GeoIP2 packed from that PR (local NuGet source, not committed): dotnet build clean on all five target frameworks; 181/181 tests pass on net8.0/net9.0/net10.0.
🤖 Generated with Claude Code