fix(ci): zerar thresholds CLI em report-only coverage jobs (close 25925328625)#228
fix(ci): zerar thresholds CLI em report-only coverage jobs (close 25925328625)#228adm01-debug wants to merge 1 commit into
Conversation
…rage + Edge Integration)
Os 2 steps `Run tests with coverage` (job Test Coverage) e `Generate
Coverage Report (JSON/HTML)` (job Edge Integration & Fuzzing) rodavam
`npx vitest run --coverage` sem override de thresholds. O
`vitest.config.ts` declara `thresholds: { lines: 60, functions: 60,
branches: 50, statements: 60 }` e o v8 provider sai com exit 1 sempre
que a cobertura real fica abaixo (atualmente lines=26.62%,
functions=32.47%, statements=26.62%) — derrubando o CI mesmo com 6395
testes passando.
Esses 2 jobs são report-only: existem para subir artifact JSON/HTML de
cobertura para inspeção pós-merge. Os gates de cobertura **reais** são
per-file e ficam em jobs dedicados (Cloud Status, Price Freshness, Hook
tests, Critical Flows E2E `check:critical-coverage`).
O job `price-freshness-tests` neste mesmo workflow já usa exatamente
esse padrão idiomático (`--coverage.thresholds.{lines,functions,
branches,statements}=0`); este PR estende para os outros 2 jobs
report-only, fechando a falha que vinha quebrando o CI há 3+ commits
(60d942f, 52710b8, a67deaf).
Mudanças mínimas — `.github/workflows/ci.yml` apenas, +18 −2 linhas, 0
testes alterados, 0 código de produção alterado. O `vitest.config.ts`
permanece com `thresholds: 60` para dev local e para qualquer job que
queira ativar o gate global no futuro.
Validação local da sintaxe (probe com `tests/lib/cn.test.ts`):
- sem overrides → 4 ERROR de threshold no output (exit 1)
- com overrides → output limpo, sem erros de threshold
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughO workflow de CI foi ajustado para padronizar os jobs de cobertura em modo "report-only". O job ChangesConfiguração de Coverage Report no Workflow CI
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutos 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsStopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a Comment |
There was a problem hiding this comment.
Pull request overview
Fixes CI failures in two report-only coverage jobs (Test Coverage and Edge Integration & Fuzzing) by zeroing the global coverage thresholds at the CLI level, since the real coverage gates are enforced per-file in other dedicated jobs.
Changes:
- Add
--coverage.thresholds.{lines,functions,branches,statements}=0overrides to theRun tests with coveragestep. - Apply the same overrides to
Generate Coverage Report (JSON/HTML)and convert the run line to multi-line YAML form. - Add explanatory comments clarifying that these are report-only steps and that real gates live elsewhere.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Fechando como redundante: descobri após investigação que o PR #227 (mergeado às 17:04 BRT, 14 minutos antes deste PR ser aberto) já aplicou byte-por-byte o mesmo fix de thresholds CLI nos 2 jobs report-only. Comparei
Confirmação de que o bug original foi corrigido: run 25931978144 no main HEAD passou com 11/11 jobs verdes, incluindo o Causa-raiz da duplicação: instâncias paralelas de Claude trabalhando no mesmo repo sem coordenação. O Branch será deletada. |
Problema
Job Edge Integration & Fuzzing vinha falhando no step
Generate Coverage Report (JSON/HTML)(run 25925328625, job 76213269690) com:Os testes passaram (341 test files / 6395 testes). O que derruba o job é o
thresholds: { lines: 60, functions: 60, branches: 50, statements: 60 }dovitest.config.tsaplicado pelo providerv8toda vez que--coverageestá ativo — independente do propósito do step.Mesma raiz no job Test Coverage (step
Run tests with coverage), também flagged como falhando há 3+ commits (60d942f, 52710b8, a67deaf).Por que esses 2 jobs não deveriam aplicar threshold global
Ambos são report-only: existem para subir artifact JSON/HTML de cobertura para inspeção pós-merge. Os gates de cobertura reais são per-file e ficam em jobs dedicados:
cloud-status-testsprice-freshness-testshooks-testscritical-e2e(Enforce Critical Coverage→npm run check:critical-coverage)Fix
Override CLI dos 4 thresholds (=0) só nesses 2 steps report-only. Padrão idiomático já em uso no job
price-freshness-testsdeste mesmoci.yml— este PR só estende para os outros 2 jobs report-only.Validação local
Probe com
tests/lib/cn.test.tsno VPS:ERROR: Coverage for ... does not meet global threshold ...no output (exit 1)Escopo
.github/workflows/ci.yml), +18 −2 linhasvitest.config.tspermanece comthresholds: 60para dev localNão corrigido (pendências pré-existentes confirmadas, NÃO regressão deste PR)
Remote migration versions not found...) — em andamento via PR fix(migrations): baseline_sync no-op + placeholder para versão 20250103 #222 baseline_syncgit remote -vdo VPS — deve ser revogado por segurançaSummary by cubic
Zeroed global coverage thresholds in report-only CI steps to stop false failures while preserving per-file and critical coverage gates. Coverage reports still upload as artifacts.
.github/workflows/ci.ymlto pass--coverage.thresholds.{lines,functions,branches,statements}=0tonpx vitest run --coveragein Test Coverage and Edge Integration & Fuzzing report steps.vitest.config.tsthresholds unchanged; real gates run per-file incloud-status-tests,price-freshness-tests,hooks-tests, andcritical-e2e.Written for commit 73bb7b5. Summary will update on new commits. Review in cubic
Summary by CodeRabbit