-
-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Labels
A-developer-xpArea: developer experienceArea: developer experienceA-networkingArea: Networking, ring protocol, peer discoveryArea: Networking, ring protocol, peer discoveryE-mediumExperience needed to fix/implement: Medium / intermediateExperience needed to fix/implement: Medium / intermediateT-enhancementType: Improvement to existing functionalityType: Improvement to existing functionality
Description
Problem
The NAT address handling code in subscribe/seeding operations lacks end-to-end integration tests that verify the full flow works correctly with actual NAT scenarios.
Current Test Coverage
- ✅ Unit tests for
LiveTransactionTracker::active_transaction_count - ✅ Unit tests for connect operation NAT scenarios
- ✅ Unit tests for seeding manager subscriber operations
- ❌ No integration test for subscribe operation NAT address filling
- ❌ No end-to-end test showing NAT peer successfully subscribing through gateway
Suggested Tests
-
Subscribe NAT address filling test
- Peer behind NAT sends subscribe request with
PeerAddr::Unknown - Gateway fills in observed address from
source_addr - Verify subscriber is registered with correct address
- Peer behind NAT sends subscribe request with
-
End-to-end NAT subscription test
- Set up gateway + NAT peer topology
- NAT peer subscribes to contract
- Verify updates are correctly routed back to NAT peer
-
Edge case: source_addr is None
- What happens if
source_addris unexpectedlyNone? - Should log warning and handle gracefully
- What happens if
Importance
Medium priority - The code paths are tested via unit tests and manual testing, but automated integration tests would catch regressions and document expected behavior.
Context
- Discovered during Claude bot review of PR fix: handle NAT address in subscribe and seeding operations #2193
- Could use
freenet-test-networkcrate for integration testing
[AI-assisted - Claude]
Metadata
Metadata
Assignees
Labels
A-developer-xpArea: developer experienceArea: developer experienceA-networkingArea: Networking, ring protocol, peer discoveryArea: Networking, ring protocol, peer discoveryE-mediumExperience needed to fix/implement: Medium / intermediateExperience needed to fix/implement: Medium / intermediateT-enhancementType: Improvement to existing functionalityType: Improvement to existing functionality
Type
Projects
Status
Triage