← back to Domain Sniper
spotcheck: harden newestHoneypot() regex to exclude -results.json and v2 batches
fb0cf739a395f11f0f1813b9905f38285a34b7e4 · 2026-05-12 19:22:28 -0700 · steve
Previous regex /^honeypot-\d{4}/ + endsWith('.json') correctly skipped
honeypot-v2-* (because the v after the dash fails the \d{4} test) and
also coincidentally skipped *-results.json (because '-' (0x2d) sorts
before '.' (0x2e), so the main file ends up last after sort()).
That second behaviour was load-bearing-by-accident. Tightened to:
/^honeypot-\d{4}-\d{2}-\d{2}T[\d-]+Z\.json$/
which matches only the canonical lure-batch filename shape — no
-results.json sidecars, no v2 cohort batches.
Verified picks honeypot-2026-05-12T20-36-16-324Z.json over the four
other honeypot-*.json files in data/. Cumulative spot-checks now
0/320 across 28 datapoints (5.76h slice 2-3 + slice 4-5 both 0/10).
Files touched
Diff
commit fb0cf739a395f11f0f1813b9905f38285a34b7e4
Author: steve <steve@designerwallcoverings.com>
Date: Tue May 12 19:22:28 2026 -0700
spotcheck: harden newestHoneypot() regex to exclude -results.json and v2 batches
Previous regex /^honeypot-\d{4}/ + endsWith('.json') correctly skipped
honeypot-v2-* (because the v after the dash fails the \d{4} test) and
also coincidentally skipped *-results.json (because '-' (0x2d) sorts
before '.' (0x2e), so the main file ends up last after sort()).
That second behaviour was load-bearing-by-accident. Tightened to:
/^honeypot-\d{4}-\d{2}-\d{2}T[\d-]+Z\.json$/
which matches only the canonical lure-batch filename shape — no
-results.json sidecars, no v2 cohort batches.
Verified picks honeypot-2026-05-12T20-36-16-324Z.json over the four
other honeypot-*.json files in data/. Cumulative spot-checks now
0/320 across 28 datapoints (5.76h slice 2-3 + slice 4-5 both 0/10).
---
spotcheck.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/spotcheck.js b/spotcheck.js
index 4d419ce..6f74b51 100755
--- a/spotcheck.js
+++ b/spotcheck.js
@@ -24,7 +24,10 @@ const OUT_FILE = path.join(DATA_DIR, 'honeypot-spotcheck.jsonl');
function newestHoneypot() {
if (process.env.HONEYPOT_BATCH) return path.resolve(process.env.HONEYPOT_BATCH);
- const files = fs.readdirSync(DATA_DIR).filter((f) => /^honeypot-\d{4}/.test(f) && f.endsWith('.json'));
+ // Pick v1 lure batches only:
+ // - filename starts with honeypot-YYYY-... (excludes honeypot-v2-*)
+ // - ends in -<ms>Z.json (excludes -results.json sidecars)
+ const files = fs.readdirSync(DATA_DIR).filter((f) => /^honeypot-\d{4}-\d{2}-\d{2}T[\d-]+Z\.json$/.test(f));
if (!files.length) throw new Error('no honeypot-*.json batch found in data/');
files.sort();
return path.join(DATA_DIR, files[files.length - 1]);
← 1006f91 readme: ambient-drift baseline result — zero registrations o
·
back to Domain Sniper
·
readme: 5.82h spot-check datapoint — 0/330 across 29 datapoi 668bd5c →