Skip to content

fix(sonar): reduce quality gate noise#2350

Open
riderx wants to merge 1 commit into
mainfrom
codex/fix-sonar-ranking
Open

fix(sonar): reduce quality gate noise#2350
riderx wants to merge 1 commit into
mainfrom
codex/fix-sonar-ranking

Conversation

@riderx
Copy link
Copy Markdown
Member

@riderx riderx commented May 28, 2026

Summary (AI generated)

  • Exclude generated PostgreSQL schema and migration SQL from SonarCloud general analysis to remove PL/SQL false positives.
  • Replace Sonar hotspot regex/PRNG patterns in onboarding, store metadata, build JWT, PostHog, and Stripe helpers.
  • Add keyboard handlers for role-button wrappers flagged by Sonar accessibility rules.
  • Add a narrow Sonar ignore for the generated Capacitor Android shell dependency-lock warning.

Motivation (AI generated)

SonarCloud showed the quality gate failing on new reliability rating, new security rating, and reviewed security hotspots. The biggest ranking damage came from generated PostgreSQL SQL being analyzed as PL/SQL, plus a small set of regex, random, and accessibility findings in app/backend code.

Business Impact (AI generated)

Restoring the Sonar quality gate protects Capgo's public code quality signal and keeps noisy static-analysis debt from hiding real product risks.

Test Plan (AI generated)

  • bun run build
  • bun run lint
  • bun run lint:backend
  • bun typecheck
  • git diff --check

Screenshots (AI generated)

No UI screenshots. The visible UI behavior is unchanged except keyboard activation now works on the existing default-channel controls.

Checklist (AI generated)

  • My code follows the code style of this project and passes bun run lint:backend && bun run lint.
  • My change does not require documentation changes.
  • My change has adequate E2E test coverage.
  • I have tested my code manually, and I have provided steps how to reproduce my tests.

Generated with AI

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Warning

Review limit reached

@riderx, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 54 minutes and 10 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2ca91d68-24fe-4948-9122-54be28bb5d07

📥 Commits

Reviewing files that changed from the base of the PR and between 24b06ce and fea636c.

📒 Files selected for processing (8)
  • .sonarcloud.properties
  • src/components/dashboard/AppOnboardingFlow.vue
  • src/components/dashboard/AppSetting.vue
  • src/components/dashboard/DemoOnboardingModal.vue
  • supabase/functions/_backend/public/app/store_metadata.ts
  • supabase/functions/_backend/utils/posthog.ts
  • supabase/functions/_backend/utils/stripe.ts
  • tests/stats.test.ts

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

@codspeed-hq
Copy link
Copy Markdown
Contributor

codspeed-hq Bot commented May 28, 2026

Merging this PR will not alter performance

✅ 43 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing codex/fix-sonar-ranking (fea636c) with main (24b06ce)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@riderx riderx force-pushed the codex/fix-sonar-ranking branch from 90d6dd3 to 0a05025 Compare May 28, 2026 14:11
@riderx riderx force-pushed the codex/fix-sonar-ranking branch from 0a05025 to c664b6e Compare May 28, 2026 14:23
@riderx riderx force-pushed the codex/fix-sonar-ranking branch from c664b6e to 6decc02 Compare May 28, 2026 14:54
@riderx riderx marked this pull request as ready for review May 28, 2026 15:09
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link
Copy Markdown

@42Clownfish 42Clownfish left a comment

Choose a reason for hiding this comment

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

Reviewed the Sonar cleanup patch. No blocker in the changed logic: the added exclusions are scoped to generated SQL/migrations and generated Android shell; store metadata still only normalizes title suffixes after the existing official-host URL validation path; JWT/base64url, PostHog, and Stripe slash/ID changes preserve behavior while avoiding hotspot regex/PRNG patterns; the keyboard handlers add Enter/Space activation without changing click behavior; CI is green.

Residual process risk is that generated SQL now depends on SQLFluff/migration review rather than Sonar, so migration diffs still need manual/DB-test review. Also GitHub currently marks this PR as conflicting, so it needs a rebase before merge.

@riderx riderx force-pushed the codex/fix-sonar-ranking branch from 6decc02 to 01510b6 Compare May 29, 2026 14:49
@riderx riderx force-pushed the codex/fix-sonar-ranking branch from 01510b6 to fea636c Compare May 29, 2026 14:57
@sonarqubecloud
Copy link
Copy Markdown

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