Capture phone (office) + mobile (cell) on card intake; ship v0.1.0:98

Completes business-card contact capture. The transcription prompt now labels
Phone/Mobile/Fax on separate lines, and the extractor maps an office/main number ->
phone and a cell -> mobile, never a fax. Both carry the same digit-in-source
integrity rule as email/LinkedIn: a number is kept only if its digits literally
appear in the source (or, on revise, the instruction) -- never minted. The proposal
card shows Phone + Mobile and they're editable (aliases phone/tel/office, mobile/cell).

Server: _upsert_contact_from_fundraising now accepts contact.phone + contact.mobile
and writes them to the canonical contact record (contact-level, not grid pills),
shipped in s9pk v0.1.0:98. No schema change -- the contacts columns already exist.

41/41 backend suite green + the matrix_intake units; card flow end-to-end is live-smoke.
This commit is contained in:
Keysat
2026-06-20 11:26:39 -05:00
parent 92ab59de4e
commit e824ff2206
12 changed files with 139 additions and 29 deletions
+6 -3
View File
@@ -16,18 +16,21 @@ def test_new_investor_payload():
assert out["create_investor_if_missing"] is True
assert "row_id" not in out
assert out["contact"] == {"name": "Jane Doe", "email": "jane@acme.com", "title": "GP",
"city": "", "linkedin_url": ""}
"city": "", "linkedin_url": "", "phone": "", "mobile": ""}
assert out["body"] == "met at conf"
assert out["source"] == "matrix_intake"
def test_contact_carries_city_and_linkedin_when_present():
def test_contact_carries_card_fields_when_present():
p = {"intent": "new_investor", "investor_name": "Acme Capital", "contact_name": "Jane Doe",
"contact_email": "jane@acme.com", "city": "New York",
"linkedin_url": "linkedin.com/in/janedoe", "note": "met at conf"}
"linkedin_url": "linkedin.com/in/janedoe", "phone": "212-555-0100",
"mobile": "917-555-0199", "note": "met at conf"}
out = crm_client.build_commit_payload(p)
assert out["contact"]["city"] == "New York"
assert out["contact"]["linkedin_url"] == "linkedin.com/in/janedoe"
assert out["contact"]["phone"] == "212-555-0100" # office/main line
assert out["contact"]["mobile"] == "917-555-0199" # cell
def test_existing_investor_uses_row_id_not_create():