fix(quality): resolve Sonar S8413 + S125 in gui mount and defaults#1807
Conversation
- gui/__init__.py:86 (S8413): build two independent APIRouter instances via a local factory instead of reusing one router for both mounts. S8413 fires when the same APIRouter object is included into a parent more than once (directly or via an aggregator); fresh per-mount routers break that detection while keeping /gui-meta and /api/v1/gui-meta in parity. - core/defaults.py:49-312 (S125 x14): drop the redundant 'arbitrary; tune in tuning:<area>' inline comments. The module docstring already directs callers to bernstein.yaml tuning:* for overrides, and Sonar parses the colon-bearing comment as commented-out code. - core/routing/router_core.py:60 (S125 x1): rephrase the 'float | None - ...' inline annotation as a prose comment so it no longer scans as commented-out type syntax.
There was a problem hiding this comment.
Sorry @chernistry, you have reached your weekly rate limit of 2500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughRemoves inline tuning documentation comments from default configuration values across multiple dataclasses, clarifies routing budget documentation semantics, and refactors GUI meta route mounting to use independent ChangesConfiguration, routing, and GUI updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
🚥 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 |
Sonar insights (advisory, no merge-block)Snapshot of
Run This comment is a soft signal. The Sonar scan runs on push to |
Review-bot acknowledgement summary
All must-address findings are resolved or acknowledged. |
|
bernstein doctor observe for PR #1807 ( sonar -- WARN (project bernstein)
code-scanning -- WARN (14 open alert(s))
Skipped backends (credentials not configured)
See docs/observability/unified-doctor.md for backend setup notes. |
Summary
Phase 2 Sonar sweep, cluster 1: resolves 16 findings across 3 files.
Root-cause notes
Test plan
Summary by CodeRabbit
Documentation
Refactor