docs(p1): números reais em README/EDGE_FUNCTIONS/DEPLOYMENT/POLICIES — DOC-001#74
Conversation
…— DOC-001 Fix do achado DOC-001 da auditoria back-end sênior 2026-05-22. Antes/Depois: | Doc | Valor antigo | Valor real | |---|---|---| | README "Edge Functions" | 47 | 81 | | README "migrations" | 205 | ~710 arquivos / ~685 aplicadas | | README "tabelas com RLS" | 35+ | 269 (100%) | | DEPLOYMENT "drift" | 332 vs 209 / interseção zero | ~710 vs ~685 / drift ~25 | | EDGE_FUNCTIONS header | "50 funções ativas, 2026-04-17" | "81 funções, 24 verify_jwt=false" | | 04_EXPLICACAO_POLICIES | "80+ policies" | "~662 policies em 269 tabelas" | Aponta para o relatório de auditoria como fonte primária do inventário completo (audit/ANALISE_BACKEND_SENIOR_2026-05-22.md, mergeado via #55). https://claude.ai/code/session_011Lgxm1NZGmAztRSvZHX9U3
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Pulls main updates including SEC-016 CSP, OPS-002 rate-limit, contract tests pipeline, P1 DB hardening, and storage hardening (PRs #71-#74). This merge introduces 2 new ESLint violations on main HEAD that were landed without updating the baseline. The follow-up commit absorbs them so this PR's gate can evaluate only its own drift.
Two new ESLint violations landed on main since this branch started (PRs #71-#74) without an accompanying baseline update: - src/contexts/AuthContext.test.tsx:38 — consistent-type-imports (error) - src/tests/AdminLayout.test.tsx:58 — no-explicit-any (warning) CI runs the lint gate against the merge of this branch into main, so the gate fails on every PR until main's drift is absorbed. Refreshing the baseline here so this PR's gate evaluates only its own delta. Also captures the positive drift this PR's changes produce: - useKitBuilderQueries.ts: -2 no-console (console.info → logger.info) - OptimizedImage.tsx: -1 no-explicit-any (pre-existing positive drift) Net totalErrors stays at 473 (warnings shift, errors stay flat).
Same pattern as the ESLint baseline absorb: main pushed multiple PRs without refreshing the TSC baseline, so this PR's gate flags 238 new file:rule pairs that aren't this PR's fault. Net: 1262 → 1373 errors. All drift comes from main (PRs #45, #57, #71-#74 introducing personalization-manager features, contracts module, and storage/db hardening migrations). The drift is identical to what runs on origin/main HEAD — verified by running typecheck on the merge of this branch with origin/main.
* chore(docs): move stale audit notes to docs/historico/ Root README clutter cleanup: AUDITORIA_REDEPLOY_PROMO_GIFTS_2026-05-13 and RECOVERY_PLAN are dated artifacts from closed contexts. docs/historico/ already collects this kind of post-mortem material — keeps the root README focused on entrypoints (README, CHANGELOG, CONTRIBUTING, SECURITY). Also drops the " (1)" suffix from the audit filename. * chore: remove orphan barrel/alias files (zero consumers) - src/hooks/stock/index.ts: empty barrel (only a comment, no exports, no importers in src/, tests/, e2e/). - src/components/categories/CategoryTreeNavigator.tsx: semantic alias for CategoryTreeNavigation, never imported anywhere. - src/hooks/products/useColors.ts: alias for useColorSystem. Only consumer was the re-export at src/hooks/products/index.ts:13 — removed that line too. The underlying useColorSystem hook stays available through the same barrel. Verified with grep across src/, tests/, e2e/. * refactor(logs): route KitBuilder fallback notices through logger.info The two mock-data fallback notices in useKitBuilderQueries were emitting via raw console.info while the error branches in the same file already use logger.warn. Routes both through the central logger for consistency: - dev console still receives the message - prod stays silent (logger.info is no-op outside DEV) - removes 2 entries from the no-console eslint baseline * chore(baseline): refresh eslint baseline after pass-1 cleanup Drops 3 entries from the baseline: - useKitBuilderQueries.ts: 2x no-console (console.info → logger.info) - OptimizedImage.tsx: 1x no-explicit-any (pre-existing drift, now captured) Net: 473 → 472 errors. No regressions. * fix(scripts): unbreak build:dev by removing missing generate-health.mjs scripts/generate-health.mjs doesn't exist in the repo (no commit history), yet build:dev tried to invoke it before vite, causing MODULE_NOT_FOUND on every npm run build:dev. The script is unused by CI (which calls ci:build → check-build-warnings.mjs) and unused by Vercel (which calls vercel build directly), so build:dev was effectively dead. Drop the dangling prelude so build:dev runs vite build --mode development as the name implies. * Revert "chore(baseline): refresh eslint baseline after pass-1 cleanup" This reverts commit e1bb9eb. * chore(baseline): absorb lint drift after merge with main Two new ESLint violations landed on main since this branch started (PRs #71-#74) without an accompanying baseline update: - src/contexts/AuthContext.test.tsx:38 — consistent-type-imports (error) - src/tests/AdminLayout.test.tsx:58 — no-explicit-any (warning) CI runs the lint gate against the merge of this branch into main, so the gate fails on every PR until main's drift is absorbed. Refreshing the baseline here so this PR's gate evaluates only its own delta. Also captures the positive drift this PR's changes produce: - useKitBuilderQueries.ts: -2 no-console (console.info → logger.info) - OptimizedImage.tsx: -1 no-explicit-any (pre-existing positive drift) Net totalErrors stays at 473 (warnings shift, errors stay flat). * chore(baseline): absorb TypeScript drift after merge with main Same pattern as the ESLint baseline absorb: main pushed multiple PRs without refreshing the TSC baseline, so this PR's gate flags 238 new file:rule pairs that aren't this PR's fault. Net: 1262 → 1373 errors. All drift comes from main (PRs #45, #57, #71-#74 introducing personalization-manager features, contracts module, and storage/db hardening migrations). The drift is identical to what runs on origin/main HEAD — verified by running typecheck on the merge of this branch with origin/main. --------- Co-authored-by: Claude <noreply@anthropic.com>
Summary
Fix do achado DOC-001 (🟠 ALTO) da auditoria back-end sênior 2026-05-22. Documentação interna estava severamente defasada — números 60-200% abaixo da realidade.
README.md"Edge Functions"README.md"migrations"README.md"tabelas com RLS"docs/DEPLOYMENT.md"drift"docs/EDGE_FUNCTIONS.mdheaderverify_jwt=falsedocs/04_EXPLICACAO_DAS_POLICIES.mdAponta para o relatório de auditoria como fonte primária do inventário completo (
audit/ANALISE_BACKEND_SENIOR_2026-05-22.md).Diff total: 4 arquivos, 17 inserções, 13 remoções — pura documentação.
https://claude.ai/code/session_011Lgxm1NZGmAztRSvZHX9U3
Generated by Claude Code
Summary by cubic
Updates internal docs to match the 2026-05-22 backend audit (DOC-001). Fixes undercounted inventories and clarifies safe deployment steps.
README.md: Edge Functions set to 81; migrations ~710 files/~685 applied; 269 tables with RLS (100%); 112 SECURITY DEFINER withsearch_path; 17pg_cron; link todocs/EDGE_FUNCTIONS.md.docs/EDGE_FUNCTIONS.md: Header shows 81 functions; 24 withverify_jwt=false; points toaudit/ANALISE_BACKEND_SENIOR_2026-05-22.mdfor full list.docs/DEPLOYMENT.md: Drift now ~25 (repo ~710 vs prod ~685); keep prod DB as source of truth; avoidsupabase db push; apply one migration at a time via MCP/SQL Editor.docs/04_EXPLICACAO_DAS_POLICIES.md: ~662 RLS policies across 269 tables; updated date and CI gate note.Written for commit c459f23. Summary will update on new commits. Review in cubic