[object Object]

← back to Sample Followup Sweep

fix(sweep): include exactly-10-day-old requests (age < minAge, was <=)

fcd34dcd68bf1b668746230ecf25262a19785e28 · 2026-09-22 11:07:09 -0700 · Steve Abrams

The >10-day rule excluded requests aged exactly 10 days (a 9/12 request due
today was skipped until age 11). Steve: exactly-10 must be INCLUDED.
lib/sweep.js:36 and build-fleet.js:41 both had the age<=10 off-by-one.

TK-12014 / TK-12013
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UBN9bgoXhsUaDnGkXU1T6m

Files touched

Diff

commit fcd34dcd68bf1b668746230ecf25262a19785e28
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Tue Sep 22 11:07:09 2026 -0700

    fix(sweep): include exactly-10-day-old requests (age < minAge, was <=)
    
    The >10-day rule excluded requests aged exactly 10 days (a 9/12 request due
    today was skipped until age 11). Steve: exactly-10 must be INCLUDED.
    lib/sweep.js:36 and build-fleet.js:41 both had the age<=10 off-by-one.
    
    TK-12014 / TK-12013
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01UBN9bgoXhsUaDnGkXU1T6m
---
 lib/sweep.js           | 2 +-
 scripts/build-fleet.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/sweep.js b/lib/sweep.js
index 3d9c125..1e10781 100644
--- a/lib/sweep.js
+++ b/lib/sweep.js
@@ -33,7 +33,7 @@ function sweep(rows, opts = {}, today = new Date()) {
     if (r.manual_add === true) { followUp.push({ ...r, age }); continue; }
 
     if (age === null) { skipped.push({ row: r, reason: 'no request date' }); continue; }
-    if (age <= minAgeDays) { skipped.push({ row: r, reason: `only ${age}d old (<=${minAgeDays})` }); continue; }
+    if (age < minAgeDays) { skipped.push({ row: r, reason: `only ${age}d old (<${minAgeDays})` }); continue; }
     if (age > maxAgeDays) { skipped.push({ row: r, reason: `dead lead (${age}d > ${maxAgeDays})` }); continue; }
 
     if (r.second_request) {
diff --git a/scripts/build-fleet.js b/scripts/build-fleet.js
index b884785..ad48faf 100644
--- a/scripts/build-fleet.js
+++ b/scripts/build-fleet.js
@@ -38,7 +38,7 @@ for (const r of j.records) {
   const vid = VID_ALIAS[normVid(rawvid)] || normVid(rawvid);
   const dt = d['today for client'];
   const age = dt ? Math.floor((today - new Date(dt)) / 86400000) : null;
-  if (age === null || age <= 10 || age > 60) { skippedWindow++; continue; }
+  if (age === null || age < 10 || age > 60) { skippedWindow++; continue; }
   const natural = vid.toLowerCase().replace(/[^a-z0-9]+/g, '-');   // pre-alias form, used by the guard below
   // A declared alias routes this vid's memos to ANOTHER vendor's desk (Anna French
   // -> Thibaut). Applied HERE, not after grouping, so the routing is the same

← 685de6e auto-data-snapshot: 2026-09-22T07:25:22 (2 data files) — dat  ·  back to Sample Followup Sweep  ·  fix(window): query full active [today-60..today-10] cohort e 5374f08 →