Repository navigation
chore(tests): revive 51 vitest files parked behind a closed tracker (#13204) - #13233
Merged
diegosouzapw merged 4 commits intoSep 14, 2026
Merged
Conversation
Of the 62 files excluded from Vitest with the comment '// #8618 — pre-existing failure; remove this exclusion when fixed', 51 pass against the current tree with no source change: the exclusions outlived the failures that justified them. #8618 was closed on 2026-08-11 while the list it tracked grew from 45 to 62 entries, so every later exclusion inherited a comment pointing at a dead issue and nobody revisited any of them. Each file was measured on its own before being re-enabled, and the full suite was run before and after. The 51 revived files do not appear in the failure list of either run. The 11 that still fail keep their exclusion and now reference #13204, the live tracker, so the next reader is pointed somewhere real. Known trade-off, stated rather than hidden: the blocking suite grows from 325 to 376 files (+372 tests, ~17%). That extra parallel load pressures the tests that already fail intermittently under a loaded full-suite run on the base (compression*, lobe-provider-icons-stepfun, resilience-connections, orchestrationHistoryTab). Those pass 25/25 in isolation with this config applied, so this change does not break them logically — it raises the load that already tips them over. They belong to the base-red family tracked by #12732. Refs #13204
check:vitest-exclusions — a file in vitest.config.ts's exclude list is a test that does not run, indistinguishable from one that does not exist except that it looks like coverage. 62 files accumulated behind '// #8618 — pre-existing failure', while #8618 itself was closed on 2026-08-11 and the list grew from 45 to 62. The gate requires every exclusion to name a tracker and to appear in config/quality/vitest-exclusions.json with its measured status, so growth is a reviewable diff in a dedicated file. It does not re-run the tests — that is a periodic job, and the inventory records when each was last measured. check-new-key-coverage — sibling of check-ui-value-drift. That one catches a rewritten English value leaving stale translations; this one catches a new English key that some locales never received. check-ui-keys-coverage cannot: it is a percentage floor per locale, and 11 absent keys out of ~13,000 leaves it at 99.9%. Proven retroactively against the real incident — with BASE_REF set before the Phase 3 merge it flags all 11 canvas keys across exactly the nine EU locales that missed them, plus 3 keys from other features with the same problem. Both are diff-aware against the merge base, so pre-existing gaps stay frozen and neither needed a migration. Both wired into ci.yml and documented in docs/architecture/QUALITY_GATES.md, with 14 tests covering the pure cores. Refs #13204
…ve-excluded-vitest-tests
# Conflicts: # docs/architecture/QUALITY_GATES.md
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…heaper-inference#13204) (cheaper-inference#13233) Merged after reconciling against the tip. `docs/architecture/QUALITY_GATES.md` conflicted: this PR adds the `check:vitest-exclusions` row while the tip had meanwhile rewritten the `check:model-lifecycle` description (cheaper-inference#12535). Resolved to the tip's table plus the new row. - `check:vitest-exclusions`: OK, 11 excluded files, each tracked and referenced - ESLint over the changed files: exit 0 - `npm run test:vitest` (the config this PR edits): 472 of 473. The one red, `tests/unit/autoCombo/provider-family-combos.test.ts`, is not touched by this PR and passes 11/11 in isolation on both this branch and the pure tip — a load flake from the full run, not a regression.⚠️ base-red inherited: cheaper-inference#12732
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reativa 51 arquivos de teste que estavam excluídos do Vitest, devolvendo ~350 asserções à suíte bloqueante. Resolve a maior parte da #13204.
O problema
vitest.config.tsexcluía 62 arquivos existentes, quase todos com o mesmo comentário:A #8618 foi fechada em 2026-08-11. A lista que ela rastreava não parou de crescer — foi de 45 para 62 entradas depois disso, cada exclusão nova herdando um comentário que aponta para uma issue morta. Ninguém revisitou nenhuma, porque não há gate que detecte exclusão sem rastreador vivo, e um teste excluído é indistinguível de um teste que não existe.
O que a medição mostrou
Rodei os 62 arquivos um a um antes de mexer em qualquer coisa:
Ou seja: as exclusões sobreviveram às falhas que as justificavam. A maioria era dívida fóssil.
Os 11 que ainda falham continuam excluídos, mas agora apontam para a #13204 — um rastreador vivo — em vez da #8618.
Verificação
better-sqlite3estava ausente e que medição local de teste com banco não era confiável. Está errado — o driver carrega viaprebuilds/linux-x64.node; o que não existe ébuild/Release/better_sqlite3.node, que é caminho de compilação, não de runtime. Conferido comnode -e "require('better-sqlite3')".Trade-off, declarado em vez de escondido
A suíte bloqueante cresce de 325 para 376 arquivos (+372 testes, ~17%). Essa carga paralela extra pressiona os testes que já falham de forma intermitente numa execução completa carregada na base:
compression*,lobe-provider-icons-stepfun,resilience-connections,orchestrationHistoryTab.Esses arquivos passam 25/25 isolados com esta config aplicada, então a mudança não os quebra logicamente — ela aumenta a carga que já os derruba. Pertencem à família de base-red rastreada pela #12732 e não são consertados aqui.
Se o mantenedor preferir reduzir o risco antes de absorver os 51 de uma vez, dá para fatiar em lotes; a medição por arquivo está na #13204 e permite escolher qualquer subconjunto.
Refs #13204
Atualização: os dois gates que faltavam entraram nesta PR
O item 2 da #13204 — um gate que reprove exclusão sem rastreador vivo — estava fora do escopo inicial. Entrou, junto de um irmão que fecha a outra cegueira encontrada na mesma auditoria.
check:vitest-exclusionsexige que toda exclusão que resolve para um arquivo real (a) cite uma issue e (b) apareça emconfig/quality/vitest-exclusions.jsoncom seu status medido. Adicionar uma exclusão passa a ser um diff revisável em arquivo dedicado, em vez de mais uma linha perdida num array de 60. Deliberadamente não re-roda os testes excluídos — custa ~10 min e é trabalho de job periódico; o inventário registra a data da última medição.check-new-key-coverageexige que uma chave nova noen.jsonchegue a todos os locales. Irmão docheck-ui-value-drift: aquele pega valor em inglês reescrito deixando tradução velha; este pega chave adicionada que algum locale nunca recebeu. Ocheck-ui-keys-coveragenão consegue — é piso percentual por locale, e 11 chaves ausentes em ~13.000 deixa a cobertura em 99,9%.Prova retroativa contra o incidente real, com
BASE_REFapontando para antes do merge da Fase 3:Pega as 11 chaves nos exatos 9 locales que as perderam — e revelou mais 3 chaves de outras features com o mesmo problema.
Ambos são diff-aware contra o merge base, então dívida pré-existente fica congelada e nenhum dos dois precisou de migração para ser ligado. Ligados no
ci.yml, documentados emdocs/architecture/QUALITY_GATES.md, com 14 testes cobrindo os núcleos puros.