Repository navigation
fix: SonarCloud findings on main, 123 fixed and 41 refuted - #459
Merged
Merged
Conversation
…, the cancel route drops its unused reason, and routes stop repeating their response model BaseEvent sets revalidate_instances=always, so an event built in code checks its metadata and resource usage the way one read from Kafka does. The cancel route accepted a reason nothing stored since #428; the request body goes, and the spec and client are regenerated. 45 routes drop a response_model equal to their return annotation (the spec is byte-identical), and six parameters use Annotated. The queue registers its Lua scripts once instead of through async getters typed Any; four async methods that awaited nothing are plain; unused parameters go; getattr calls and a nested conditional in the pod event mapper are plain attribute access; entrypoint.sh names its positional parameters.
…eir !important copies of its theme, and small TypeScript cleanups CodeMirrorEditor's EditorView.theme already sets the editor's height, max-height and the scroller's overflow; the !important CSS copies go. Failure messages come from a Record keyed by event type instead of a nested ternary, active statuses are a Set, the CSRF cookie is read with RegExp.exec, and the ESLint selectors use String.raw.
…agger filter box for real Material for MkDocs draws each diagram in a closed shadow root, so the 30 !important rules in extra.css never reached a diagram; the screenshots before and after are pixel-identical. extra.css never loaded inside the Swagger UI iframes either, so the filter box showed on every filtered page; it now comes from swagger.css through the plugin's extra_css.
HardMax71
enabled auto-merge (squash)
October 23, 2026 19:58
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
Codecov Report❌ Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
4 of 17 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
SonarCloud lists 164 open issues on main (issues); this fixes 123 and refutes 41.
Changes
Backend:
BaseEventrevalidates its dataclass fields. The cancel route drops areasonbody nothing stored since #428, and the spec and client are regenerated. 45 routes drop aresponse_modelequal to their return annotation, and the spec stays byte-identical. The queue registers its Lua scripts once, six needlessasyncmethods become plain, unused parameters and twogetattrcalls go.Frontend: the editor CSS loses
!importantcopies of its CodeMirror theme, plus small TypeScript cleanups.Docs: Material draws Mermaid in a closed shadow root, so the 30 overrides never applied (diagrams pixel-identical). extra.css never loaded in the Swagger iframes, so the filter box now hides through
extra_css.Not changed: 26 duplicated literals are span names, MongoDB operators and log event names; 7 functions are
asyncfor Starlette, APScheduler or an awaited dispatch table; 4!importantare the reduced-motion reset; 2 nestings are Tailwind's@utility; the email regex is linear (1.7 MB in 46 ms);RedactingFilter.filterreturnsTrueby contract.Type of Change
Test Plan
cd backend && uv run pytest tests/unit)cd frontend && npm run test)docker compose exec -T backend sh -c 'uv sync --group test --no-dev --frozen --no-install-project --no-build && pytest tests/e2e')cd frontend && npm run test:e2e)uv run python -m scripts.export_openapiin backend/, thennpm run generate:apiin frontend/), never edited by handValidation: ruff, strict mypy, grimp, 552 unit and 3 contract tests and every frontend gate pass. The old and new entrypoint.sh give identical output.
Checklist
pre-commit run --all-filesand all checks passSummary by cubic
Fixes 123 of the 164 SonarCloud findings on main and documents why the other 41 are acceptable. Only two changes affect behavior: events built in code now validate like events read from Kafka, and the cancel endpoint stops accepting a request body that nothing has stored since #428.
Behavioral changes
BaseEventsetsrevalidate_instances="always", so metadata and resource usage built in code get the same validation as events read from Kafka.reasonbody; FastAPI ignores undeclared bodies, so existing clients still work. The OpenAPI spec, generated client, and documentation are regenerated to match.Cleanups and refuted findings
response_modelidentical to their return annotation; the spec stays byte-identical.getattrcalls go. The shell entrypoint names its positional parameters.!importantcopies of the CodeMirror height rules; TypeScript cleanups use a Set for active statuses, a Record for failure messages,Number.isNaN, andString.rawselectors.extra.cssnever loaded in Swagger iframes, so the filter box is now hidden via a freshswagger.css.!importants are the reduced-motion reset; the email regex is linear; andRedactingFilter.filterreturnsTrueby contract.Written for commit dc85401. Summary will update on new commits.