semantic bufo search find-bufo.com
bufo
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tune(bot): extend cold-start stagger from 24hr to 7 days

24hr spread was too aggressive — ~10 new bufos/hr becoming eligible
caused bursts of 6 posts in 20 minutes. 7-day spread reduces to ~1/hr.
re-seeds bufos that haven't posted yet from the shorter window.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

zzstoatzz 5b459a28 87e0bdb6

+8 -4
+8 -4
bot/src/main.zig
··· 417 417 /// Seed staggered last_posted timestamps for short-phrase bufos that have no history. 418 418 /// Prevents a flood of first-posts when new short-phrase bufos are introduced. 419 419 /// Each bufo gets a deterministic offset based on its name hash, spreading 420 - /// eligibility over 24 hours so they trickle in one by one. 420 + /// eligibility over 7 days so they trickle in one by one (~1-2 per hour). 421 421 fn seedColdStartCooldowns(m: *matcher.Matcher, s: *stats.Stats) void { 422 422 const now = timestamp(app_threaded_io.io()); 423 - const spread: u64 = 24 * 3600; // spread new bufos over 24 hours 423 + const spread: u64 = 7 * 24 * 3600; // spread new bufos over 7 days 424 424 var seeded: usize = 0; 425 425 426 426 for (m.bufos.items) |bufo| { 427 427 if (bufo.phrase_len >= 4) continue; 428 - if (s.getLastPosted(bufo.name) != null) continue; 428 + // skip bufos that have actually posted (last_posted in the past) 429 + // but re-seed bufos still waiting from a previous shorter stagger 430 + if (s.getLastPosted(bufo.name)) |lp| { 431 + if (lp <= now) continue; // already posted for real 432 + } 429 433 430 434 const offset = cooldown.staggerOffset(bufo.name, spread); 431 435 // set last_posted into the future so eligibility = now + offset + cd ··· 436 440 } 437 441 438 442 if (seeded > 0) { 439 - std.debug.print("seeded cold-start cooldowns for {} short-phrase bufos (spread over {}hr)\n", .{ seeded, spread / 3600 }); 443 + std.debug.print("seeded cold-start cooldowns for {} short-phrase bufos (spread over {}d)\n", .{ seeded, spread / 86400 }); 440 444 } 441 445 } 442 446