Repository navigation
Conversation
- Team-page parser: take the title from the block right after the name,
drop tags cut off by the context window, reject feature-list lead-ins
("HOA Boards — ...") and lowercase headings ("Customer care"), and count
Chief/Director titles as decision-makers.
- Directory filter: names like "... Company List" / "List of ..." are junk.
- Company names: SERP providers store a page title, not a business name.
Pick the title segment that shares a distinctive word with the domain,
else derive one from the domain; the profile stage then upgrades it from
the homepage's og:site_name/<title>. rename_company keeps prospects.company
in step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B4tcpnvC8VAkRoRkM7JWNF
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.
I found three data-quality bugs during a first real
harvey discover --provider serperrun against a local-services vertical. Each one would have ended up in an outgoing email.1. Team-page parser records marketing copy as people
detect_peopleproduced contacts like:HOA Boards — partner dedicated to accoun<li><strong>HOA Boards</strong> — Desiring consistent oversight and a trusted management partner…</li>Customer care — Responsive Customer Serv<strong class="main-nav-link-heading">Customer care</strong><real name> — CEO <div class="descriptio<h3>Name</h3><p>CEO</p><p class="description">long bio…These have three causes:
(?is)flag made the[A-Z][a-z]+ [A-Z]…name pattern case-insensitive, so lowercase headings passed. Now only the tag names are case-insensitive ((?i:h[1-5]|strong|b)).<p>,<br>,<div>,<li>, …), and it has to read like a title: at most 10 words, mostly capitalised, with a role word in it.<div class="descriptioin the text. That dangling tag is now dropped.Name tokens also reject vertical nouns ("HOA", "Boards", "Community"), abstract nouns (
-tion/-sion/-ness) and all-caps acronyms, checking each part of a hyphenated token ("Process-Driven").DECISION_MAKER_TITLESgainschiefanddirector. Before, "Chief Executive Officer" written out in full wasn't flagged as a decision-maker.2. Directory filter misses "… Company List" pages
A page titled " HOA Management Company List" on a clean-looking domain got through.
JUNK_NAME_PATTERNSnow also matches(company|companies|firms|contractors|businesses|providers) listandlist of.3. SERP providers store a page title as the company name
The Serper and DataForSEO SERP adapters store
item["title"]asBusiness.name. Those are page titles: "Denver, CO | HOA Management Firm", "Home Page - NVCM | Community Association Management". The writer would then say "…at Denver, CO | HOA Management Firm".business_name(title, domain)splits the title on|,-,–,—,:and·, and keeps the segment that shares a distinctive word with the domain. Generic words (management, HOA, company, city/state names, …) don't count, so "HOA Management Firm" does not matchmanagementharbor.com. It also accepts an initialism ("Northvale Association of Community Managers" ↔nacm.org). If nothing matches, it derives a name from the domain:managementharbor.com→ "Management Harbor",kqresidential.com→ "KQ Residential".og:site_nameand<title>(taking the fullest matching segment) and upgrades a name the domain doesn't back up, or one that was only domain-derived. A name that already matches is left alone.StateManager.rename_company()updatescompanies.nameand the denormalisedprospects.companytogether, so emails never use a stale name.The listings adapter is unchanged, because its
titleis a real business name.Testing
test_collectors_profile.pyandtest_discover.py, built from the real markup patterns above. All fixtures are fictional businesses and people.test_load_env_reads_environment, happens only when a real.envexists. It's fixed separately in Keep a developer's real .env out of test_load_env_reads_environment #22.🤖 Generated with Claude Code
https://claude.ai/code/session_01B4tcpnvC8VAkRoRkM7JWNF