Repository navigation
fix(leads): record the people a campaign names, not just the companies - #154
Merged
Merged
Conversation
Person discovery renders the page, walks the pagination, opens each entry and parses a name, a title and a profile link out of it. The campaign runner then read `prospects` and `errors` off that result and dropped `people` on the floor. So every person a campaign found was discarded at the last step, after being paid for. The contacts table held eighty rows and not one name, which looked like person extraction being broken and was really the one caller that mattered ignoring its output. The one-shot finder did it correctly, which is exactly why nobody noticed: the path used to test the feature worked, and the path used to run it did not. Both now go through one recorder rather than two copies, since two copies is what let them drift. People found by a campaign also carry that campaign's niche, matching how contacts found through the prospect route are already labelled. Verified against the directory that exposed it: eleven people extracted and eleven recorded, with titles — "Chief Technology Officer", "Co-Founder and CTO", "Fractional CTO" — where before there were none. The names lost earlier cannot be backfilled, since they were never written down anywhere; re-running the campaign recovers them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
That looked like person extraction being broken. It wasn't — extraction works fine. The campaign runner ignored its output:
Discovery renders the page, walks the pagination, opens each entry and parses a name, title and profile link out of it. Then the runner took
prospectsanderrorsand droppedpeopleon the floor — discarding every person after paying to find them.Why it survived
The one-shot finder did it correctly. The path used to test the feature worked; the path used to run it didn't. So both now go through one shared recorder — two copies is what let them drift.
People found by a campaign also carry that campaign's niche, matching how prospect-route contacts are already labelled.
Verified against the directory that exposed it
In the database, with titles and niche attached:
The names lost earlier can't be backfilled — they were never written down anywhere. Re-running a campaign recovers them.
Checks
tsc --noEmitclean · 1,036 tests pass (8 new) · build compilesupsertContactdirectly, so they can only drift again by deleting a test🤖 Generated with Claude Code