Email finder: CLI command group, known_pattern, contract-checked routes, examples folder - #5
Merged
Merged
Conversation
added 3 commits
August 19, 2026 13:13
find (with --known-pattern), find-batch from CSV and/or repeatable --contact, results (find or verify batches), and job - each with --wait/--no-wait polling. 14 tests.
…t check known_pattern matches the platform's POST /email/find body and is omitted when unset. The platform now exposes the email find/poll routes in its OpenAPI spec, so the openapi=False stamps are gone and check_contract.py validates the routes and params like every other resource.
match_crm_contacts.py (bulk-match a CRM CSV to personas with resumable checkpointing and website+email domain keys), find_emails_from_csv.py, and discover_and_enrich.py, referenced from the README.
…l jobs in output Rows expand to up to two queries (website + email domain), so chunking by row count could send up to 1,000 queries against the 500-per-call limit. Chunks are now packed by expanded query count, rows never split across calls. In find_emails_from_csv, terminal jobs with no result carried only item.error and vanished from the CSV; they now write a row with their status and error.
Comment on lines
+76
to
+78
| writer.writerow( | ||
| { | ||
| "first_name": "", |
There was a problem hiding this comment.
Failed contacts lose their identity
When a terminal batch item has result=None, this branch writes empty first-name, last-name, and domain fields instead of correlating the failure with its submitted contact, causing an anonymous CSV row that users cannot correct or retry accurately.
Prompt To Fix With AI
This is a comment left during a code review.
Path: examples/find_emails_from_csv.py
Line: 76-78
Comment:
**Failed contacts lose their identity**
When a terminal batch item has `result=None`, this branch writes empty first-name, last-name, and domain fields instead of correlating the failure with its submitted contact, causing an anonymous CSV row that users cannot correct or retry accurately.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
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.
What
discolike emailgroup -find(with--known-pattern),find-batch(CSV and/or repeatable--contact),results(find or verify batches),job; each with--wait/--no-waitpolling. 14 new tests.email.findacceptsknown_pattern(sync + async), omitted from the body when unset, matching the platform'sPOST /email/find.openapi=False- the platform now exposes/email/find,/email/find/batch, and the poll routes in its OpenAPI spec (discolike-platform 69c2f5a80 on development).examples/folder -match_crm_contacts.py(bulk-match a CRM CSV to personas: chunked, resumable checkpointing that retries failed chunks, domain keys from both website and email columns),find_emails_from_csv.py,discover_and_enrich.py. Referenced from the README; the docs site SDK guide links here too (docs MR 17).Verification
--helpworks.check_contract.py --specrun against a spec generated from platform development: 48 routes checked, 0 skipped, all match.Note for CI
The contract job checks the dev spec - it needs the platform development deploy (69c2f5a80) to be live on api.dev first. If the job ran before that, re-run it.
Greptile Summary
The PR adds the email-finder CLI and SDK support, enables contract checking for email routes, and introduces runnable workflow examples. The latest changes also revise CRM query chunking and preserve terminal email failures in CSV output, although failed contacts remain unidentifiable.
known_patternto synchronous and asynchronous SDK calls.Confidence Score: 4/5
The PR is not yet safe to merge because failed email-batch contacts remain unidentifiable in the generated CSV.
The attempted failure-output fix preserves an error row but replaces its contact identity with blank values, preventing users from determining which submitted contact failed or retrying it accurately.
Files Needing Attention: examples/find_emails_from_csv.py
Important Files Changed
Prompt To Fix All With AI
Reviews (2): Last reviewed commit: "fix(examples): cap bulk-match chunks by ..." | Re-trigger Greptile