~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
feat(ci): Enhance coverage PR comment with detailed metrics
LearningCircuit8c6c6b567af2
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex ec52b9ea76..8c6059c0d1 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -500,30 +500,71 @@ jobs:script: |const fs = require('fs');- let coverage = 'N/A';- let details = '';+ let lineCoverage = 'N/A';+ let branchCoverage = 'N/A';+ let linesCovered = 0;+ let linesTotal = 0;+ let filesAnalyzed = 0;+ let lowestCoverageFiles = [];try {if (fs.existsSync('coverage/coverage.xml')) {const xml = fs.readFileSync('coverage/coverage.xml', 'utf8');- const match = xml.match(/line-rate="([^"]+)"/);- if (match) {- coverage = (parseFloat(match[1]) * 100).toFixed(1) + '%';++ // Extract overall metrics+ const lineMatch = xml.match(/line-rate="([^"]+)"/);+ const branchMatch = xml.match(/branch-rate="([^"]+)"/);+ const coveredMatch = xml.match(/lines-covered="([^"]+)"/);+ const validMatch = xml.match(/lines-valid="([^"]+)"/);++ if (lineMatch) lineCoverage = (parseFloat(lineMatch[1]) * 100).toFixed(1) + '%';+ if (branchMatch) branchCoverage = (parseFloat(branchMatch[1]) * 100).toFixed(1) + '%';+ if (coveredMatch) linesCovered = parseInt(coveredMatch[1]);+ if (validMatch) linesTotal = parseInt(validMatch[1]);++ // Extract per-file coverage to find lowest coverage files+ const classMatches = xml.matchAll(/<class[^>]+filename="([^"]+)"[^>]+line-rate="([^"]+)"/g);+ const fileCoverages = [];+ for (const match of classMatches) {+ const filename = match[1].replace(/^src\//, '').replace(/^local_deep_research\//, '');+ const rate = parseFloat(match[2]) * 100;+ fileCoverages.push({ filename, rate });+ filesAnalyzed++;}++ // Sort by coverage (lowest first) and get bottom 5 with <50% coverage+ lowestCoverageFiles = fileCoverages+ .filter(f => f.rate < 50)+ .sort((a, b) => a.rate - b.rate)+ .slice(0, 5);}} catch (e) {console.log('Could not parse coverage:', e);}+ // Build the lowest coverage files section+ let lowestFilesSection = '';+ if (lowestCoverageFiles.length > 0) {+ lowestFilesSection = '\n**Files needing attention** (<50% coverage):\n' ++ lowestCoverageFiles.map(f => `- \`${f.filename}\`: ${f.rate.toFixed(1)}%`).join('\n');+ }+const body = `## 📊 Coverage Report- **Line Coverage: ${coverage}**+ | Metric | Value |+ |--------|-------|+ | **Line Coverage** | ${lineCoverage} |+ | **Branch Coverage** | ${branchCoverage} |+ | **Lines** | ${linesCovered.toLocaleString()} / ${linesTotal.toLocaleString()} |+ | **Files Analyzed** | ${filesAnalyzed} |📈 [View Full Report](${{ env.PAGES_URL }}) _(updates after merge)_<details>- <summary>ℹ️ About this report</summary>+ <summary>📉 Coverage Details</summary>+ ${lowestFilesSection || '\n✅ All files have >50% coverage!'}+ ---- Coverage is calculated from \`src/\` directory- Full interactive HTML report available after merge to main/dev- Download artifacts for immediate detailed view