← back to Beverlyhillsvideos
poster: rankByLRU ignores dry-run entries (Cody FIX-FIRST)
6e16b66e3a4cd7efdacf1f64f8da81672296ad7e · 2026-08-06 16:23:58 -0700 · Steve Abrams
A dry-tested film (e.g. funke) was being treated as 'posted' by the live LRU
rotation, so it would be skipped on its real turn and the calendar projection
diverged. Live rotation now counts only dryRun:false posts. Verified: next
restaurant pick is now Funke (was wrongly Mr. Chow).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
M social/poster/post-daily.mjs
Diff
commit 6e16b66e3a4cd7efdacf1f64f8da81672296ad7e
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Thu Aug 6 16:23:58 2026 -0700
poster: rankByLRU ignores dry-run entries (Cody FIX-FIRST)
A dry-tested film (e.g. funke) was being treated as 'posted' by the live LRU
rotation, so it would be skipped on its real turn and the calendar projection
diverged. Live rotation now counts only dryRun:false posts. Verified: next
restaurant pick is now Funke (was wrongly Mr. Chow).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
social/poster/post-daily.mjs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/social/poster/post-daily.mjs b/social/poster/post-daily.mjs
index 821eab5..7b9f475 100644
--- a/social/poster/post-daily.mjs
+++ b/social/poster/post-daily.mjs
@@ -34,9 +34,11 @@ function appendLedger(entry) {
// Order films least-recently-posted first so the library cycles without repeats.
function rankByLRU(films, ledger) {
- const lastPosted = new Map(); // slug -> ts of most recent post (dry or live)
+ const lastPosted = new Map(); // slug -> ts of most recent REAL (live) post
for (const e of ledger) {
- if (e.slug) lastPosted.set(e.slug, e.ts);
+ // Dry-run entries must NOT influence the live rotation, or a dry-tested film
+ // gets skipped on its real turn (and the calendar projection diverges).
+ if (e.slug && !e.dryRun) lastPosted.set(e.slug, e.ts);
}
return films
.map((f) => ({ film: f, last: lastPosted.get(f.slug) || '' }))
← d82d25a BHV watcher: broaden approval regex + drop over-strict domai
·
back to Beverlyhillsvideos
·
poster: add read-only BHV token-health watchdog (Cody FIX-FI e702702 →