• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Freegle / Iznik / 11274

08 May 2026 10:19AM UTC coverage: 72.782% (+3.9%) from 68.914%
11274

push

circleci

edwh
fix(batch): fix dry-run bugs and consolidate service naming

- PurgeMessagesCommand: return early in --dry-run (was calling services with dryRun=true)
- UpdateModMailsCommand: fix dry-run output string to match test expectation
- Consolidate MessageDeindexService + MessageIndexUnindexedService → MessageSearchService (int returns)
- Rename MessageSpatialIndexService → MessageSpatialService (int return from updateSpatialIndex)
- Add ChatExpectedService::updateChatExpected() orchestrator method
- Rename IndexUnindexedCommand signature: messages:index-unindexed → messages:update-index
- Update all dependent commands and tests to use renamed classes
- Delete superseded service classes and test files

All 1988 Laravel tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

13674 of 20604 branches covered (66.37%)

Branch coverage included in aggregate %.

38 of 46 new or added lines in 9 files covered. (82.61%)

1 existing line in 1 file now uncovered.

101061 of 137039 relevant lines covered (73.75%)

22.52 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/iznik-batch/app/Console/Commands/Chat/UpdateChatExpectedCommand.php
1
<?php
2

3
namespace App\Console\Commands\Chat;
4

5
use App\Services\ChatExpectedService;
6
use App\Traits\GracefulShutdown;
7
use App\Traits\LogsBatchJob;
8
use Illuminate\Console\Command;
9
use Illuminate\Support\Facades\Log;
10

11
class UpdateChatExpectedCommand extends Command
12
{
13
    use GracefulShutdown, LogsBatchJob;
14

15
    protected $signature = 'chats:update-expected
16
                            {--dry-run : Show what would be done without actually changing}';
17

18
    protected $description = 'Update chat reply-expectation tracking and per-user reply-time metrics';
19

20
    public function handle(ChatExpectedService $service): int
×
21
    {
22
        $this->registerShutdownHandlers();
×
23

24
        $dryRun = $this->option('dry-run');
×
25

26
        if ($dryRun) {
×
27
            $this->info('DRY RUN — no changes will be made.');
×
28

29
            return Command::SUCCESS;
×
30
        }
31

32
        return $this->runWithLogging(function () use ($service) {
×
33
            Log::info('Starting chat expected update');
×
34

NEW
35
            $stats = $service->updateChatExpected();
×
36

NEW
37
            $this->info("Cleared replyexpected for {$stats['deleted_cleared']} deleted-user messages, {$stats['spam_cleared']} spam messages.");
×
UNCOV
38
            $this->info("Expected update: {$stats['waiting']} waiting, {$stats['received']} received.");
×
39

NEW
40
            Log::info('Chat expected update complete', $stats);
×
41

42
            return Command::SUCCESS;
×
43
        });
×
44
    }
45
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc