← back to Rentv 2026
harden(content-studio): Cody gate — also drop 'reports? that' + 'covered by' from the attribution scrub (they mangled 'annual report that…' / 'parking covered by a canopy'), and clean a connective left DANGLING by the outlet strip only when it precedes punctuation (so 'per unit'/'covered by a canopy' stay intact). Verified 8/9; rare mid-clause dangling-via residual documented
03e43133a4c4058c41fed5451e272528a1bb318e · 2026-08-06 11:36:22 -0700 · Steve
Files touched
Diff
commit 03e43133a4c4058c41fed5451e272528a1bb318e
Author: Steve <steve@designerwallcoverings.com>
Date: Thu Aug 6 11:36:22 2026 -0700
harden(content-studio): Cody gate — also drop 'reports? that' + 'covered by' from the attribution scrub (they mangled 'annual report that…' / 'parking covered by a canopy'), and clean a connective left DANGLING by the outlet strip only when it precedes punctuation (so 'per unit'/'covered by a canopy' stay intact). Verified 8/9; rare mid-clause dangling-via residual documented
---
server.js | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/server.js b/server.js
index 9e11508e..20b35a8e 100644
--- a/server.js
+++ b/server.js
@@ -932,12 +932,15 @@ ${body || '(no body available — work from the title)'}`;
let t = String(s == null ? '' : s);
for (const nm of names) t = t.replace(new RegExp('\\b' + nm.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + '\\b', 'gi'), '');
t = t.replace(/https?:\/\/\S+/g, '');
- // strip attribution lead-ins the model may paraphrase (the outlet name itself is already gone above).
- // Do NOT add bare "per"/"via" here — they're common CRE prepositions ("$928k per unit", "$153 per sf",
- // "6% per annum", "financed via a joint venture") and stripping them mangles the copy; a "per <outlet>"
- // attribution is already neutralized because the outlet name was removed in the step above.
- t = t.replace(/\b(according to|as (?:first )?reported by|first reported by|as (?:the )?(?:outlet|publication|report|paper)s? (?:noted|reported)|reported by|reports? that|was covered by|covered by|sources? (?:told|said))\b[\s,:]*/gi, '');
- return t.replace(/\(\s*\)/g, '').replace(/\s{2,}/g, ' ').replace(/\s+([.,;:])/g, '$1').replace(/^[\s,;:.\-]+/, '').trim();
+ // Strip attribution lead-ins the model may paraphrase (the outlet name itself is already gone above).
+ // ONLY unambiguous attribution phrases live here. Deliberately EXCLUDED because they collide with common
+ // CRE copy: bare "per"/"via" ("$928k per unit", "financed via a JV"), "reports? that" ("annual report
+ // that showed…"), and "covered by" ("parking covered by a canopy") — stripping those mangles real text.
+ t = t.replace(/\b(according to|as (?:first )?reported by|first reported by|as (?:the )?(?:outlet|publication|report|paper)s? (?:noted|reported)|reported by|sources? (?:told|said))\b[\s,:]*/gi, '');
+ // Clean up a connective left DANGLING by the outlet strip ("The deal, per <Bisnow>, closed" → "…, per, …")
+ // — only when it now sits right before punctuation/end, so a real "per unit"/"covered by a canopy" is untouched.
+ t = t.replace(/\b(?:per|via|by)\b\s*(?=[,.;:]|$)/gi, '');
+ return t.replace(/\(\s*\)/g, '').replace(/\s{2,}/g, ' ').replace(/,\s*,/g, ',').replace(/\s+([.,;:])/g, '$1').replace(/^[\s,;:.\-]+/, '').trim();
};
const started = Date.now();
try {
← ac3c0985 chore: v0.21.2 (session close — nav: Regions + Market Snapsh
·
back to Rentv 2026
·
feat(services): metro switcher (LA/OC/SD/IE/Ventura) + fleet bc6ded37 →