From 77bc309c71977ec24c27643062a950931f6aca25 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Sirois Date: Tue, 24 Mar 2026 00:08:39 +0400 Subject: [PATCH] fix: use deduplicated query count in PR comment queryStats.total was counting every log entry before deduplication and filtering, causing the PR comment to show a higher number than the app. Override it with the actual buildQueries() output length so both match. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/main.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.ts b/src/main.ts index 7e032c8..794e217 100644 --- a/src/main.ts +++ b/src/main.ts @@ -51,6 +51,12 @@ async function runInCI( const queries = buildQueries(allResults, config); + // Align PR comment total with the actual queries sent to the site API + reportContext.queryStats = Object.freeze({ + ...reportContext.queryStats, + total: queries.length, + }); + // POST to Site API first so we get the run ID for the PR comment link let runId: string | null = null; if (siteApiEndpoint) {