[object Object]

← back to Beverlyhillsvideos

BHV watcher: broaden approval regex + drop over-strict domain re-filter (Cody gate — false-negative fix)

d82d25af1341eadb45657860cbb0ab2c67d8a9fc · 2026-08-06 16:20:02 -0700 · Steve Abrams

Files touched

Diff

commit d82d25af1341eadb45657860cbb0ab2c67d8a9fc
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Aug 6 16:20:02 2026 -0700

    BHV watcher: broaden approval regex + drop over-strict domain re-filter (Cody gate — false-negative fix)
---
 scripts/adsense-approval-watch.mjs | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/scripts/adsense-approval-watch.mjs b/scripts/adsense-approval-watch.mjs
index 04b3ad8..274d0cf 100644
--- a/scripts/adsense-approval-watch.mjs
+++ b/scripts/adsense-approval-watch.mjs
@@ -92,8 +92,8 @@ function saveState(s) { mkdirSync(dirname(STATE_FILE), { recursive: true }); wri
 
 function classify(text) {
   const t = (text || '').toLowerCase();
-  const negative = /(not approved|isn.?t ready|is not ready|not ready to show|need to fix|fix some issues|unfortunately|has not been approved|not yet ready)/;
-  const positive = /(ready to show ads|now showing ads|now serving ads|is approved|been approved|approved for adsense|your site is ready|now ready to|is now live|start showing ads)/;
+  const negative = /(not approved|isn.?t ready|is not ready|not ready to show|need to fix|fix some issues|unfortunately|has not been approved|not yet ready|couldn.?t approve|can.?t show ads)/;
+  const positive = /(ready to show ads|showing ads|serving ads|is approved|been approved|approved for|your site is ready|now ready|is now live|start showing ads|you.?re all set|site is live|congratulations|successfully (approved|added)|ads are (now )?(showing|live|serving))/;
   if (negative.test(t)) return 'ISSUES';
   if (positive.test(t)) return 'APPROVED';
   return 'DECISION';
@@ -134,10 +134,12 @@ async function main() {
   log(`checked: ${msgs.length} AdSense msg(s) for ${SITE} since ${SUBMIT_AFTER}`);
 
   const state = loadState();
-  const fresh = msgs.filter((m) => {
-    const text = `${m.subject || ''} ${m.snippet || ''}`;
-    return /beverlyhillsvideos/i.test(text) && !state.alerted.includes(m.id);
-  });
+  // Trust the search scoping (from:adsense-noreply@google.com + the domain token +
+  // after:submit-date). Do NOT re-filter on subject/snippet — the snippet is only a
+  // ~200-char body preview, so an approval that names the domain later in the body would
+  // pass the search but be wrongly dropped here (a silent false-negative — the worst
+  // failure for a "tell me when it's live" watcher). Dedup on message-id only.
+  const fresh = msgs.filter((m) => m.id && !state.alerted.includes(m.id));
   if (!fresh.length) { log('no new decision — staying quiet'); return; }
 
   for (const m of fresh) {

← 814469e stores: build out 7 verified-open stores → 92 total; mark 5  ·  back to Beverlyhillsvideos  ·  poster: rankByLRU ignores dry-run entries (Cody FIX-FIRST) 6e16b66 →