Repository navigation
Precleared: optional prospect_country for addresses that don't show a country - #17
Open
gabrielaoimevbore-beep wants to merge 5 commits into
Open
gabrielaoimevbore-beep wants to merge 5 commits into
gabrielaoimevbore-beep wants to merge 5 commits into
Conversation
Precleared uses it only when it can't work out the recipient's country from the address, company records or the company's website. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FQdvgNwwnTYBHUGD2dPwFh
Sent as default_recipient_country, and added to the cache fingerprint, only when set, so existing cached verdicts stay valid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FQdvgNwwnTYBHUGD2dPwFh
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FQdvgNwwnTYBHUGD2dPwFh
Config normalising and validation, from_config, sent only when set, and the cache fingerprint unchanged when empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FQdvgNwwnTYBHUGD2dPwFh
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FQdvgNwwnTYBHUGD2dPwFh
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.
Precleared needs the recipient's country to pick a rule. It reads it from the domain (.co.uk, .de, .ca and so on), from UK company records, and from US and Canadian office addresses on the company's website. When none of those show it, as with some .com addresses, the verdict is
unknown, which Harvey treats as don't send.This adds one optional setting for users whose prospects are all in one country:
Harvey sends it as
default_recipient_country, which Precleared uses only as a last resort: the address, company records and the company's website still win, so a .co.uk prospect is still checked under UK rules. When the default is used, the reasons say so and the confidence drops a level (how Precleared works out the country).usbecomesUS,UKbecomesGB). Anything else fails when the config loads, with a clear message.Tests: four new tests in
tests/test_precleared.py: config normalising and validation,from_config, the field is sent only when set, and the fingerprint is unchanged when it's empty. The full suite passes on the fork's CI on Ubuntu, macOS and Windows with Python 3.11 and 3.12 (run).It touches different lines from #16, so the two can merge in either order.
Disclosure: I built Precleared, and I wrote this with help from Claude.
🤖 Generated with Claude Code
https://claude.ai/code/session_01FQdvgNwwnTYBHUGD2dPwFh