recency_guard module + wired propagate_stack_now + top20 (Tony 2026-07-13)
This commit is contained in:
@@ -104,6 +104,15 @@ def main():
|
||||
and it.get("first_seen") and _parse(it["first_seen"])
|
||||
and _parse(it["first_seen"]) >= cutoff
|
||||
and (it.get("source") or "").lower() not in EXCLUDE_SOURCES]
|
||||
# --- RECENCY GUARD (2026-07-13, Tony's correction): NEVER re-post old news.
|
||||
# Age is the dominant measure: today's items ALWAYS lead (week-open fresh
|
||||
# news); older items keep only if NEVER posted before (md-stack / seen).
|
||||
# This kills the Apple-vs-OpenAI / GPT-5.6 re-post problem at the source. ---
|
||||
from recency_guard import filter_fresh as _rg_filter
|
||||
_today, _older_new, _dropped = _rg_filter(eligible)
|
||||
if _dropped:
|
||||
print(f"[recency_guard] dropped {len(_dropped)} already-posted older items")
|
||||
eligible = _today + _older_new
|
||||
eligible.sort(key=lambda x: x["clickability_decayed"], reverse=True)
|
||||
top = eligible[:LIMIT]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user