← back to Rentv
pr/taxonomy: fix two title-classification bugs (proven by execution). (1) bare 'president' in both the ROLE and SENIORITY rules matched 'Vice President', so every spelled-out VP/EVP/SVP was mislabeled role=president + seniority=c_suite — added a (?<!vice[\\s-]) lookbehind so VPs fall through to evp_svp/vp. (2) '^c[emc]o' only caught CEO/CMO/CCO at string-start, missing 'Regional CEO'/'Divisional CMO' → used \\bc[emc]o\\b. Verified 28 title cases across role+seniority
1bdfc17d11895a66ed5d83d607e65f728bd292b0 · 2026-08-05 19:54:55 -0700 · Steve
Files touched
Diff
commit 1bdfc17d11895a66ed5d83d607e65f728bd292b0
Author: Steve <steve@designerwallcoverings.com>
Date: Wed Aug 5 19:54:55 2026 -0700
pr/taxonomy: fix two title-classification bugs (proven by execution). (1) bare 'president' in both the ROLE and SENIORITY rules matched 'Vice President', so every spelled-out VP/EVP/SVP was mislabeled role=president + seniority=c_suite — added a (?<!vice[\\s-]) lookbehind so VPs fall through to evp_svp/vp. (2) '^c[emc]o' only caught CEO/CMO/CCO at string-start, missing 'Regional CEO'/'Divisional CMO' → used \\bc[emc]o\\b. Verified 28 title cases across role+seniority
---
src/pr/lib/taxonomy.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/pr/lib/taxonomy.js b/src/pr/lib/taxonomy.js
index a46021ca..a60123c1 100644
--- a/src/pr/lib/taxonomy.js
+++ b/src/pr/lib/taxonomy.js
@@ -151,7 +151,7 @@ const ROLE_RULES = [
// Commercial leadership (checked last so "VP of Marketing" doesn't land here)
[/chief executive officer|ceo\b/i, 'ceo', 'leadership'],
[/regional president/i, 'regional_president', 'leadership'],
- [/president/i, 'president', 'leadership'],
+ [/(?<!vice[\s-])president/i, 'president', 'leadership'],
[/managing director/i, 'managing_director', 'leadership'],
[/market leader/i, 'market_leader', 'leadership'],
[/office leader/i, 'office_leader', 'leadership'],
@@ -161,7 +161,10 @@ const ROLE_RULES = [
];
const SENIORITY_RULES = [
- [/chief|^c[emc]o\b|president|founder/i, 'c_suite'],
+ // `\bc[emc]o\b` (not `^…`) so CEO/CMO/CCO count anywhere ("Regional CEO"); the negative
+ // lookbehind keeps the bare `president` from matching "Vice President" (which must fall through
+ // to evp_svp/vp below, not read as C-suite).
+ [/chief|\bc[emc]o\b|(?<!vice[\s-])president|founder/i, 'c_suite'],
[/executive vice president|evp|senior vice president|svp/i, 'evp_svp'],
[/vice president|vp\b/i, 'vp'],
[/director|head of/i, 'director'],
← bbcd07e6 auto-save: 2026-08-05T19:45:13 (7 files) — data/deals-regist
·
back to Rentv
·
pr/taxonomy: Cody gate — collapse whitespace at the top of c d1859231 →