fix(ci): corrige posição da anotação rls-allow em QuoteViewPage (destrava seller-scope gate)#175
Conversation
…rava seller-scope gate)
O check-seller-scope.mjs so aceita a anotacao // rls-allow: na mesma linha
do .from(...) ou imediatamente acima. A anotacao estava 2 linhas acima
(separada por 'await supabase'), entao o gate marcava QuoteViewPage.tsx:210
como violacao e derrubava o job 'Lint, Typecheck & Test' no CI.
Move o comentario para imediatamente acima de .from('quotes'). Query
inalterada (lookup por id, RLS valida ownership). Apenas reposiciona 1 linha.
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughO PR repositiona um comentário de justificativa RLS no handler de cancelamento de sincronização em ChangesReposicionamento de Comentário RLS
🎯 1 (Trivial) | ⏱️ ~2 minutos 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Repositions the // rls-allow: annotation directly above .from('quotes') so the seller-scope checker recognizes it and the CI gate passes.
Changes:
- Move annotation comment one line down into the method chain.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
No issues found across 1 file
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.
|
Superado por #176, que aplicou a mesma correção (reposicionar a anotação |
Problema
O job Lint, Typecheck & Test falha no CI (inclusive no
main) por causa do step Seller-scope checker (scripts/check-seller-scope.mjs), não por lint nem typecheck.A violação reportada era:
Causa-raiz
A query já tinha a anotação
// rls-allow:, mas posicionada 2 linhas acima do.from('quotes'):A função
hasAllowAnnotation(lines, idx)do checker só aceita a anotação na mesma linha do.from(...)ou imediatamente acima (idx-1). Comoidx-1eraawait supabase(não o comentário), o gate não reconhecia a allowlist e falhava.Correção
Move o comentário para imediatamente acima do
.from('quotes')(comentário entre encadeamentos é TSX válido):A query é inalterada — segue sendo um lookup por
idonde o RLS valida ownership (não requerseller_scopeexplícito). Apenas 1 linha reposicionada.Validação
node scripts/check-seller-scope.mjs→ ✅ passa (0 violações).092fd89d) no GitHub.Summary by cubic
Fixes CI failure by moving the
// rls-allow:annotation insrc/pages/quotes/QuoteViewPage.tsxto immediately above.from('quotes')soscripts/check-seller-scope.mjsrecognizes it. This unblocks the seller-scope gate and the Lint, Typecheck & Test job; no query behavior changes.Written for commit e863ab9. Summary will update on new commits. Review in cubic
Summary by CodeRabbit