Skip to content

fix(enrichments): reduce cost, increase accuracy - #8936

Merged
waleedlatif1 merged 3 commits into
stagingfrom
fix/enrichment-waterfall-cost-quality
Oct 12, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
fix/enrichment-waterfall-cost-quality

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Work email waterfall prefers mailbox-verified emails; an unverified hit (catch-all guess, risky) is held and only used if nothing verified turns up
  • People Data Labs moved to the end of work email (least accurate, most expensive) and skipped once a fallback is held
  • Prospeo asks for verified emails/mobiles only; Wiza excludes personal emails
  • Stop billing ZeroBounce unknown and MillionVerifier catch-all/unknown results the vendors don't charge for
  • Mark an enrichment cell errored instead of completing it blank when every provider errored

Type of Change

  • Bug fix

Testing

  • enrichments/run.test.ts, background/enrichment-capability-subject.test.ts (new tests fail on the pre-fix code)
  • Replayed old vs new waterfall against live providers on 92 contacts: same fill rate, equal or better accuracy, ~60% cheaper on rows the top providers miss

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Oct 12, 2026 8:02pm UTC

Request Review

@waleedlatif1 waleedlatif1 changed the title enrichment fix fix(enrichments): reduce cost Oct 12, 2026
@waleedlatif1 waleedlatif1 changed the title fix(enrichments): reduce cost fix(enrichments): reduce cost, increase accuracy Oct 12, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 11 files

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

Turn on auto-fix | Re-trigger cubic

Comment thread .agents/skills/add-enrichment/SKILL.md Outdated
Comment thread apps/sim/enrichments/work-email/work-email.ts
@greptile-apps

greptile-apps Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the latest change fixes the remaining Dropcontact label mismatch.

Summary

The PR prefers verified work emails, reduces unnecessary provider charges, and marks all-provider failures as errors.

  • Work-email lookups prefer verified addresses and keep a fallback.
  • Phone lookups use stronger matches and prefer mobile numbers.
  • Email checks move past unclear results and count only charged checks.
  • A cell shows an error when every enrichment provider fails.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Try next provider] --> B{Result found?}
  B -->|No| C{Providers remain?}
  B -->|Yes| D{Verified?}
  D -->|Yes| E[Return verified result]
  D -->|No| F[Keep first fallback]
  F --> C
  C -->|Yes| A
  C -->|No| G{Fallback held?}
  G -->|Yes| H[Return fallback]
  G -->|No| I{Every attempted provider errored?}
  I -->|Yes| J[Blank outputs and mark error]
  I -->|No| K[Blank outputs and mark completed]
Loading

Reviews (3) · Last reviewed commit: "fix(enrichments): accept both Dropcontac..." · Reviewed by Greptile

Comment thread apps/sim/background/workflow-column-execution.ts Outdated
Comment thread apps/sim/enrichments/work-email/work-email.ts Outdated
…ror state for outages

- Work email: hold unverified hits (Hunter accept_all, Wiza risky,
  Dropcontact non-nominative) as a fallback while later providers look for a
  verified one; the held hit still fills the cell if none verifies. Ask
  Prospeo for verified emails only, keep personal addresses out of Wiza
  results, and move People Data Labs (unverified, $0.28 per hit) to the end,
  skipping it once a fallback is held. Order is otherwise unchanged.
- Phone: skip PDL on a bare name (not a valid match), pass the LinkedIn
  profile to PDL, prefer its mobile, and ask Prospeo for verified mobiles
  only (no billed person match without one).
- Email verification: unverified/error verdicts fall through; bill nothing
  for ZeroBounce unknown or MillionVerifier catch-all/unknown, which those
  vendors do not charge for.
- Table cells: when every provider errored, mark the cell errored instead of
  completing it blank, so an outage no longer silently finalizes empty rows.
@waleedlatif1
waleedlatif1 force-pushed the fix/enrichment-waterfall-cost-quality branch from 1b808c7 to 2ba6ad9 Compare October 12, 2026 19:53
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 11 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/enrichments/work-email/work-email.ts Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 11 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit ba998b6 into staging Oct 12, 2026
38 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/enrichment-waterfall-cost-quality branch October 12, 2026 20:10

This branch was previously deployed

1 inactive deployment
Preview — ce571b44 Deployed Oct 12, 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.

1 participant