Skip to content

Rir assignment check hardening - #82

Merged
grizz merged 9 commits into
mainfrom
rir_assignment_check_hardening
Jul 14, 2026
Merged

grizz merged 9 commits into
mainfrom
rir_assignment_check_hardening

Conversation

@vegu

@vegu vegu commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Added

  • RdapBootstrapError (subclass of RdapNotFoundError) raised on a self-bootstrap lookup miss, so callers can distinguish "no registry was queried" from an authoritative 404

Fixed

  • RIRAssignmentLookup: validate downloaded delegated-stats data (HTTP status + completeness against the file's summary count) and never overwrite a good cache with a failed/truncated fetch, so a partial download no longer makes allocated ASNs read as unassigned
  • RIRAssignmentLookup: cache freshness now uses elapsed seconds instead of floored timedelta.days, so cache_days=1 refreshes at 24h rather than ~48h
  • RIRAssignmentLookup.load_data: a load that fails partway no longer memoizes partial state on the instance, so a retry re-attempts all downloads instead of silently serving a subset of RIRs

@vegu
vegu requested a review from grizz July 14, 2026 12:35
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.14%. Comparing base (e8e35f2) to head (de3a07e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #82      +/-   ##
==========================================
+ Coverage   87.98%   89.14%   +1.16%     
==========================================
  Files          20       20              
  Lines        1182     1244      +62     
==========================================
+ Hits         1040     1109      +69     
+ Misses        142      135       -7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@grizz
grizz merged commit 16bde1d into main Jul 14, 2026
27 checks passed

This branch was previously deployed

1 inactive deployment
testpypi — de3a07e4 Deployed Jul 14, 2026 by vegu via Publish Python 🐍 distribution 📦 to TestPyPI #44
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.

3 participants