- Shipped
- 5 Agosti 2026, 18:40 UTC
- Author
- Kamo
- Commit
- f3b591a
The two classes the whole feature rests on had no tests, and all three properties they guarantee fail silently in production: an unmatched call is indistinguishable from a call from a stranger, and a duplicated one just looks like the lead really did call twice. LeadContactPointServiceTest covers the window diff — an unchanged re-save must not fragment history, a reformatted number is not a change, and a replaced number closes and reopens at the same instant so a call on the boundary matches exactly one window. It also asserts the close is flushed before the open, which is what keeps the partial unique index satisfied. LeadCommunicationLinkerTest covers point-in-time matching: a number added in June must not claim a call from January, a superseded number must not claim calls after it was replaced, and a record the sweep discovers late still binds to the window that covered it. Plus formatting-insensitivity, idempotent re-ingest, blanks-only enrichment, and shared household numbers. Both use throwing repository stubs, so a newly-introduced repository call surfaces as a failure rather than silently exercising a different path. Also: the two keyset queries return List instead of Page — Spring Data runs a and MediaObjSocialRef gains a batch lookup so chat direction resolves in one query per page rather than one per message.