Skip to content

fix(ci/coderabbit): unblock review pipeline#86

Merged
adm01-debug merged 3 commits into
mainfrom
claude/review-merge-prs-2ps01
May 8, 2026
Merged

fix(ci/coderabbit): unblock review pipeline#86
adm01-debug merged 3 commits into
mainfrom
claude/review-merge-prs-2ps01

Conversation

@adm01-debug
Copy link
Copy Markdown
Owner

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

Summary

Quatro correções relacionadas ao desbloqueio da pipeline de review:

  1. .coderabbit.yamltone_instructions excedia o limite do schema (String must contain at most 250 character(s)). Reduzi para ~185 chars preservando os sinais críticos. CodeRabbit agora carrega o config (verificado: Configuration used: Path: .coderabbit.yaml).

  2. src/lib/retry.ts — o grep do Branch Protection Sentinel matava check-quality em todo PR porque encontrava console.log dentro de um JSDoc @example. Reescrevi o exemplo usando o logger do próprio arquivo e removi o import de dbFrom que só era usado pelo exemplo (também flagado pelo eslint).

  3. package.jsonprettier e prettier-plugin-tailwindcss estavam referenciados em .prettierrc mas ausentes em devDependencies, quebrando o husky pre-commit em qualquer staged *.ts/tsx. Adicionados.

  4. .github/workflows/security.yml — o commit 4c35285 ("Fast Visual Edit" do gpt-engineer-app[bot]) truncou o arquivo deixando YAML inválido: linha 2 era um bare ... (marcador de fim de documento), seguido de uma env-line órfã e um job rls-audit sem o pai jobs:. Reconstruí mesclando o gitleaks original (commit c32ba76) com o rls-audit que o gpt-engineer queria adicionar, e adicionei setup-bun@v1 no rls-audit pra que o bun scripts/... consiga rodar quando agendado.

Falhas de CI ainda esperadas (pré-existentes, fora deste PR)

  • test (ci.yml) — bun run lint retorna 1383 erros e 911 warnings em main. Dívida técnica: ~47 console, ~198 :any, unused vars, etc. Refactor amplo, não tractável aqui.
  • Analyze (codeql)continue-on-error: true no workflow, então não bloqueia merge mesmo falhando.

Test plan

  • CI run novo passar check-quality (após fix do grep + retry.ts)
  • Workflow de security parar de aparecer como inválido na aba Actions
  • Mergear → próximo PR no repo deve receber review do CodeRabbit usando nossas path_instructions (sem warning de parsing)
  • Verificar que husky pre-commit funciona localmente em uma alteração *.tsx

Próximos passos (separados deste PR)

  • Plano para os 12 PRs abertos com cautela nos majors (vite 5→8, typescript 5→6, eslint 9→10, react types 18→19) — revisar individualmente após CodeRabbit estar comentando linha-a-linha.
  • PR separado para a dívida do lint (1383 erros) — não tractável aqui.

https://claude.ai/code/session_016crk2XNP846FHdJo6cPEVR

Summary by CodeRabbit

Release Notes

  • Chores

    • Adicionadas ferramentas de desenvolvimento para formatação de código (Prettier e plugin Tailwind CSS).
  • Refactor

    • Melhorias internas em logging e tratamento de erros de retry.
    • Atualizações de configuração de CI/CD e guidelines de code review.

CodeRabbit was rejecting the config with "String must contain at most
250 character(s) at tone_instructions" and falling back to defaults,
disabling the project-specific review tone for every PR.

Trimmed the value to ~185 chars while preserving the critical signals
(secrets, SQL injection, unhandled promises, any without narrowing,
destructive ops without backup).

https://claude.ai/code/session_016crk2XNP846FHdJo6cPEVR
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2cbeb8c1-2410-4ab0-bce3-655ec5847de8

📥 Commits

Reviewing files that changed from the base of the PR and between 859dba5 and 4121e43.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock, !**/*.lock
📒 Files selected for processing (4)
  • .coderabbit.yaml
  • .github/workflows/security.yml
  • package.json
  • src/lib/retry.ts

Walkthrough

Este PR agrupa quatro tipos de mudanças: atualização de instruções de tone PT-BR para revisão de código, remoção de emojis em steps de workflow, integração de Prettier, e refatoração de logging e limpeza no módulo de retry com formatação de assinatura.

Changes

Atualizações Gerais e Refatoração

Layer / File(s) Summary
Dependências - Prettier
package.json
Adição de prettier@^3.8.3 e prettier-plugin-tailwindcss@^0.8.0 em devDependencies.
Refatoração - Retry Module
src/lib/retry.ts
Remoção do import não utilizado dbFrom, refatoração de logging para usar log.error e log.warn em linha única, reformatação de onRetry no exemplo de documentação, e conversão da assinatura de withNetworkRetry para declaração single-line sem alteração de tipos ou defaults.
Configuração - CodeRabbit e Workflow
.coderabbit.yaml, .github/workflows/security.yml
Atualização de tone_instructions com foco em direto PT-BR, críticos como "any sem narrowing" e "ops destrutivas sem backup"; remoção de emojis decorativos (📥, 📦, etc.) dos nomes de steps do job rls-audit, mantendo comandos e configurações de artefatos intactos.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/review-merge-prs-2ps01

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

Two pre-existing issues blocking commits and CI:

1. .prettierrc references prettier-plugin-tailwindcss but neither
   prettier nor the plugin are in devDependencies, so the husky
   pre-commit hook crashes for every staged TS/TSX file. Added both
   as devDependencies so the configured tooling actually runs.

2. The Branch Protection Sentinel grep was matching the console.log
   inside a JSDoc @example block in src/lib/retry.ts, failing the
   check-quality CI on every PR. Rewrote the example to use the
   file's existing logger and dropped the unused dbFrom import that
   the example was the only consumer of.

https://claude.ai/code/session_016crk2XNP846FHdJo6cPEVR
@adm01-debug adm01-debug changed the title fix(coderabbit): shorten tone_instructions to unblock review fix(coderabbit): unblock review + minor CI cleanups May 6, 2026
Commit 4c35285 ("Fast Visual Edit") truncated security.yml down to a
malformed YAML stub: line 2 was a bare `...` (document end marker), and
the gitleaks job had been replaced by an orphaned env line plus an
indentation-broken rls-audit job. The result was an invalid workflow
file in .github/workflows/, almost certainly contributing to GitHub
Actions misbehavior on every PR.

Reconstructed by:
- Restoring the original gitleaks job (Security Scan from c32ba76),
  keeping the new GITLEAKS_ENABLE_SUMMARY: "false" env intent.
- Renaming workflow to "Security & Compliance" as the broken edit
  intended.
- Re-adding the rls-audit job under jobs:, gated by
  github.event_name == 'schedule' || workflow_dispatch.
- Adding oven-sh/setup-bun@v1 to rls-audit so its bun-based script
  step can actually run (it was using `bun ...` without bun installed).
- Added workflow_dispatch: trigger so rls-audit is manually runnable.

YAML now validates with yaml.safe_load.

https://claude.ai/code/session_016crk2XNP846FHdJo6cPEVR
@adm01-debug adm01-debug changed the title fix(coderabbit): unblock review + minor CI cleanups fix(ci/coderabbit): unblock review pipeline May 6, 2026
@adm01-debug adm01-debug marked this pull request as ready for review May 8, 2026 16:27
Copilot AI review requested due to automatic review settings May 8, 2026 16:27
@adm01-debug adm01-debug merged commit 7b1f478 into main May 8, 2026
4 of 9 checks passed
@adm01-debug adm01-debug deleted the claude/review-merge-prs-2ps01 branch May 8, 2026 16:28
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

Here are some automated review suggestions for this pull request.

Reviewed commit: 4121e43a99

ℹ️ 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".

group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add the RLS compliance script before scheduling it

With this workflow restored under jobs:, the rls-audit job now runs on the scheduled/manual Security workflow, but its report step invokes bun scripts/verify_rls_compliance.ts; I checked the repository with git ls-files '*verify*rls*' '*rls*compliance*' 'scripts/*' and that script is not present. As a result, every weekly or manually dispatched security workflow will fail as soon as this job reaches the report step.

Useful? React with 👍 / 👎.

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

This PR aims to unblock the automated review/CI pipeline by fixing configuration and workflow breakages (CodeRabbit config schema, quality checks impacted by grep, missing formatter deps, and invalid security workflow YAML).

Changes:

  • Shortens .coderabbit.yaml tone_instructions to comply with the CodeRabbit schema limit.
  • Updates src/lib/retry.ts JSDoc example to avoid console.log (preventing sentinel grep failures) and removes the now-unused dbFrom import.
  • Adds missing prettier + prettier-plugin-tailwindcss devDependencies (and updates bun.lock accordingly).
  • Rebuilds .github/workflows/security.yml into valid YAML and adds an rls-audit scheduled job.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/lib/retry.ts Removes console.log from JSDoc example and drops unused import to avoid CI grep/eslint issues.
package.json Adds Prettier + Tailwind plugin to match existing .prettierrc config.
bun.lock Lockfile update for newly added devDependencies.
.github/workflows/security.yml Restores valid workflow structure; defines gitleaks scan and adds scheduled RLS audit job.
.coderabbit.yaml Reduces tone_instructions length to satisfy schema validation.

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

Comment on lines +53 to +55
- name: Generate RLS Report
run: bun scripts/verify_rls_compliance.ts > rls-compliance-report.md
- name: 📜 Publish Weekly Compliance
- name: Publish Weekly Compliance
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: npm install --no-audit --no-fund
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.

3 participants