Files
nadlan-mcp/nadlan_mcp
Nitzan Pomerantz fe0a96ab83 Fix: Address E2E bugs from real-world MCP testing
Fixes three critical bugs discovered during live testing with Claude:

Bug #1: Same building detection always returned 0
- Root cause: deal.get('address') returned empty string
- Fix: Construct address from streetNameHeb + houseNum fields
- Added test: test_same_building_detection_with_api_fields

Bug #2: Property type filter too strict
- Root cause: Exact match failed for variants like 'דירת גג'
- Fix: Use flexible substring matching with normalization

Bug #3: Deal deduplication used non-existent field
- Root cause: Deduplication key referenced deal.get('address')
- Fix: Removed non-existent field from deduplication key

Also added _calculate_distance() helper for future radius filtering.

Test results: 26/28 passing (2 pre-existing failures unrelated)
References: .cursor/plans/MCP-E2E-TEST-SUMMARY.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 23:47:07 +03:00
..
2025-07-13 01:03:15 +03:00
2025-10-19 00:58:46 +03:00
2025-07-13 01:03:15 +03:00