Repository navigation
refactor: close the last three Sonar issues the capture cleanup left open - #313
Merged
Merged
Conversation
…exity limit; put the exchange_row suppression on its reported line Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
ffroliva
added a commit
that referenced
this pull request
Nov 24, 2026
Signed-off-by: Flavio Oliva <ffroliva@gmail.com>
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
Three open code-scan issues on
mainthat #310 meant to close and did not:python:S3776engine/probe.pyrun_probe(24)receive/sendpair moves into a_Channelclass and the host call into_invoke_host; the order of checks, the timeout path and the slot release are unchangedrun_probe13,_Channel.send4,_invoke_host2python:S3776engine/capture/sqltrace.pySqlTraceRecorder.record(17)_store, same statements in the same order under the same lockrecord14,_store3python:S107engine/capture/exchanges.pyexchange_row(17 parameters)defline, so it never appliedexchange_rowkeeps its suppression: its 17 keyword-only arguments are the fields of one flat row, built once per request on the capture hot path, where a parameter object would add an allocation per request.tests/complexity_baseline.json:src/sharpit/engine/probe.py1 → 0 (no C901 finding left).sonar-baseline.txt→ 8,main's open count.Verification
ruff check,ruff format --check,pyrighton the changed modules.pytest -n 4over probe, HTTP probe, pentesting probes, health,tests/engine/capture, SQL trace API,tests/masking, code shape and import boundary: passed excepttest_complexity_only_goes_down(pin lowered above).-n 0):test_statement_overhead_budget_on_a_full_ringpassed three of three on this branch; the same test onmainfailed one of three on the same machine (51.3 µs against 50 µs), so that failure is machine load.Contribution Checklist
Signed-off-by.exchange_rowone moved one line.