fix(realestate-notifier): preserve threshold=0 and test sent_ids retry path
- Replace `or 70` fallback with explicit None-check so that
min_match_score=0 ("notify all matches") is no longer silently
coerced to 70
- Add test: 200 OK + sent_ids=[] must not mark matches notified
- Add test: threshold=0 correctly pushes low-score matches
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -24,7 +24,8 @@ def notify_new_matches() -> dict:
|
||||
if not profile.get("notify_enabled"):
|
||||
return {"sent": 0, "skipped": "notify_disabled"}
|
||||
|
||||
threshold = profile.get("min_match_score") or 70
|
||||
raw_threshold = profile.get("min_match_score")
|
||||
threshold = 70 if raw_threshold is None else raw_threshold
|
||||
matches = get_unnotified_matches(threshold)
|
||||
if not matches:
|
||||
return {"sent": 0}
|
||||
|
||||
Reference in New Issue
Block a user