[CLOSED] Claude/faxina rebased 2026-05-22 — superseded, deletes regenerated audit/internal-schema.tsv#160
Conversation
- AUDITORIA_REDEPLOY_PROMO_GIFTS_2026-05-13_15-32 (1).md was a stale browser-download duplicate (note the " (1)" suffix); no consumers. - src/test/setup.ts was orphan — vitest.config.ts uses tests/setup.ts. https://claude.ai/code/session_01NMu9Cm7yXR5agyBFxvLgP4
audit/db-frontend-coverage.json (9.7k lines) and audit/internal-schema.tsv (1.5k lines) are local audit outputs. .gitignore already declared the intent — "Outputs de auditoria/triage — gerados localmente, não devem versionar" — but these two slipped through. Adds explicit patterns and removes them from the index (filesystem copies retained for local devs). The hand-authored audit/ANALISE_BACKEND_SENIOR_2026-05-22.md stays tracked. https://claude.ai/code/session_01NMu9Cm7yXR5agyBFxvLgP4
build:dev was running "node scripts/generate-health.mjs && vite build", but the script does not exist anywhere in git history reachable from this branch — so npm run build:dev failed immediately. No code reads the public/api/health.json the script was meant to emit, so removing the reference is safe. Also drops the orphan .gitignore entry that paired with the missing script. https://claude.ai/code/session_01NMu9Cm7yXR5agyBFxvLgP4
tests/e2e/ contained 40+ test files plus committed runtime artifacts that were never executing: - 9 specs use @playwright/test but playwright.config.ts uses testDir:'./e2e' (not tests/e2e) — never picked up. - 31 are vitest files but vitest.config.ts explicitly excluded 'tests/e2e/**' to avoid a worker deadlock from accidentally loading the Playwright files alongside them — so these never ran either. - artifacts/ subtree was generated HTML/JSON snapshots checked in by past test runs. Nothing outside tests/e2e/ referenced anything inside it (only vitest's own exclude pattern + its explanatory comment). Baselines have zero entries for this path, so no baseline churn. Drops the now-unnecessary exclude entry from vitest.config.ts. https://claude.ai/code/session_01NMu9Cm7yXR5agyBFxvLgP4
- scripts/generate-theme-report.ts — superseded duplicate of scripts/generate-theme-report.mjs (the .mjs is what e2e/theme-validation.spec.ts and package.json:test:theme-validation actually invoke). - scripts/test-external-db.ts — strict subset of scripts/verify-external.ts (same purpose, smaller assertion set). Both files were unreferenced by package.json, scripts, configs, CI, or docs. Other unreferenced dev utilities (CORS codemods, list-users) are intentionally kept as ad-hoc manual tools. https://claude.ai/code/session_01NMu9Cm7yXR5agyBFxvLgP4
src/hooks/stock/index.ts contained only a single-line comment with no exports. Zero importers across src/ and tests/. Removing the dead barrel file keeps the directory clean (stockAlerts.ts and stockFetcher.ts import each other and from src/hooks/products/ directly, not via the barrel). https://claude.ai/code/session_01NMu9Cm7yXR5agyBFxvLgP4
generateKitOgImage was only referenced by .lovable/memory feature notes pointing at a PublicKitViewPage that does not exist in this codebase. Verified zero imports (static or dynamic) anywhere in src/, tests/, e2e/, and supabase/. Safe to remove. https://claude.ai/code/session_01NMu9Cm7yXR5agyBFxvLgP4
Zero importers (static or dynamic) anywhere in src/, tests/, e2e/, or supabase/. The active kit PDF export logic — if any — lives elsewhere; this file was dead. https://claude.ai/code/session_01NMu9Cm7yXR5agyBFxvLgP4
The eslint baseline gate (.eslint-baseline.json, 2026-05-14) is unaware
of two lint errors introduced into main by later commits, so any new
push triggers them as "new":
- src/contexts/AuthContext.test.tsx:38 — @typescript-eslint/
consistent-type-imports flagged \`typeof import('@/services/authService')\`
inside a vi.mock importOriginal call. Hoisted the module type as a
type-only \`import type * as AuthServiceModule\` and used
\`typeof AuthServiceModule\`.
- src/tests/AdminLayout.test.tsx:58 — @typescript-eslint/no-explicit-any
flagged \`cb?: any\` inside a then() supabase-client mock. Replaced
with the concrete callback signature \`(value: { data: never[]; error: null }) => void\`.
Neither file was touched semantically; both were blocking pre-push only
because the baseline predates the upstream churn.
https://claude.ai/code/session_01NMu9Cm7yXR5agyBFxvLgP4
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (64)
WalkthroughPR remove sistematicamente testes E2E, utilitários de geração (PDF/OG-image), scripts de validação, setup de teste e documentação de auditoria. Reajusta ChangesLimpeza de testes e utilitários
Nota sobre removals em massa (sem ranges capturados em detalhe): O diff remove integralmente estes arquivos conforme
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Justificativa: Embora o volume de linhas removidas seja alto (~5700 linhas), a natureza é predominantemente remoção homogênea (testes e artefatos). A lógica essencial mudou pouco: reconfiguração de vitest.config e .gitignore. Impacto: verifica-se se remoções são intencionais (depreciação de E2E?), se há dependências quebradas e se secrets/dados sensíveis não ficaram em branches de release. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@copilot resolve the merge conflicts in this pull request |
There was a problem hiding this comment.
Pull request overview
This PR primarily cleans up legacy/orphaned “E2E” test files (previously living under tests/e2e/**), removes a few unused utilities/scripts, and simplifies local/dev build/test configuration after the rebase.
Changes:
- Removed the
tests/e2e/**tree (Vitest-based “E2E” suites and some Playwright leftovers) and updated Vitest config accordingly. - Deleted unused kit PDF/OG image helpers and a couple of obsolete scripts/artifacts.
- Simplified
build:devand updated.gitignorefor new audit outputs.
Reviewed changes
Copilot reviewed 66 out of 68 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| vitest.config.ts | Drops the tests/e2e/** exclusion now that the folder is removed. |
| src/tests/AdminLayout.test.tsx | Formatting/typing tweaks for mocks and test strings. |
| src/contexts/AuthContext.test.tsx | Refactors mock typing for importOriginal (currently introduces a TS type issue). |
| package.json | Removes scripts/generate-health.mjs from build:dev. |
| .gitignore | Stops ignoring the old health output path; adds audit output ignores. |
| tests/e2e/** (deleted) | Removes legacy “E2E” test suites (Vitest + some Playwright) and artifacts under tests/e2e. |
| src/utils/kitPdfGenerator.ts (deleted) | Removes unused kit PDF generator utility. |
| src/lib/kit-og-image.ts (deleted) | Removes unused OG image generator utility. |
| scripts/test-external-db.ts (deleted) | Removes obsolete external DB connectivity test script. |
| scripts/generate-theme-report.ts (deleted) | Removes old TS version of theme report generator (repo uses .mjs). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| vi.mock('@/services/authService', async (importOriginal) => { | ||
| const actual = await importOriginal<typeof import('@/services/authService')>(); | ||
| const actual = await importOriginal<typeof AuthServiceModule>(); | ||
| return { |
…-2026-05-22 # Conflicts: # audit/internal-schema.tsv # docs/historico/AUDITORIA_REDEPLOY_PROMO_GIFTS_2026-05-13_15-32.md # src/tests/AdminLayout.test.tsx # tests/e2e/compare-exhaustive.test.tsx # tests/e2e/compare-module.test.tsx # tests/e2e/compare-ultra.test.tsx # tests/e2e/compare-viewer-a11y.test.tsx # tests/e2e/compare-visual.test.tsx # tests/e2e/new-quote-advanced.test.tsx # tests/e2e/new-quote-cycle.test.tsx # tests/e2e/new-quote-exhaustive.test.tsx # tests/e2e/new-quote-full-audit.test.tsx # tests/e2e/new-quote-resilience.test.tsx
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Conflitos resolvidos e branch atualizada com Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
No issues found across 65 files
You’re at about 90% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Gate check:toast-leaks estava VERMELHO no main (78 "novas" ocorrências).
Causa: keyOf = ${file}::${line}; baseline de 2026-05-18 ficou desalinhado
após a faxina #160 (2026-05-23, -21.877 linhas) deslocar os números de
linha. Das 78: 13 drift puro de linha + restantes de 27 arquivos de
features pós-18/05 (kit-builder, intelligence, permissions, CRM, etc.).
Nenhuma introduzida pelas Etapas 9-13.
Regenera via UPDATE_BASELINE=1 (procedimento documentado no script).
176->173 entries: a #160 removeu mais toasts técnicos (código morto)
do que features novas adicionaram. check:toast-leaks volta a VERDE.
Validado contra main 80da684 (pós #176/#177): gate VERDE, 0 novas.
Divida registrada: os 173 toasts usam error.message cru — limpeza
retroativa fica como backlog dedicado.
Gate check:toast-leaks estava VERMELHO no main (78 "novas" ocorrências).
Causa: keyOf = ${file}::${line}; baseline de 2026-05-18 ficou desalinhado
após a faxina #160 (2026-05-23, -21.877 linhas) deslocar os números de
linha. Das 78: 13 drift puro de linha + restantes de 27 arquivos de
features pós-18/05 (kit-builder, intelligence, permissions, CRM, etc.).
Nenhuma introduzida pelas Etapas 9-13.
Regenera via UPDATE_BASELINE=1 (procedimento documentado no script).
176->173 entries: a #160 removeu mais toasts técnicos (código morto)
do que features novas adicionaram. check:toast-leaks volta a VERDE.
Validado contra main 80da684 (pós #176/#177): gate VERDE, 0 novas.
Divida registrada: os 173 toasts usam error.message cru — limpeza
retroativa fica como backlog dedicado.
Fechado — branch obsoleto e destrutivo
Este PR de faxina (−21.877 linhas, 65 arquivos removidos) inclui a deleção de
audit/internal-schema.tsv, que foi regenerado no commit8e527e31(PR #158, merged) com 278 tabelas atualizadas do banco vivo (vs 139 tabelas do snapshot antigo).Motivos do fechamento:
status=removedemaudit/internal-schema.tsv— reverteria o entregável MELHORIAS #158 (278→0 tabelas)diverged(ahead 11, behind 13 do main) — conflito irreconciliável sem rebase manualdraft=true, sem aprovação humana, sem reviewers atribuídosSe a faxina for necessária, reabrir com branch rebased no main atual e excluindo
audit/internal-schema.tsvescripts/gen-internal-schema.mjsdo diff.