Ship production optimization M1-M12.5A: queues, metrics, HTTP observability, and vector search reliability.
Keep similar-ai from tripping the global circuit on a lone URL 502, clamp Qdrant search to 100, and add Server-Timing plus slow-request logging. Studio shared props, Academy S3 exists caching, heat chunking, and Redis/scheduler hygiene stay in this rollout.
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
|
||||
it('schedules flush-redis-stats away from leaderboards:refresh at minute 21', function () {
|
||||
$events = collect(app(Schedule::class)->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');
|
||||
});
|
||||
Reference in New Issue
Block a user