events()); $flush = $events->first(fn ($event) => str_contains((string) ($event->command ?? $event->description ?? ''), 'flush-redis-stats') || ($event->mutexName() === 'flush-redis-stats') || str_contains($event->getSummaryForDisplay(), 'flush-redis-stats')); expect($flush)->not->toBeNull() ->and($flush->expression)->toBe('1,11,18,31,41,51 * * * *'); $boards = $events->first(fn ($event) => str_contains($event->getSummaryForDisplay(), 'leaderboards:refresh') || str_contains((string) ($event->command ?? ''), 'leaderboards:refresh')); expect($boards)->not->toBeNull() ->and($boards->expression)->toContain('21'); }); it('keeps recommendation nightly offsets and does not register disabled forum async producers', function () { $display = collect(app(Schedule::class)->events()) ->map(fn ($event) => $event->getSummaryForDisplay()) ->implode("\n"); expect($display)->toContain('rec-compute-tags') ->and($display)->toContain('rec-compute-behavior') ->and($display)->toContain('rec-compute-hybrid') ->and($display)->toContain('forum-post-scan') ->and($display)->not->toContain('forum-ai-scan') ->and($display)->not->toContain('forum-bot-scan') ->and($display)->not->toContain('forum-firewall-scan'); }); it('does not register presence prune unless enabled', function () { expect((bool) config('traffic.online_visitors.prune_enabled'))->toBeFalse(); $display = collect(app(Schedule::class)->events()) ->map(fn ($event) => $event->getSummaryForDisplay()) ->implode("\n"); expect($display)->not->toContain('prune-online-visitor-index'); });