Skip to content

fix(smoke): remove 7 rotas publicas mortas do REQUIRED_ROUTES#94

Merged
adm01-debug merged 1 commit into
mainfrom
fix/smoke-tests-rotas-removidas
May 8, 2026
Merged

fix(smoke): remove 7 rotas publicas mortas do REQUIRED_ROUTES#94
adm01-debug merged 1 commit into
mainfrom
fix/smoke-tests-rotas-removidas

Conversation

@adm01-debug
Copy link
Copy Markdown
Owner

@adm01-debug adm01-debug commented May 8, 2026

Contexto

As 7 rotas publicas com token foram removidas do App.tsx no commit 0bc97759b (Fase 1 da auditoria). Mas o scripts/smoke-tests.mjs nao foi atualizado nesse commit, entao o smoke check de CI falha desde entao verificando rotas inexistentes.

O que muda

scripts/smoke-tests.mjs: remove 7 entries do array REQUIRED_ROUTES:

  • /approve/:token
  • /proposta/:token
  • /kit/:token
  • /lista-publica/:token
  • /colecao-publica/:token
  • /comparar-publica/:token
  • /dossie/:token

Resultado: REQUIRED_ROUTES reflete o que de fato existe em App.tsx.

Validacao local

$ node scripts/smoke-tests.mjs
Smoke tests - Promo Gifts CI
ok   static-routes: 7 rotas criticas declaradas
warn health-fn: SMOKE_HEALTH_FN_URL nao configurada - pulando
warn public-routes: SMOKE_BASE_URL nao configurada - pulando HTTP
Smoke tests finalizados em 1ms - 1 ok / 2 warn / 0 fail

Os 2 warns sao porque envvars nao estao setadas em ambiente local; em CI elas estao e os checks rodam normalmente.

Tamanho

1 arquivo, -7 linhas.

Refs

  • Auditoria F1-6.x
  • Commit que originou o bug: 0bc97759b

Summary by CodeRabbit

  • Chores
    • Updated smoke test validation to focus on critical routes, simplifying test coverage requirements.

As rotas /approve/:token, /proposta/:token, /kit/:token,
/lista-publica/:token, /colecao-publica/:token, /comparar-publica/:token
e /dossie/:token foram removidas do App.tsx no commit 0bc9775.

O scripts/smoke-tests.mjs nao foi atualizado nesse commit, entao o smoke
test falhou desde entao em CI verificando rotas que nao existem mais.

Apos este fix, REQUIRED_ROUTES contem apenas as 7 rotas que de fato
existem em App.tsx (validado contra o estado atual da main).

Validacao local:
  node scripts/smoke-tests.mjs
  -> exit 0
  -> 1 ok / 2 warn (vars de ambiente nao setadas, esperado em local)
  -> 0 fail

Refs: F1-6.x (post-cleanup das 7 rotas publicas)
Copilot AI review requested due to automatic review settings May 8, 2026 02:00
@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
promo-gifts Ready Ready Preview, Comment May 8, 2026 2:01am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 8, 2026

Review Change Stack

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: String must contain at most 250 character(s) at "tone_instructions"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: 85c863f8-fa0c-48f6-872b-8c9a012f0ea9

📥 Commits

Reviewing files that changed from the base of the PR and between f288c6a and 34e7e6d.

📒 Files selected for processing (1)
  • scripts/smoke-tests.mjs
💤 Files with no reviewable changes (1)
  • scripts/smoke-tests.mjs

📝 Walkthrough

Walkthrough

This PR narrows the smoke test script's static-route validation by removing seven lines from the REQUIRED_ROUTES constant in scripts/smoke-tests.mjs. Several previously required public routes (approval, proposta, kit, lista-publica, colecao-publica, comparar-publica, dossie) are no longer validated as static declarations in src/App.tsx.

Changes

Smoke Test Configuration

Layer / File(s) Summary
Route Validation Scope
scripts/smoke-tests.mjs
REQUIRED_ROUTES constant reduced by removing seven tokenized public routes from the static-route check. Health-check and public-route checks remain unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A rabbit hops through smoke tests fine,
Routes trimmed from the old design,
Seven paths now left behind,
Validation lighter, simpler—divine!


Note

🎁 Summarized by CodeRabbit Free

Your organization has reached its limit of developer seats under the Pro Plan. For new users, CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please add seats to your subscription by visiting https://app.coderabbit.ai/login.If you believe this is a mistake and have available seats, please assign one to the pull request author through the subscription management page using the link above.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Atualiza o smoke test de CI para parar de validar 7 rotas públicas por token que já não existem mais no roteador (src/App.tsx), eliminando falhas falsas no pipeline.

Changes:

  • Remove 7 entradas obsoletas do array REQUIRED_ROUTES em scripts/smoke-tests.mjs.
  • Faz o check estático de rotas refletir apenas as rotas críticas ainda declaradas em src/App.tsx.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

// Rotas declaradas obrigatórias em App.tsx (asserção estática, sempre roda)

P1 Badge Keep smoke coverage for generated public links

Removing these public-token routes from REQUIRED_ROUTES hides a live user-facing breakage: the app still generates and copies URLs under these paths, e.g. ShareListDialog builds /lista-publica/${list.shared_token}, ShareCollectionDialog builds /colecao-publica/..., and ShareComparisonDialog builds /comparar-publica/.... Since those routes are no longer declared in App.tsx, users who use the share dialogs get links that fall through to the 404; the smoke test should keep failing until the remaining link generators are removed/disabled or the routes are restored.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@adm01-debug adm01-debug merged commit 5a3c7f5 into main May 8, 2026
12 of 20 checks passed
@adm01-debug adm01-debug deleted the fix/smoke-tests-rotas-removidas branch May 8, 2026 02:13
adm01-debug added a commit that referenced this pull request May 8, 2026
CONTEUDO
========
1. docs/AUDITORIA_2026-05-07.md atualizado:
   - Status Fase 1: 12/15 (80%) -> 16/19 (84%)
   - Adicionada secao 1.7 Paginas orfas (F1-7.1 a F1-7.12)
   - Adicionada secao 1.8 Quick-wins infra (F1-8.1 a F1-8.5)
   - Changelog v1.3 com sumario dos 4 PRs

2. docs/HANDOFF-2026-05-07-SESSAO-NOITE.md NOVO:
   - Handoff suplementar pra proxima instancia
   - Resumo: o que foi feito, o que ficou versionado
   - Achados bonus pendentes (F1-7.11, F1-7.12)
   - Estado atual dos gates (validar no inicio da proxima sessao)
   - Checklist de primeira acao
   - Proximas opcoes estrategicas

CONTEXTO
========
Sessao de noite mergeou 4 PRs em sequencia consertando infra de CI
e fazendo a primeira faxina propriamente dita:
- PR #94 (5a3c7f5) fix smoke-tests
- PR #95 (dd33143) regenera baseline ESLint, versiona F5-3.3
- PR #96 (9402fda) alinha pre-push hook, versiona F5-3.5
- PR #97 (741af39) deleta 4 paginas orfas (-1139 linhas)

GOVERNANCA
==========
Mudanca Pequena (2 arquivos, ~200 linhas) -> merge direto na main.
Atende ao pedido do Joaquim: 'deixe bem documentado o que ja
fizemos, assim se eventualmente o chat chegar em seu limite, o
proximo agente Claude vai conseguir continuar a faxina'.

REFS
====
- F1-7, F1-8, F5-3.3, F5-3.5 versionadas
- Sessao da tarde: docs/HANDOFF-2026-05-07.md (intacto)
- Sessao de noite: docs/HANDOFF-2026-05-07-SESSAO-NOITE.md (NOVO)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants