Skip to content

Commit 34a3845

Browse files
mpstatonclaude
andcommitted
fix(crm-starter-export): trim depth 3 → 4 — deep deal decorations like "ECMC-3 -NCAD+RTC investment" reach their org
Exact-match-only trims mean depth only widens the search, never the risk. Also from this triage sitting: Britebound aliased with its pre-rebrand names (American Student Assistance / ASA), Bob Zorich person-anchored to Kingdom Giving Fund (rated primary) with CAZ Investments as a second affiliation, cazinvestments.com operator-confirmed. Files changed: - scripts/export-crm-orgs-csv.mjs Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RW28dw3kQAKXr2ZNefCukE
1 parent ba816a2 commit 34a3845

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

scripts/export-crm-orgs-csv.mjs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,13 @@ const fuzzyMatch = (name) => {
231231
if (n) variants.add(n);
232232
}
233233
variants.add(normName(String(name).replace(/:.*$/, ''))); // ": 12/31/25"
234-
// Progressive right-trim (up to 3 trailing tokens): "stand together
235-
// foundation catalyst grant" → … → "stand together foundation".
234+
// Progressive right-trim (up to 4 trailing tokens): "stand together
235+
// foundation catalyst grant" → … → "stand together foundation";
236+
// "ecmc 3 ncad rtc investment" → "ecmc". Safe because trimmed variants
237+
// must EXACT-match an org name/alias — depth only widens the search.
236238
for (const v of Array.from(variants)) {
237239
const toks = v.split(' ');
238-
for (let drop = 1; drop <= 3 && toks.length - drop >= 1; drop += 1) {
240+
for (let drop = 1; drop <= 4 && toks.length - drop >= 1; drop += 1) {
239241
variants.add(toks.slice(0, toks.length - drop).join(' '));
240242
}
241243
}

0 commit comments

Comments
 (0)