feat!: rename find-by-linkedin to upsert-by-linkedin (breaking, v1.0.0) - #5
Merged
Conversation
jschfflr
force-pushed
the
fix/linkedin-url-exact-match
branch
from
July 1, 2026 21:54
4d2ddc0 to
e2fc09b
Compare
find-by-linkedin conflated a read (find) with a write (--create) under a read verb, returned a bare id, treated the normal "not in CRM" outcome as an exit-1 error, and overlapped confusingly with `search --linkedin-url`. Replace it with `contacts upsert-by-linkedin` (honest get-or-create): - returns the full contact + a `created` flag (not a bare contact_id) - a missing contact is a normal result, not an error; --name is required to create - name-searches before creating to avoid duplicating a contact stored under a different URL - read-only lookups now use `contacts search --linkedin-url` BREAKING: find-by-linkedin and its --create flag are removed. Bumps to 1.0.0. Updates SKILL.md / references / README and the CHANGELOG. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… lowercasing - require a full "First Last" to create; a single-word --name previously created a contact with an empty last name (silent, untested). + test. - canonicalizer lowercases the whole slug (was %hex-only) so a mixed-case slug matches Apollo's lowercase storage; also simpler (drops the _PCT_RE pass). + test. - upsert renders the contact via format_contact_detail — consistent with get/create/update (generic_markdown silently dropped nested contact fields). - upsert command tests now use real Contact pydantic models, exercising the actual serialization path (previously plain dicts / MagicMock gave false confidence). - polish: _format_upsert_result typed dict[str, Any]; comment noting first-match is intentional. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jschfflr
force-pushed
the
feat/upsert-by-linkedin
branch
from
July 1, 2026 22:01
36c89fe to
bc13cac
Compare
jschfflr
force-pushed
the
feat/upsert-by-linkedin
branch
from
July 1, 2026 22:07
bc13cac to
95762b1
Compare
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.
Stacked on #4 (the URL-canonicalization fix) — this base will retarget to
mainonce #4 merges.Why
find-by-linkedin's name never matched its purpose. It conflated a read (find) with a write (--create) under a read verb, returned a barecontact_id(forcing a second call), treated the normal "not in the CRM yet" outcome as an exit-1 error, and overlapped confusingly withsearch --linkedin-url(its tier-1 was literally the same query). The half that justified the command's existence — create-if-missing — wasn't in the name.What
Replace it with
contacts upsert-by-linkedin— an honest get-or-create:createdflag (not a bare id),--nameis required to create,contacts search --linkedin-url(the one true read path).Breaking
contacts find-by-linkedinand its--createflag are removed (no back-compat, per request).SKILL.md,contact-workflows.md,README.md,CHANGELOG.md.Tests
🤖 Generated with Claude Code