Skip to content

fix: reuse discovered organizations when a provider id is new - #35

Merged
VolodymyrLinuxovich merged 3 commits into
mainfrom
fix/discovered-org-dedupe
Oct 31, 2026
Merged

VolodymyrLinuxovich merged 3 commits into
mainfrom
fix/discovered-org-dedupe

Conversation

@VolodymyrLinuxovich

Copy link
Copy Markdown
Owner

Fixes #34

Summary

persistProviderOrganization looked up an organization only by provider org id when one was sent. A firm saved earlier without an id, or by another provider, got a second row. The lookup now falls back to the domain or name match when the id lookup misses. The provider id match still wins when it exists.

Validation

  • New tests in discovered-organizations.test.ts. Two of them fail on main.
  • npm test passes with 177 tests.
  • npm run typecheck and npm run lint pass.

@vercel

vercel Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
largevcmodel Ready Ready Preview Oct 31, 2026 11:59pm UTC

@VolodymyrLinuxovich
VolodymyrLinuxovich merged commit 2e13159 into main Oct 31, 2026
5 of 6 checks passed

This branch was successfully deployed

1 active deployment
Preview — 3c66a372 Deployed Oct 31, 2026 by vercel[bot]
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.

People discovery creates a duplicate organization when the provider sends an org id

1 participant