Repository navigation
Review standards and lint checks from past PR reviews - #108
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ℹ️ Recent review info⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe pull request adds coding and review standards, expands lint and repository checks, updates privilege tests and Vitest cleanup, and changes application code to explicitly handle or discard selected promises. ChangesReview standards and lint enforcement
Estimated code review effort: 3 (Moderate) | ~25 minutes
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing. Comment |
CODING_STANDARDS.md and docs/standards/ hold the review rules drawn from accepted findings on PRs #5 to #106, each linked to its thread. Rules a tool can enforce became checks in `npm run lint`: - type-aware no-floating-promises / no-misused-promises for src/ - no waitForTimeout in browser tests outside documented observation windows - knip for unused files and dependencies - scripts/check-repo-rules.mjs: pinned actions, persist-credentials, workflow permissions, positive has_*_privilege lists, squawk on new migrations - Vitest restores stubbed globals and env after every test Fixes the existing violations: six positive pgTAP privilege lists that passed with any one privilege, two promises that could reject unseen, and explicit void on handlers that already catch their errors. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
c204ae6 to
2a25a0c
Compare
…knip entries Codex review of c204ae6 found that the line-based workflow check skipped .yaml files, quoted keys, and read persist-credentials from unrelated text; that the privilege check flagged NOT (...) and missed ::text casts; and that broad knip entry globs hid dead helpers. Workflows now go through the yaml parser (now a declared devDependency), privilege calls are checked by their last string argument with negation looked up past parentheses and comments, and knip entries name real entry points only. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
CodeRabbit and Copilot are out of quota, so the Codex reviewer (
Each case was reproduced with throwaway files before the fix and passes after it. |
Codex review of 6805d2c: a quoted word inside a comment could stand in for a call's last argument and hide a privilege list, and a commented-out example failed lint. Comments are now blanked before scanning, keeping string literals and line numbers. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Codex re-review of 6805d2c found one real problem: a quoted word inside a SQL comment could stand in for a privilege call's last argument and hide a list, and a commented-out example failed lint. Fixed in 1e354ba. Comments are now blanked out, keeping string literals and line numbers, before calls are scanned. Probes cover a comment inside the call, commented-out examples, NOT in parentheses or across a comment, a |
…nking SQL Codex review of 1e354ba: `$$/*$$` opened a false comment that hid later checks, and a nested block comment ended at its first `*/`. Dollar-quoted bodies are now copied as-is (calls inside them are still checked), and block comments track depth. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Codex re-review of 1e354ba found two more scanner gaps, both fixed in 787cb70. First, a dollar-quoted |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Codex re-review of 787cb70 raised two findings. Both are false positives: the check flags correct SQL. Neither lets a weak check through, so I'm dismissing both:
The check deliberately errs toward flagging. As of fc713aa, the error message and |
|
@coderabbitai review |
|
Codex review of fc713aa: `$$SELECT,INSERT$$` passed as a privilege list. Dollar-quoted strings now count as arguments, and their parentheses no longer end the argument scan. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codex review of 090c4df: `$priv1$SELECT,INSERT$priv1$` and adjacent string concatenation passed. Instead of recognizing each way to spell a list, a positive call's privilege argument must now be one quoted word or a per-row column; anything else is flagged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Codex re-review of 090c4df found two more ways to spell a privilege list that passed: a dollar tag with a digit ( |
…ivilege calls Codex review of 01b4155: docker:// actions skipped pinning, and pg_catalog."has_table_privilege"(...) escaped the call match. Docker actions now need @sha256: digests, and the call match takes an optional schema and quotes, so NOT before a qualified call still counts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Codex re-review of 01b4155 found two gaps, both fixed in a0a3715. First, |
|
Codex re-review ( |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Database evidence for the expanded pgTAP privilege checks. The locked
So the stricter checks pass on the current schema. The full pgTAP run was not repeated. The |
Review rules and lint checks drawn from every review comment on PRs #5 to #106.
What changed
Review standards.
CODING_STANDARDS.mdgives a reviewer its steps and links seven area files indocs/standards/. Each rule links the review thread it came from. Rules a tool can enforce became checks instead of prose..coderabbit.yamlpoints CodeRabbit at the files (withinheritance: true, so the organization settings still apply). The Codex review brief in the globalcodex-reviewskill now reads them too.New checks in
npm run lint, so CI and local verify both run them:no-floating-promisesandno-misused-promisesforsrc/(skipping test files).navigate()is allowed, and so are async JSX handlers and nullable-promise conditionals.waitForTimeoutis rejected in browser tests. The seven existing uses are observation windows (a period in which something must not happen), and each now has a disable comment that says what must not happen.scripts/check-repo-rules.mjs:permissions:block, SHA-pinned actions, andpersist-credentials: falseon checkout.has_*_privilegecall with a privilege list, since a list means "any of".20261001100000. Its style rules are excluded because they don't fit Supabase migrations.unstubGlobalsandunstubEnvs.Existing violations fixed:
current_debates_test.sql,debate_context_pins_test.sqlanddemo_access_codes_rls_test.sqlpassed if the role held any one privilege. They now check each one.void, as is i18n's init, which can't reject.Measured and skipped:
eslint-plugin-jsx-a11y(it would have caught none of the past accessibility findings, and it adds about 2,000 lockfile lines) and zizmor (it needs Python; the repo-rules script covers the same workflow rules).npm run lintnow takes about 40 s instead of 12 s, mostly from type-aware linting.Verification
Local only; GitHub Actions refused every job because of the billing block.
npm run verifyat a0a3715 exited 0: docs, lint (every new check), typecheck, 27 unit files (273 tests), collaboration (30), 318 Edge tests, build, service-worker smoke, 29 Playwright smoke tests.verify-debatelabaccount recipe, whose only change is a comment. Both wait for the shared Supabase lock.🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Documentation
Developer Tooling