From fbdde8468482ac9cb5bc6c9d3f30fdd509f6b33c Mon Sep 17 00:00:00 2001 From: Jordan Partridge Date: Thu, 2 Jul 2026 21:44:38 -0700 Subject: [PATCH] fix: skip duplicate detection when upserting daily digest Digests are intentionally similar day-over-day, so the default similarity check throws DuplicateEntryException on consecutive active days and fails the nightly synthesis run. The existence check by title/date above already prevents true duplicates. --- app/Commands/SynthesizeCommand.php | 2 +- tests/Feature/Commands/SynthesizeCommandTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Commands/SynthesizeCommand.php b/app/Commands/SynthesizeCommand.php index 262cc71..dd6f018 100644 --- a/app/Commands/SynthesizeCommand.php +++ b/app/Commands/SynthesizeCommand.php @@ -193,7 +193,7 @@ private function runDigest(QdrantService $qdrant, bool $dryRun, string $project) 'priority' => 'medium', 'confidence' => 85, 'status' => 'validated', - ], $project); + ], $project, checkDuplicates: false); info("Digest created for {$today}"); diff --git a/tests/Feature/Commands/SynthesizeCommandTest.php b/tests/Feature/Commands/SynthesizeCommandTest.php index 1e9db86..f6f4dc0 100644 --- a/tests/Feature/Commands/SynthesizeCommandTest.php +++ b/tests/Feature/Commands/SynthesizeCommandTest.php @@ -139,7 +139,7 @@ ->once() ->with(Mockery::on(fn ($data): bool => str_contains((string) $data['title'], 'Daily Synthesis - 2026-02-03') && $data['status'] === 'validated' - && in_array('daily-synthesis', $data['tags'])), 'default') + && in_array('daily-synthesis', $data['tags'])), 'default', false) ->andReturn(true); $this->artisan('synthesize', ['--digest' => true]) @@ -307,7 +307,7 @@ $this->qdrantMock->shouldReceive('upsert') ->once() - ->with(Mockery::type('array'), 'homelab') + ->with(Mockery::type('array'), 'homelab', false) ->andReturn(true); $this->qdrantMock->shouldReceive('scroll')