Skip to content

Add residential sub-object to anonymizer for Insights#440

Open
oschwald wants to merge 1 commit into
mainfrom
greg/stf-997-add-residential-to-anonymizer
Open

Add residential sub-object to anonymizer for Insights#440
oschwald wants to merge 1 commit into
mainfrom
greg/stf-997-add-residential-to-anonymizer

Conversation

@oschwald

@oschwald oschwald commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary

The GeoIP Insights web service is adding a residential sub-object to the anonymizer object, sourced from the full-feed GeoIP Residential Proxy database. Because that feed is a superset of the residential proxies in GeoIP Anonymous Plus, the anonymizer object may now contain only the residential key.

  • New reusable record for the feed shape (confidence, network_last_seen, provider_name) named AnonymizerFeed, so future sibling feeds (VPN, mobile, datacenter) can share it
  • New residential property on the Anonymizer record
  • Tests, fixtures, and changelog updated

Testing

pytest (79 passed), ruff check, ruff format --check, and mypy all pass.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added residential proxy information to anonymizer records.
    • Exposes confidence, last-seen date, and provider name for residential proxy data.
    • Supports responses containing only residential anonymizer information.
  • Documentation

    • Updated the changelog and anonymizer documentation to describe residential proxy data.

The residential proxy feed is a superset of what is in the Anonymous
Plus database, so the web service now nests a `residential` object
inside `anonymizer` sourced from the full-feed GeoIP Residential Proxy
database. Add a reusable geoip2.records.AnonymizerFeed record (
confidence, network_last_seen, provider_name) so future sibling feeds
(vpn, mobile, datacenter) can reuse the same shape, and expose it as
Anonymizer.residential. Since the residential data can arrive without
any of the existing Anonymous Plus fields, anonymizer may now contain
only the residential attribute.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 34994bc0-1955-4888-9288-d4df2f6cd896

📥 Commits

Reviewing files that changed from the base of the PR and between 911d4d2 and d9852f9.

📒 Files selected for processing (3)
  • HISTORY.rst
  • src/geoip2/records.py
  • tests/models_test.py

📝 Walkthrough

Walkthrough

Adds a typed AnonymizerFeed for Residential Proxy data, wires it into Anonymizer, parses network_last_seen as a date, and adds tests for full, minimal, and residential-only Insights data.

Changes

Residential anonymizer feed

Layer / File(s) Summary
Residential feed model and wiring
src/geoip2/records.py
Adds AnonymizerFeed, exposes Anonymizer.residential, accepts optional residential data, and parses network_last_seen.
Residential feed validation and documentation
tests/models_test.py, HISTORY.rst
Tests populated, missing, and residential-only feed data and documents the new attribute.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Poem

A rabbit found a feed so neat,
With dates and names and confidence sweet.
The anonymizer learned its part,
Tests confirmed each nested chart.
Hop, hop—the changelog’s complete!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding a residential sub-object to anonymizer in Insights.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch greg/stf-997-add-residential-to-anonymizer

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for the GeoIP Residential Proxy database by introducing the AnonymizerFeed class and a new residential attribute to the Anonymizer record. The changes include updating the Anonymizer initialization to parse residential proxy data, updating the history log, and adding unit tests to verify the parsing and default behaviors of the new attribute. I have no feedback to provide.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant