Public report of roboflow/supervision, published 14 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 14 November 2026, 00:59 UTC · Survey ID cd_45c3409d618244caa6ddb86d1aa502f1
roboflow/supervision
Measured 14 November 2026, 00:58 UTC, at code version 5f9e21e
CAI scoreAt riskUp 2 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A medium codebase: 52,473 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 1.0 person-years · Weakest lens: Maturity, 58
Findings by how serious they are
6 critical288 serious23 minor
12 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 00:58 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
43of 43 dimensions measured by tools.
310of 317 findings point to an exact file and line, so you can open each one in the code. The other 7 concern the repository as a whole, such as missing documentation.
43dimensions across 6 lenses, read from 52,473 lines of product code in 1 project.
roboflow/supervision is rated At risk because critical security findings are open, all of them in the packages it uses. Its score is held back because we found no recorded design decisions and no architecture document or diagram. It scores 67 out of 100, which the At risk rating leaves unchanged. We judged it as a preview release, against a lower bar.
Maturity, at 58, is the weakest lens and counts most in the score. The best first step is recording design decisions, worth about 8 points. Adding automated security scanning comes next, worth about 2 points. Raising Maturity to 62 would lift the score to about 69.
Six known security holes in the packages the code depends on can be used by attackers. Updating the vulnerable packages would close this risk.
The product code is 52,473 lines, about €150,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 46 findings
These 46 critical or serious findings were in the previous survey, on 25 October 2026, and are gone from this one.
€49,000 to €250,000, for 814 to 2,582 hours of work, about 1.0 person-years for 1 to 2 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.9 at a score of 67. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Medium: 52,473 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Record your significant design decisions.
Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €150,000 to build again, about 1.0 person-years of work. Its weakest lens is Maturity, at 58 (Adequate). Maturity is about how well the project explains and looks after itself, which decides whether a new developer, or a new supplier, can take over. Because the weakest lens counts most in the score, work on Maturity also moves the score most.
Based on: the rebuild estimate · the Maturity grade · how much each lens counts
What to do: Start with the Maturity actions in Top priorities.
If you do one thing first · First action
Record your significant design decisions. Of all the actions in this report, it raises the score most for the work it takes: about 8 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.8 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 3% to 7% on every change. The history of the code shows how much it changes: about 80,595 lines over the last 90 days, which is about 326,858 lines a year. At that pace, the extra work comes to an estimated 24.1 to 144.4 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
63 modules, with 73 dependencies between them. Every module uses only modules listed above it, so there are no loops.
The table shows the 40 modules with the most connections; 23 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
detection.core uses detection.utils.iou_and_nms, so a change to detection.utils.iou_and_nms can break detection.core, while a change to detection.core can't break detection.utils.iou_and_nms.
Position
Below the diagonal: detection.core uses a module listed above it, which is the healthy direction.
metrics.detection uses dataset.core, so a change to dataset.core can break metrics.detection, while a change to metrics.detection can't break dataset.core.
Position
Below the diagonal: metrics.detection uses a module listed above it, which is the healthy direction.
metrics.detection uses metrics.core, so a change to metrics.core can break metrics.detection, while a change to metrics.detection can't break metrics.core.
Position
Below the diagonal: metrics.detection uses a module listed above it, which is the healthy direction.
annotators.base uses detection.core, so a change to detection.core can break annotators.base, while a change to annotators.base can't break detection.core.
Position
Below the diagonal: annotators.base uses a module listed above it, which is the healthy direction.
annotators.utils uses geometry.core, so a change to geometry.core can break annotators.utils, while a change to annotators.utils can't break geometry.core.
Position
Below the diagonal: annotators.utils uses a module listed above it, which is the healthy direction.
annotators.utils uses detection.core, so a change to detection.core can break annotators.utils, while a change to annotators.utils can't break detection.core.
Position
Below the diagonal: annotators.utils uses a module listed above it, which is the healthy direction.
detection uses detection.utils.iou_and_nms, so a change to detection.utils.iou_and_nms can break detection, while a change to detection can't break detection.utils.iou_and_nms.
Position
Below the diagonal: detection uses a module listed above it, which is the healthy direction.
detection.line_zone uses draw.color, so a change to draw.color can break detection.line_zone, while a change to detection.line_zone can't break draw.color.
Position
Below the diagonal: detection.line_zone uses a module listed above it, which is the healthy direction.
detection.line_zone uses geometry.core, so a change to geometry.core can break detection.line_zone, while a change to detection.line_zone can't break geometry.core.
Position
Below the diagonal: detection.line_zone uses a module listed above it, which is the healthy direction.
detection.line_zone uses detection.core, so a change to detection.core can break detection.line_zone, while a change to detection.line_zone can't break detection.core.
Position
Below the diagonal: detection.line_zone uses a module listed above it, which is the healthy direction.
detection.tools uses detection.core, so a change to detection.core can break detection.tools, while a change to detection.tools can't break detection.core.
Position
Below the diagonal: detection.tools uses a module listed above it, which is the healthy direction.
detection.tools.csv_sink uses detection.core, so a change to detection.core can break detection.tools.csv_sink, while a change to detection.tools.csv_sink can't break detection.core.
Position
Below the diagonal: detection.tools.csv_sink uses a module listed above it, which is the healthy direction.
detection.tools.inference_slicer uses detection.core, so a change to detection.core can break detection.tools.inference_slicer, while a change to detection.tools.inference_slicer can't break detection.core.
Position
Below the diagonal: detection.tools.inference_slicer uses a module listed above it, which is the healthy direction.
detection.tools.json_sink uses detection.core, so a change to detection.core can break detection.tools.json_sink, while a change to detection.tools.json_sink can't break detection.core.
Position
Below the diagonal: detection.tools.json_sink uses a module listed above it, which is the healthy direction.
detection.tools.polygon_zone uses draw.color, so a change to draw.color can break detection.tools.polygon_zone, while a change to detection.tools.polygon_zone can't break draw.color.
Position
Below the diagonal: detection.tools.polygon_zone uses a module listed above it, which is the healthy direction.
detection.tools.polygon_zone uses detection.core, so a change to detection.core can break detection.tools.polygon_zone, while a change to detection.tools.polygon_zone can't break detection.core.
Position
Below the diagonal: detection.tools.polygon_zone uses a module listed above it, which is the healthy direction.
detection.utils uses detection.compact_mask, so a change to detection.compact_mask can break detection.utils, while a change to detection.utils can't break detection.compact_mask.
Position
Below the diagonal: detection.utils uses a module listed above it, which is the healthy direction.
detection.utils uses detection.utils.iou_and_nms, so a change to detection.utils.iou_and_nms can break detection.utils, while a change to detection.utils can't break detection.utils.iou_and_nms.
Position
Below the diagonal: detection.utils uses a module listed above it, which is the healthy direction.
detection.utils uses geometry.core, so a change to geometry.core can break detection.utils, while a change to detection.utils can't break geometry.core.
Position
Below the diagonal: detection.utils uses a module listed above it, which is the healthy direction.
detection.utils uses detection.core, so a change to detection.core can break detection.utils, while a change to detection.utils can't break detection.core.
Position
Below the diagonal: detection.utils uses a module listed above it, which is the healthy direction.
key_points.core uses detection.utils.iou_and_nms, so a change to detection.utils.iou_and_nms can break key_points.core, while a change to key_points.core can't break detection.utils.iou_and_nms.
Position
Below the diagonal: key_points.core uses a module listed above it, which is the healthy direction.
key_points.core uses detection.core, so a change to detection.core can break key_points.core, while a change to key_points.core can't break detection.core.
Position
Below the diagonal: key_points.core uses a module listed above it, which is the healthy direction.
metrics._confusion_matrix_metric uses metrics.core, so a change to metrics.core can break metrics._confusion_matrix_metric, while a change to metrics._confusion_matrix_metric can't break metrics.core.
Position
Below the diagonal: metrics._confusion_matrix_metric uses a module listed above it, which is the healthy direction.
metrics._confusion_matrix_metric uses metrics.utils.object_size, so a change to metrics.utils.object_size can break metrics._confusion_matrix_metric, while a change to metrics._confusion_matrix_metric can't break metrics.utils.object_size.
Position
Below the diagonal: metrics._confusion_matrix_metric uses a module listed above it, which is the healthy direction.
metrics._confusion_matrix_metric uses detection.core, so a change to detection.core can break metrics._confusion_matrix_metric, while a change to metrics._confusion_matrix_metric can't break detection.core.
Position
Below the diagonal: metrics._confusion_matrix_metric uses a module listed above it, which is the healthy direction.
metrics.mean_average_precision uses metrics.core, so a change to metrics.core can break metrics.mean_average_precision, while a change to metrics.mean_average_precision can't break metrics.core.
Position
Below the diagonal: metrics.mean_average_precision uses a module listed above it, which is the healthy direction.
metrics.mean_average_precision uses detection.core, so a change to detection.core can break metrics.mean_average_precision, while a change to metrics.mean_average_precision can't break detection.core.
Position
Below the diagonal: metrics.mean_average_precision uses a module listed above it, which is the healthy direction.
metrics.mean_average_recall uses metrics.core, so a change to metrics.core can break metrics.mean_average_recall, while a change to metrics.mean_average_recall can't break metrics.core.
Position
Below the diagonal: metrics.mean_average_recall uses a module listed above it, which is the healthy direction.
metrics.mean_average_recall uses metrics.utils.object_size, so a change to metrics.utils.object_size can break metrics.mean_average_recall, while a change to metrics.mean_average_recall can't break metrics.utils.object_size.
Position
Below the diagonal: metrics.mean_average_recall uses a module listed above it, which is the healthy direction.
metrics.mean_average_recall uses detection.core, so a change to detection.core can break metrics.mean_average_recall, while a change to metrics.mean_average_recall can't break detection.core.
Position
Below the diagonal: metrics.mean_average_recall uses a module listed above it, which is the healthy direction.
annotators.core uses geometry.core, so a change to geometry.core can break annotators.core, while a change to annotators.core can't break geometry.core.
Position
Below the diagonal: annotators.core uses a module listed above it, which is the healthy direction.
annotators.core uses detection.core, so a change to detection.core can break annotators.core, while a change to annotators.core can't break detection.core.
Position
Below the diagonal: annotators.core uses a module listed above it, which is the healthy direction.
annotators.core uses annotators.base, so a change to annotators.base can break annotators.core, while a change to annotators.core can't break annotators.base.
Position
Below the diagonal: annotators.core uses a module listed above it, which is the healthy direction.
annotators.core uses annotators.utils, so a change to annotators.utils can break annotators.core, while a change to annotators.core can't break annotators.utils.
Position
Below the diagonal: annotators.core uses a module listed above it, which is the healthy direction.
dataset.formats uses detection.core, so a change to detection.core can break dataset.formats, while a change to dataset.formats can't break detection.core.
Position
Below the diagonal: dataset.formats uses a module listed above it, which is the healthy direction.
dataset.formats uses key_points.core, so a change to key_points.core can break dataset.formats, while a change to dataset.formats can't break key_points.core.
Position
Below the diagonal: dataset.formats uses a module listed above it, which is the healthy direction.
key_points.annotators uses draw.color, so a change to draw.color can break key_points.annotators, while a change to key_points.annotators can't break draw.color.
Position
Below the diagonal: key_points.annotators uses a module listed above it, which is the healthy direction.
key_points.annotators uses key_points.core, so a change to key_points.core can break key_points.annotators, while a change to key_points.annotators can't break key_points.core.
Position
Below the diagonal: key_points.annotators uses a module listed above it, which is the healthy direction.
metrics uses metrics._confusion_matrix_metric, so a change to metrics._confusion_matrix_metric can break metrics, while a change to metrics can't break metrics._confusion_matrix_metric.
Position
Below the diagonal: metrics uses a module listed above it, which is the healthy direction.
metrics.f1_score uses metrics.core, so a change to metrics.core can break metrics.f1_score, while a change to metrics.f1_score can't break metrics.core.
Position
Below the diagonal: metrics.f1_score uses a module listed above it, which is the healthy direction.
metrics.f1_score uses metrics._confusion_matrix_metric, so a change to metrics._confusion_matrix_metric can break metrics.f1_score, while a change to metrics.f1_score can't break metrics._confusion_matrix_metric.
Position
Below the diagonal: metrics.f1_score uses a module listed above it, which is the healthy direction.
metrics.keypoint_mean_average_precision uses metrics.core, so a change to metrics.core can break metrics.keypoint_mean_average_precision, while a change to metrics.keypoint_mean_average_precision can't break metrics.core.
Position
Below the diagonal: metrics.keypoint_mean_average_precision uses a module listed above it, which is the healthy direction.
metrics.keypoint_mean_average_precision uses key_points.core, so a change to key_points.core can break metrics.keypoint_mean_average_precision, while a change to metrics.keypoint_mean_average_precision can't break key_points.core.
Position
Below the diagonal: metrics.keypoint_mean_average_precision uses a module listed above it, which is the healthy direction.
metrics.keypoint_mean_average_precision uses metrics.mean_average_precision, so a change to metrics.mean_average_precision can break metrics.keypoint_mean_average_precision, while a change to metrics.keypoint_mean_average_precision can't break metrics.mean_average_precision.
Position
Below the diagonal: metrics.keypoint_mean_average_precision uses a module listed above it, which is the healthy direction.
metrics.precision uses metrics.core, so a change to metrics.core can break metrics.precision, while a change to metrics.precision can't break metrics.core.
Position
Below the diagonal: metrics.precision uses a module listed above it, which is the healthy direction.
metrics.precision uses metrics._confusion_matrix_metric, so a change to metrics._confusion_matrix_metric can break metrics.precision, while a change to metrics.precision can't break metrics._confusion_matrix_metric.
Position
Below the diagonal: metrics.precision uses a module listed above it, which is the healthy direction.
metrics.recall uses metrics._confusion_matrix_metric, so a change to metrics._confusion_matrix_metric can break metrics.recall, while a change to metrics.recall can't break metrics._confusion_matrix_metric.
Position
Below the diagonal: metrics.recall uses a module listed above it, which is the healthy direction.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A03:2025 — Software Supply Chain Failures
9
High / Critical
A05:2025 — Injection
1
Medium
Roadmap
Top priorities: Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them; Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing; Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
Bring the 19 bodies over 30 down to 30 or less in Cognitive Complexity — start with Detections.from_sam3 (cognitive 60), _ConfusionMatrixMetric._compute (cognitive 60), COCOEvaluator._accumulate (cognitive 58).
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 6
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 288
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 23
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 12
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 43 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 43 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 310 of 317 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT READ here — but this repository measures it: a Codecov configuration (.codecov.yml, target 95%) and a coverage step in CI (`pytest src/ tests/ --cov=supervision --cov`) shows that coverage is collected and tracked in your own CI. The built-in collector has no runner for this ecosystem (.py), so the analyzer could not read the number — a gap in the analyzer's language coverage, not an unmeasured repo. Not scored.
D12 Dependency Hygiene — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. This repository's 10 shipped Python distribution(s) across 1 manifest(s) WERE read; what went unanswered is the currency half, because it grades an EXACT pin against the newest release and every declaration here is a floor or a range — which installs the newest release it admits and so cannot be behind one. So pypi.org was never asked. This is a true statement about the repository, and the healthy one, NOT a gap on our side: no reader we could write would find a currency question here.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: it declares a published package (pyproject.toml), but no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict. For npm the surface is what a published package.json's entry points (exports, main, module, types) export, followed through the source; an entry that names build output the tree does not commit (dist/, build/) is not followed back to source, because only a tsconfig outDir/rootDir pair states that mapping and a bundler's input lives in executable configuration this engine does not evaluate.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `(repository root)` (47555 LoC, 201 module-visible types across 21 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
D28 Secrets (history) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `gitleaks` TIMED OUT after 180s against a 180s budget, so we killed its process tree. The budget is ours; the work may simply be larger than it allows. Nothing about this repository is asserted by the absence of a result; the budget is ours to raise, and raising it is our backlog item, not an action for this repository's owner.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXB1 Runtime evidence locked — no reproducible boot — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: 1 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Python is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Python is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations: 1 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned REDACTED, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
+ 20 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with KeyPoints.select (cyclomatic 42), _video._mux_audio (cyclomatic 31). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 6.9 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 68 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 19 bodies over 30 down to 30 or less in Cognitive Complexity — start with Detections.from_sam3 (cognitive 60), _ConfusionMatrixMetric._compute (cognitive 60), COCOEvaluator._accumulate (cognitive 58). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 19 together lifts Cognitive Complexity from 4.3 to about 6.1/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.7 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 13 FileTooLong finding(s) in God Classes — start with core.py (5), mean_average_precision.py, iou_and_nms.py. — One of this dimension's main actionable groups (13 warning-level).
Resolve the 1 FunctionTooLong finding(s) in God Classes — start with cookbooks-card.js. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
88 duplicated block group(s) detected. 9.8 % of the production lines (5,119 of 52,473) are in a reported copy. A further 47 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 49 of the 135 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 94 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 5 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with core.py, utils.py, annotators.py. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 4 Duplicated block (14 lines × 3) finding(s) in Code Duplication — start with iou_and_nms.py, _confusion_matrix_metric.py, inference_stream_example.py. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 4 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with core.py (2), masks.py, rfdetr_file_example.py. — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 23 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 10 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (13 reached that way). Requirements it states ONLY under an extra, a PEP 735 dependency group, a Poetry dev group or a dev-named requirements file are excluded: pip does not install any of them for a consumer. ★ This repository commits no dependency lockfile that this pass reads, so each licence is the one PyPI publishes for the distribution's CURRENT release rather than for a pinned version. 4 of them publish no licence on PyPI this pass can read; that is missing data, not a violation, and none of them is charged. This repository publishes itself under MIT, which is its own choice and is not judged here.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: src/supervision/key_points/core.py (24×42=1008); src/supervision/detection/core.py (36×25=900); src/supervision/dataset/formats/yolo.py (16×21=336) Repeated repair below the complexity floor: src/supervision/_cv2/_image.py (17 of 20 changes were fixes); src/supervision/annotators/core.py (12 of 23 changes were fixes); src/supervision/detection/utils/boxes.py (11 of 14 changes were fixes)
Resolve the 18 Repeated repair finding(s) in Churn × Complexity Hotspots — start with core.py (2), utils.py (2), _image.py. — One of this dimension's main actionable groups (18 warning-level).
Resolve the 13 Hotspot finding(s) in Churn × Complexity Hotspots — start with core.py (2), yolo.py, internal.py. — One of this dimension's main actionable groups (13 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.7 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
2 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/supervision/_cv2/_text.py. Counted over 72 of the 94 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
2 deducted task-comment markers across 52473 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 2 TodoComment finding(s) in Explicit Debt — start with core.py, stream_from_file.py. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
93 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
1 finding(s): 0 critical, 0 high, 1 medium, 0 low. semgrep hit a parse error in 3 file(s) — `docs/theme/cookbooks.html` (lines 1–2, lines 6–7, line 84), `docs/theme/main.html` (lines 1–4, lines 10–30, line 30, …), `docs/theme/partials/header.html` (lines 1–6) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
What to do
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 5 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (4), REDACTED. — One of this dimension's main actionable groups (5 issue-level).
Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 72 of the 94 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 10 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 14 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — .github/workflows/ci-build-docs.yml:6
`.github/dependabot.yml` schedules updates, but no `package-ecosystem` entry covers `uv`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list. — .github/dependabot.yml:2
What to do
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
Dependabot is configured but does not watch `uv` — add that `package-ecosystem` entry to .github/dependabot.yml so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
What to do
Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Other · Security — Only what this repository's own non-C# files could be read for was assessed — and because this repository commits the configuration that serves its own HTTP surface, that configuration could be read in full for the security response headers it sets. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
Set: Content-Security-Policy, Permissions-Policy, Referrer-Policy, Strict-Transport-Security, X-Content-Type-Options. Missing: X-Frame-Options — the four headers that carry the points of this card's security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each. (−0.5 on this card.) — docs/_headers:1
What to do
Add X-Frame-Options beside the headers already set; Content-Security-Policy is the one that pays for itself first, then Strict-Transport-Security, then nosniff and a frame policy.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Only 0/1 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
`renderCard` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — docs/javascripts/cookbooks-card.js:31
What to do
Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — src/supervision/utils/image_window.py:300, src/supervision/detection/vlm.py:307
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 1 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 13 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 72 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — Frontend below the scale floor (21 DOM element(s) < 25) — too little surface to assess accessibility.
AC2 Forms & labels — Frontend below the scale floor (21 DOM element(s) < 25) — too little surface to assess accessibility.
AC3 Page structure — Frontend below the scale floor (21 DOM element(s) < 25) — too little surface to assess accessibility.
AC4 Keyboard semantics — Frontend below the scale floor (21 DOM element(s) < 25) — too little surface to assess accessibility.
AC5 ARIA correctness — Frontend below the scale floor (21 DOM element(s) < 25) — too little surface to assess accessibility.
AC6 Visual & motion safety — Frontend below the scale floor (21 DOM element(s) < 25) — too little surface to assess accessibility.
AX1 Captive dependencies — Not applicable: this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository registers no route and starts no server another machine can reach (no Flask/FastAPI/Starlette route, Django urlpatterns or class-based view, Tornado handler). Access control is therefore N/A here — a library or command-line tool is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or MongoEngine model, a migration or a SQL schema — and no database or data-store client (Django ORM, SQLAlchemy, psycopg, PyMongo, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential on a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or mongoengine model, in a migration or in a SQL schema — and no database or data-store client (django.db, sqlalchemy, psycopg2, pymongo, sqlite3, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential on a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or mongoengine model, in a migration or in a SQL schema — and no database or data-store client (django.db, sqlalchemy, psycopg2, pymongo, sqlite3, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D10 Test Quality — ~67824 lines of test source are present (.py) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D12 Dependency Hygiene — Dependency currency not established — no declaration carries an exact pin to grade
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
D21 Naming Consistency — Naming consistency does not read html yet; not measured.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .py source were not judged.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D28 Secrets (history) — gitleaks killed before it finished — this repository's git history not scanned
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D5 Coupling — Not applicable — this Python build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (25 value object(s))
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
M4 Documentation accuracy — Not applicable: the 58 current-state document(s) make no claim of a kind M4 checks.
P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
P2 Observability — This repository's Python, JavaScript/TypeScript source (2 module(s), 103 file(s) read) declares no entry point and bootstraps no server, and nothing here deploys a service — it is a library, run inside whatever hosts it, so production observability (structured logging, tracing/metrics, health checks) is N/A. If it grows a binary or a service, the dimension reactivates.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Python source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Repeated repair: src/supervision/_cv2/_image.py src/supervision/_cv2/_image.py:235— src/supervision/_cv2/_image.py changed 20 times in last 90 days and 17 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is _image._resize at line 235), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cv2): scale in float32 in the convertScaleAbs fallback like OpenCV (#2935)”; “fix(cv2): write non-uint8 images like OpenCV in the imwrite fallback (#2901)”; “fix(cv2): saturate and round drawing colors and border values like OpenCV (#2854)”; “fix(cv2): honor grayscale image read flags (#2841)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/_cv2/_image.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/supervision/annotators/core.py src/supervision/annotators/core.py:2331— src/supervision/annotators/core.py changed 23 times in last 90 days and 12 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is TraceAnnotator.annotate at line 2331), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(annotators): keep labels wider than the frame at its left edge (#2940)”; “fix(annotators): draw rich labels on grayscale scenes (#2916)”; “fix(annotators): draw heat maps on grayscale scenes (#2872)”; “fix: shape Arabic and Hebrew labels in `RichLabelAnnotator` (#2864)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/annotators/core.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/supervision/detection/utils/boxes.py src/supervision/detection/utils/boxes.py:54— src/supervision/detection/utils/boxes.py changed 14 times in last 90 days and 11 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is boxes.pad_boxes at line 54), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: prevent integer overflow in XYWH box conversion (#2922)”; “fix(detection): preserve finite corners across overflowing box spans (#2853)”; “Fix float box midpoints overflowing to inf (#2787)”; “fix(detection): prevent integer overflow when moving boxes (#2734)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/detection/utils/boxes.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/supervision/dataset/core.py src/supervision/dataset/core.py:337— src/supervision/dataset/core.py changed 15 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is DetectionDataset.merge at line 337), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(dataset): keep mask holes open in COCO polygon export (#2879)”; “fix(dataset): merge annotations without class IDs (#2858)”; “fix(dataset): raise when an image cannot be written during export (#2772)”; “fix(dataset): name the malformed YOLO line instead of failing on its shape (#2665)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/dataset/core.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: REDACTED REDACTED:108— REDACTED changed 13 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is pascal_voc.detections_to_pascal_voc at line 108), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(dataset): reject out-of-range class_id in CreateML and Pascal VOC export (#2859)”; “fix(dataset): round Pascal VOC bndbox corners instead of truncating them (#2748)”; “fix(dataset): use devkit box extents for Pascal VOC export and import (#2780)”; “fix: keep mask holes from becoming extra instances in dataset export (#2703)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/supervision/metrics/mean_average_recall.py src/supervision/metrics/mean_average_recall.py:385— src/supervision/metrics/mean_average_recall.py changed 15 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is MeanAverageRecall._compute at line 385), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(metrics): select MeanAverageRecall targets before copying (#2953)”; “fix(metrics): preserve oriented-box precision in recall and classification metrics (#2887)”; “fix(metrics): count COCO boundary areas in both mAR size buckets (#2848)”; “fix(metrics): Preserve scalar metadata in recall size buckets (#2791)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/metrics/mean_average_recall.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/supervision/utils/image.py src/supervision/utils/image.py:459— src/supervision/utils/image.py changed 14 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is image._overlay_image at line 459), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(utils): keep exact fitted size in `resize_image` and `letterbox_image` (#2952)”; “fix(utils): keep (H, W, 1) grayscale images intact in image utilities (#2905)”; “fix(cv2): honor grayscale image read flags (#2841)”; “fix(utils): prevent `ImageSink` from replacing existing images (#2800)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/utils/image.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/supervision/dataset/utils.py src/supervision/dataset/utils.py:248— src/supervision/dataset/utils.py changed 12 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is utils._splice_holes_in_order at line 248), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(dataset): bridge holes from traced contours when simplified ones have no seam (#2933)”; “fix(dataset): keep mask holes open in COCO polygon export (#2879)”; “fix(dataset): raise when an image cannot be written during export (#2772)”; “fix: keep mask holes from becoming extra instances in dataset export (#2703)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/dataset/utils.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/supervision/utils/video.py src/supervision/utils/video.py:183— src/supervision/utils/video.py changed 12 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is video._validate_and_setup_video at line 183), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(video): stop reading at the requested end (#2874)”; “fix(video): reject nonpositive frame stride (#2819)”; “fix(video): release captures when frame setup fails (#2782)”; “fix(video): cancel source reader after processing failure (#2720)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/utils/video.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/supervision/detection/tools/smoother.py src/supervision/detection/tools/smoother.py:291— src/supervision/detection/tools/smoother.py changed 11 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is DetectionsSmoother.get_smoothed_detections at line 291), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(smoother): leave unconfirmed tracks with a negative `tracker_id` unsmoothed (#2926)”; “fix(smoother): merge tracks with mixed oriented history (#2923)”; “fix(smoother): Prevent overflow in oriented corner alignment (#2785)”; “fix(smoother): Age history on frames without tracker IDs (#2676)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/detection/tools/smoother.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/supervision/detection/utils/converters.py src/supervision/detection/utils/converters.py:350— src/supervision/detection/utils/converters.py changed 9 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is converters.xyxy_to_mask at line 350), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(converters): prevent integer overflow in `xyxy_to_xywh` (#2951)”; “fix: prevent integer overflow in XYWH box conversion (#2922)”; “fix(detection): handle empty polygons in `filter_polygons_by_area` and `polygon_to_xyxy` (#2761)”; “fix(detection): keep off-frame fractional boxes out of masks (#2646)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/detection/utils/converters.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/supervision/utils/conversion.py src/supervision/utils/conversion.py:112— src/supervision/utils/conversion.py changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is conversion._palette_index_patch at line 112), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(annotators): draw rich labels on grayscale scenes (#2916)”; “fix(utils): draw annotator colors on Pillow palette scenes (#2907)”; “fix(utils): keep unannotated pixels of Pillow scenes unchanged (#2883)”; “fix(utils): convert every Pillow mode to 8-bit BGR or grayscale in `pillow_to_cv2` (#2614)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/utils/conversion.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/supervision/detection/tools/csv_sink.py src/supervision/detection/tools/csv_sink.py:201— src/supervision/detection/tools/csv_sink.py changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is CSVSink.parse_detection_data at line 201), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(csv): reject extra fields that shadow built-in columns (#2934)”; “fix(csv): preserve block exceptions during sink cleanup (#2869)”; “fix: write array-valued data to CSV as parseable lists (#2707)”; “fix: preserve Unicode in CSV detection exports (#2615)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/detection/tools/csv_sink.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/supervision/detection/tools/transformers.py src/supervision/detection/tools/transformers.py:61— src/supervision/detection/tools/transformers.py changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is transformers.process_transformers_v4_segmentation_result at line 61), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(detection): read zero-shot detections from `from_transformers` (#2913)”; “fix(detection): read RF-DETR binary instance maps in `from_transformers` (#2912)”; “fix(detection): accept Transformers semantic outputs with scores (#2643)”; “fix(detection): load v5 instance results returned as binary maps (#2576)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/detection/tools/transformers.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/supervision/_cv2/_transform.py src/supervision/_cv2/_transform.py:240— src/supervision/_cv2/_transform.py changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is _transform._perspective_transform at line 240), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cv2): blur 16-bit images with OpenCV's exact sums and float32 scaling (#2875)”; “fix(cv2): name blur, `approxPolyDP` and `intersectConvexConvex` fallback parameters (#2856)”; “fix(cv2): blur 8-bit images with OpenCV's integer rounding (#2811)”; “fix(_cv2): add `getPerspectiveTransform` and `perspectiveTransform` (#2652)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/_cv2/_transform.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/supervision/draw/utils.py src/supervision/draw/utils.py:485— src/supervision/draw/utils.py changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is utils.draw_image at line 485), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(draw): draw images on grayscale and BGRA scenes (#2906)”; “fix(draw): scale 16-bit images down in `draw_image` (#2603)”; “fix(annotators): draw grayscale PNG icons in `IconAnnotator` (#2591)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/draw/utils.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/supervision/detection/utils/masks.py src/supervision/detection/utils/masks.py:374— src/supervision/detection/utils/masks.py changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is masks.filter_segments_by_distance at line 374), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(detection): prevent integer offset overflow when moving masks (#2918)”; “fix(detection): preserve narrow mask dimensions when resizing (#2762)”; “fix(annotators): exclude empty compact masks from the mask blend region (#2741)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/detection/utils/masks.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: src/supervision/metrics/utils/object_size.py src/supervision/metrics/utils/object_size.py:323— src/supervision/metrics/utils/object_size.py changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is object_size.get_detection_areas at line 323), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(metrics): preserve oriented-box precision in recall and classification metrics (#2887)”; “fix(metrics): count COCO boundary areas in both mAR size buckets (#2848)”; “fix(metrics): prevent integer overflow in object size categories (#2713)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/metrics/utils/object_size.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/supervision/key_points/core.py src/supervision/key_points/core.py:1169— src/supervision/key_points/core.py changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in KeyPoints.select at line 1169. 17 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/key_points/core.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/supervision/detection/core.py src/supervision/detection/core.py:1040— src/supervision/detection/core.py changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in Detections.from_sam3 at line 1040. 16 of those changes were fix/bug commits, and the other 20 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/detection/core.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/supervision/dataset/formats/yolo.py src/supervision/dataset/formats/yolo.py:615— src/supervision/dataset/formats/yolo.py changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in yolo.detections_to_yolo_annotations at line 615. 10 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/dataset/formats/yolo.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/supervision/detection/utils/internal.py src/supervision/detection/utils/internal.py:310— src/supervision/detection/utils/internal.py changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in internal.process_roboflow_result at line 310. 7 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/detection/utils/internal.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/supervision/metrics/mean_average_precision.py src/supervision/metrics/mean_average_precision.py:1057— src/supervision/metrics/mean_average_precision.py changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in COCOEvaluator._accumulate at line 1057. 6 of those changes were fix/bug commits, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/metrics/mean_average_precision.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/supervision/detection/vlm.py src/supervision/detection/vlm.py:921— src/supervision/detection/vlm.py changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in vlm.from_google_gemini_2_5 at line 921. 8 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/detection/vlm.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/supervision/dataset/formats/coco.py src/supervision/dataset/formats/coco.py:431— src/supervision/dataset/formats/coco.py changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in coco.detections_to_coco_annotations at line 431. 7 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/dataset/formats/coco.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/supervision/detection/compact_mask.py src/supervision/detection/compact_mask.py:435— src/supervision/detection/compact_mask.py changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in compact_mask._rle_split_cols at line 435. 4 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/detection/compact_mask.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/supervision/_cv2/_drawing.py src/supervision/_cv2/_drawing.py:288— src/supervision/_cv2/_drawing.py changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in _drawing._clip_line_endpoints at line 288. 8 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/_cv2/_drawing.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/supervision/detection/tools/inference_slicer.py src/supervision/detection/tools/inference_slicer.py:316— src/supervision/detection/tools/inference_slicer.py changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in InferenceSlicer.__call__ at line 316. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/detection/tools/inference_slicer.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/supervision/key_points/annotators.py src/supervision/key_points/annotators.py:170— src/supervision/key_points/annotators.py changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in EdgeAnnotator.annotate at line 170. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/key_points/annotators.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/supervision/dataset/formats/labelme.py src/supervision/dataset/formats/labelme.py:63— src/supervision/dataset/formats/labelme.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in labelme.labelme_shapes_to_detections at line 63. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/dataset/formats/labelme.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: src/supervision/_cv2/_color.py src/supervision/_cv2/_color.py:21— src/supervision/_cv2/_color.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in _color._cvt_color at line 21. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 00:10:13 +01:00' --until='2026-11-14 00:10:13 +01:00' --full-history --no-merges -- src/supervision/_cv2/_color.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
FileTooLong: annotators/core.py src/supervision/annotators/core.py— FileTooLong — 1794 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1294 over it, 3.59× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: detection/core.py src/supervision/detection/core.py— FileTooLong — 1214 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 714 over it, 2.43× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: metrics/mean_average_precision.py src/supervision/metrics/mean_average_precision.py— FileTooLong — 1057 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 557 over it, 2.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: utils/iou_and_nms.py src/supervision/detection/utils/iou_and_nms.py— FileTooLong — 1049 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 549 over it, 2.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: _cv2/_drawing.py src/supervision/_cv2/_drawing.py— FileTooLong — 857 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 357 over it, 1.71× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: dataset/core.py src/supervision/dataset/core.py— FileTooLong — 794 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 294 over it, 1.59× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: detection/compact_mask.py src/supervision/detection/compact_mask.py— FileTooLong — 790 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 290 over it, 1.58× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: metrics/detection.py src/supervision/metrics/detection.py— FileTooLong — 769 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 269 over it, 1.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: detection/vlm.py src/supervision/detection/vlm.py— FileTooLong — 679 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 179 over it, 1.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: key_points/core.py src/supervision/key_points/core.py— FileTooLong — 678 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 178 over it, 1.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: utils/internal.py src/supervision/detection/utils/internal.py— FileTooLong — 592 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 92 over it, 1.18× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: detection/line_zone.py src/supervision/detection/line_zone.py— FileTooLong — 577 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 77 over it, 1.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: depth/core.py src/supervision/depth/core.py— FileTooLong — 516 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 16 over it, 1.03× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
Duplicated block (9 lines × 2) src/supervision/annotators/core.py:312— src/supervision/annotators/core.py:312-320 | src/supervision/annotators/core.py:880-888 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/supervision/annotators/core.py:312` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/supervision/annotators/utils.py:419— src/supervision/annotators/utils.py:419-427 | src/supervision/annotators/utils.py:430-438 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/supervision/key_points/annotators.py:119— src/supervision/key_points/annotators.py:119-127 | src/supervision/key_points/annotators.py:372-380 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) src/supervision/detection/tools/inference_slicer.py:668— src/supervision/detection/tools/inference_slicer.py:668-676 | src/supervision/detection/tools/inference_slicer.py:761-769 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) examples/time_in_zone/inference_file_example.py:55— examples/time_in_zone/inference_file_example.py:55-63 | examples/time_in_zone/inference_naive_stream_example.py:58-66 — before extracting anything, compare `examples/time_in_zone/inference_file_example.py` and `examples/time_in_zone/inference_naive_stream_example.py` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/time_in_zone/inference_naive_stream_example.py:55` calls `tick` and `examples/time_in_zone/inference_file_example.py:54` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 3) src/supervision/detection/utils/iou_and_nms.py:637— src/supervision/detection/utils/iou_and_nms.py:637-650 | src/supervision/detection/utils/iou_and_nms.py:2311-2324 | src/supervision/detection/utils/iou_and_nms.py:2438-2451 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (14 lines × 3) src/supervision/metrics/_confusion_matrix_metric.py:658— src/supervision/metrics/_confusion_matrix_metric.py:658-671 | src/supervision/metrics/core.py:102-115 | src/supervision/metrics/mean_average_recall.py:254-267 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (14 lines × 3) examples/time_in_zone/inference_stream_example.py:25— examples/time_in_zone/inference_stream_example.py:25-38 | examples/time_in_zone/rfdetr_stream_example.py:89-102 | examples/time_in_zone/ultralytics_stream_example.py:26-39 — before extracting anything, compare `examples/time_in_zone/inference_stream_example.py` and `examples/time_in_zone/rfdetr_stream_example.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 3) examples/traffic_analysis/inference_example.py:89— examples/traffic_analysis/inference_example.py:89-102 | examples/traffic_analysis/rfdetr_example.py:94-107 | examples/traffic_analysis/ultralytics_example.py:86-99 — before extracting anything, compare `examples/traffic_analysis/inference_example.py` and `examples/traffic_analysis/rfdetr_example.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 98 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) src/supervision/detection/core.py:3341— src/supervision/detection/core.py:3341-3347 | src/supervision/detection/utils/boxes.py:407-413 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) src/supervision/key_points/core.py:1237— src/supervision/key_points/core.py:1237-1243 | src/supervision/key_points/core.py:1244-1250 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) src/supervision/detection/utils/masks.py:343— src/supervision/detection/utils/masks.py:343-349 | src/supervision/detection/utils/masks.py:358-364 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) examples/time_in_zone/rfdetr_file_example.py:134— examples/time_in_zone/rfdetr_file_example.py:134-140 | examples/time_in_zone/rfdetr_naive_stream_example.py:137-143 — before extracting anything, compare `examples/time_in_zone/rfdetr_file_example.py` and `examples/time_in_zone/rfdetr_naive_stream_example.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/time_in_zone/rfdetr_naive_stream_example.py:134` calls `tick` and `examples/time_in_zone/rfdetr_file_example.py:133` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (4 members, 50+ identical tokens) examples/time_in_zone/rfdetr_file_example.py:33— examples/time_in_zone/rfdetr_file_example.py:33-44 | examples/time_in_zone/rfdetr_naive_stream_example.py:33-44 | src/supervision/detection/utils/iou_and_nms.py:39-50 | src/supervision/detection/vlm.py:62-73 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/supervision/detection/utils/iou_and_nms.py:1548— src/supervision/detection/utils/iou_and_nms.py:1548-1595 | src/supervision/detection/utils/iou_and_nms.py:1719-1741 | src/supervision/detection/utils/iou_and_nms.py:1793-1827 | src/supervision/detection/utils/iou_and_nms.py:2345-2369 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/supervision/metrics/f1_score.py:132— src/supervision/metrics/f1_score.py:132-149 | src/supervision/metrics/mean_average_recall.py:366-383 | src/supervision/metrics/precision.py:135-152 | src/supervision/metrics/recall.py:160-177 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Duplicated block (21 lines × 2) src/supervision/metrics/core.py:89— src/supervision/metrics/core.py:89-109 | src/supervision/metrics/mean_average_recall.py:241-261 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/supervision/metrics/core.py:89` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) examples/heatmap_and_track/rfdetr_example.py:89— examples/heatmap_and_track/rfdetr_example.py:89-109 | examples/heatmap_and_track/script.py:93-113 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (21 lines × 2) examples/time_in_zone/rfdetr_file_example.py:69— examples/time_in_zone/rfdetr_file_example.py:69-89 | examples/time_in_zone/rfdetr_naive_stream_example.py:69-89 — before extracting anything, compare `examples/time_in_zone/rfdetr_file_example.py` and `examples/time_in_zone/rfdetr_naive_stream_example.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) src/supervision/detection/utils/masks.py:93— src/supervision/detection/utils/masks.py:93-102 | src/supervision/detection/utils/masks.py:104-113 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/supervision/key_points/annotators.py:489— src/supervision/key_points/annotators.py:489-498 | src/supervision/key_points/annotators.py:590-599 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/supervision/key_points/annotators.py:489` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/supervision/metrics/_confusion_matrix_metric.py:475— src/supervision/metrics/_confusion_matrix_metric.py:475-484 | src/supervision/metrics/mean_average_recall.py:887-896 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) src/supervision/_cv2/_drawing.py:1033— src/supervision/_cv2/_drawing.py:1033-1037 | src/supervision/_cv2/_drawing.py:1518-1522 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) src/supervision/detection/utils/iou_and_nms.py:2304— src/supervision/detection/utils/iou_and_nms.py:2304-2308 | src/supervision/detection/utils/iou_and_nms.py:2431-2435 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/supervision/detection/utils/iou_and_nms.py:2304` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/supervision/detection/utils/iou_and_nms.py:2303` calls `_validate_iou_threshold` and `src/supervision/detection/utils/iou_and_nms.py:2409` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) src/supervision/metrics/utils/object_size.py:120— src/supervision/metrics/utils/object_size.py:120-124 | src/supervision/metrics/utils/object_size.py:279-283 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/supervision/metrics/utils/object_size.py:286` calls `asarray` and `src/supervision/metrics/utils/object_size.py:125` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
internal.process_roboflow_result (cyclomatic 22) src/supervision/detection/utils/internal.py:296— internal.process_roboflow_result has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (internal.process_roboflow_result) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
internal.process_roboflow_result (cyclomatic 22) src/supervision/detection/utils/internal.py:310— internal.process_roboflow_result has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (internal.process_roboflow_result) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
TodoComment src/supervision/annotators/core.py:450— # TODO: replace isinstance dispatch with a MaskLike Protocol (separate PR) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment examples/time_in_zone/scripts/stream_from_file.py:86— # noqa: S603 # TODO: Validate command input to prevent execution of untrusted input — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
internal.process_roboflow_result (cognitive 37) src/supervision/detection/utils/internal.py:296— internal.process_roboflow_result has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (30 pts), ternaries 4, boolean chains 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (internal.process_roboflow_result) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
internal.process_roboflow_result (cognitive 37) src/supervision/detection/utils/internal.py:310— internal.process_roboflow_result has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (30 pts), ternaries 4, boolean chains 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (internal.process_roboflow_result) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×2
Edited copy of a member (26 corresponding lines) src/supervision/detection/utils/iou_and_nms.py:2248— src/supervision/detection/utils/iou_and_nms.py:2248-2336 | src/supervision/detection/utils/iou_and_nms.py:2378-2467 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) src/supervision/annotators/core.py:3141— src/supervision/annotators/core.py:3141-3166 | src/supervision/annotators/core.py:3333-3370 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×2
Edited copy of a member (10 corresponding lines) src/supervision/metrics/_confusion_matrix_metric.py:452— src/supervision/metrics/_confusion_matrix_metric.py:452-462 | src/supervision/metrics/mean_average_recall.py:821-833 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/supervision/annotators/core.py:3631— src/supervision/annotators/core.py:3631-3641 | src/supervision/annotators/core.py:3647-3656 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (79 corresponding lines) · ×2
Edited copy of a member (79 corresponding lines) src/supervision/detection/tools/inference_slicer.py:613— src/supervision/detection/tools/inference_slicer.py:613-691 | src/supervision/detection/tools/inference_slicer.py:698-786 — These two members are one piece of code written twice and then edited apart: 79 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (79 corresponding lines) examples/heatmap_and_track/rfdetr_example.py:31— examples/heatmap_and_track/rfdetr_example.py:31-109 | examples/heatmap_and_track/script.py:26-113 — These two members are one piece of code written twice and then edited apart: 79 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×2
Edited copy of a member (30 corresponding lines) src/supervision/metrics/core.py:86— src/supervision/metrics/core.py:86-115 | src/supervision/metrics/mean_average_recall.py:231-267 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) src/supervision/metrics/utils/object_size.py:140— src/supervision/metrics/utils/object_size.py:140-169 | src/supervision/metrics/utils/object_size.py:175-215 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×2
Edited copy of a member (25 corresponding lines) src/supervision/detection/utils/boxes.py:375— src/supervision/detection/utils/boxes.py:375-417 | src/supervision/detection/utils/iou_and_nms.py:408-432 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) src/supervision/metrics/f1_score.py:182— src/supervision/metrics/f1_score.py:182-206 | src/supervision/metrics/mean_average_recall.py:759-785 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (23 lines × 2) src/supervision/draw/color.py:159— src/supervision/draw/color.py:159-181 | src/supervision/draw/color.py:186-208 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (23 lines × 2) src/supervision/metrics/precision.py:185— src/supervision/metrics/precision.py:185-207 | src/supervision/metrics/recall.py:210-232 — before extracting anything, compare `src/supervision/metrics/precision.py` and `src/supervision/metrics/recall.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (15–17 lines × 2) src/supervision/metrics/mean_average_precision.py:1629— src/supervision/metrics/mean_average_precision.py:1629-1645 | src/supervision/metrics/mean_average_precision.py:1715-1729 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15–17 lines × 2) src/supervision/metrics/utils/object_size.py:246— src/supervision/metrics/utils/object_size.py:246-262 | src/supervision/metrics/utils/object_size.py:305-319 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) src/supervision/metrics/utils/aggregate.py:50— src/supervision/metrics/utils/aggregate.py:50-63 | src/supervision/metrics/utils/aggregate.py:111-124 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/supervision/metrics/utils/aggregate.py:47` calls `ensure_pandas_installed` and `src/supervision/metrics/utils/aggregate.py:109` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) src/supervision/_cv2/_drawing.py:1009— src/supervision/_cv2/_drawing.py:1009-1022 | src/supervision/_cv2/_drawing.py:1274-1287 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12–13 lines × 2) src/supervision/annotators/core.py:1509— src/supervision/annotators/core.py:1509-1520 | src/supervision/annotators/core.py:1921-1933 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12–13 lines × 2) src/supervision/metrics/_confusion_matrix_metric.py:438— src/supervision/metrics/_confusion_matrix_metric.py:438-449 | src/supervision/metrics/mean_average_recall.py:806-818 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/supervision/metrics/_confusion_matrix_metric.py:438` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) REDACTED:266— REDACTED:266-278 | src/supervision/dataset/formats/yolo.py:530-542 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) examples/time_in_zone/ultralytics_file_example.py:137— examples/time_in_zone/ultralytics_file_example.py:137-149 | examples/time_in_zone/ultralytics_naive_stream_example.py:58-70 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) src/supervision/detection/utils/iou_and_nms.py:1257— src/supervision/detection/utils/iou_and_nms.py:1257-1267 | src/supervision/detection/utils/iou_and_nms.py:1352-1362 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) examples/time_in_zone/inference_file_example.py:61— examples/time_in_zone/inference_file_example.py:61-71 | examples/time_in_zone/rfdetr_file_example.py:138-148 — before extracting anything, compare `examples/time_in_zone/inference_file_example.py` and `examples/time_in_zone/rfdetr_file_example.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) src/supervision/detection/core.py:2343— src/supervision/detection/core.py:2343-2348 | src/supervision/key_points/core.py:1596-1601 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) src/supervision/_cv2/_drawing.py:1000— src/supervision/_cv2/_drawing.py:1000-1005 | src/supervision/_cv2/_drawing.py:1266-1271 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 3) src/supervision/metrics/utils/object_size.py:129— src/supervision/metrics/utils/object_size.py:129-134 | src/supervision/metrics/utils/object_size.py:164-169 | src/supervision/metrics/utils/object_size.py:210-215 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/supervision/metrics/utils/object_size.py:208` calls `count_mask_pixels` and `src/supervision/metrics/utils/object_size.py:162` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 3) examples/speed_estimation/inference_example.py:33— examples/speed_estimation/inference_example.py:33-38 | examples/speed_estimation/ultralytics_example.py:32-37 | examples/speed_estimation/yolo_nas_example.py:33-38 — before extracting anything, compare `examples/speed_estimation/inference_example.py` and `examples/speed_estimation/ultralytics_example.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 82 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 3) src/supervision/metrics/f1_score.py:83— src/supervision/metrics/f1_score.py:83-94 | src/supervision/metrics/precision.py:86-97 | src/supervision/metrics/recall.py:111-122 — before extracting anything, compare `src/supervision/metrics/f1_score.py` and `src/supervision/metrics/precision.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 3) examples/tracking/inference_example.py:49— examples/tracking/inference_example.py:49-60 | examples/tracking/rfdetr_example.py:38-49 | examples/tracking/ultralytics_example.py:38-49 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (24 lines × 3) examples/count_people_in_zone/inference_example.py:35— examples/count_people_in_zone/inference_example.py:35-58 | examples/count_people_in_zone/rfdetr_example.py:39-62 | examples/count_people_in_zone/ultralytics_example.py:33-56 — before extracting anything, compare `examples/count_people_in_zone/inference_example.py` and `examples/count_people_in_zone/rfdetr_example.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (24 lines × 3) examples/count_people_in_zone/inference_example.py:100— examples/count_people_in_zone/inference_example.py:100-123 | examples/count_people_in_zone/rfdetr_example.py:104-127 | examples/count_people_in_zone/ultralytics_example.py:99-122 — before extracting anything, compare `examples/count_people_in_zone/inference_example.py` and `examples/count_people_in_zone/rfdetr_example.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (18 lines × 3) examples/traffic_analysis/inference_example.py:40— examples/traffic_analysis/inference_example.py:40-57 | examples/traffic_analysis/rfdetr_example.py:44-61 | examples/traffic_analysis/ultralytics_example.py:38-55 — before extracting anything, compare `examples/traffic_analysis/inference_example.py` and `examples/traffic_analysis/rfdetr_example.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 98 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 3) examples/traffic_analysis/inference_example.py:105— examples/traffic_analysis/inference_example.py:105-122 | examples/traffic_analysis/rfdetr_example.py:111-128 | examples/traffic_analysis/ultralytics_example.py:102-119 — before extracting anything, compare `examples/traffic_analysis/inference_example.py` and `examples/traffic_analysis/rfdetr_example.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 98 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 3) examples/time_in_zone/inference_file_example.py:37— examples/time_in_zone/inference_file_example.py:37-51 | examples/time_in_zone/rfdetr_file_example.py:116-130 | examples/time_in_zone/ultralytics_file_example.py:113-127 — before extracting anything, compare `examples/time_in_zone/inference_file_example.py` and `examples/time_in_zone/rfdetr_file_example.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 3) examples/count_people_in_zone/inference_example.py:15— examples/count_people_in_zone/inference_example.py:15-29 | examples/count_people_in_zone/rfdetr_example.py:18-32 | examples/count_people_in_zone/ultralytics_example.py:13-27 — before extracting anything, compare `examples/count_people_in_zone/inference_example.py` and `examples/count_people_in_zone/rfdetr_example.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) examples/time_in_zone/inference_file_example.py:60— examples/time_in_zone/inference_file_example.py:60-67 | examples/time_in_zone/rfdetr_file_example.py:137-144 | examples/time_in_zone/ultralytics_file_example.py:146-154 — before extracting anything, compare `examples/time_in_zone/inference_file_example.py` and `examples/time_in_zone/rfdetr_file_example.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/time_in_zone/inference_file_example.py:60` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 3) examples/tracking/inference_example.py:37— examples/tracking/inference_example.py:37-44 | examples/tracking/rfdetr_example.py:27-34 | examples/tracking/ultralytics_example.py:26-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Swallowed exception (caught, then discarded) src/supervision/utils/image_window.py:300— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/supervision/detection/vlm.py:307— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
KeyPoints.select (cyclomatic 42) src/supervision/key_points/core.py:1169— KeyPoints.select has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_video._mux_audio (cyclomatic 31) src/supervision/_cv2/_video.py:392— _video._mux_audio has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Detections.from_sam3 (cyclomatic 25) src/supervision/detection/core.py:1040— Detections.from_sam3 has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_ConfusionMatrixMetric._compute (cyclomatic 25) src/supervision/metrics/_confusion_matrix_metric.py:99— _ConfusionMatrixMetric._compute has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InferenceSlicer.__call__ (cyclomatic 23) src/supervision/detection/tools/inference_slicer.py:316— InferenceSlicer.__call__ has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
yolo.detections_to_yolo_annotations (cyclomatic 21) src/supervision/dataset/formats/yolo.py:615— yolo.detections_to_yolo_annotations has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
pycon_copy.document.addEventListener("DOMContentLoaded") (cyclomatic 21) docs/javascripts/pycon_copy.js:5— pycon_copy.document.addEventListener("DOMContentLoaded") has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 5 function items inside it that branch (handleSelectionCopy, a function literal at line 82, handleCopyButtonClick, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
coco.detections_to_coco_annotations (cyclomatic 20) src/supervision/dataset/formats/coco.py:431— coco.detections_to_coco_annotations has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
labelme.labelme_shapes_to_detections (cyclomatic 20) src/supervision/dataset/formats/labelme.py:63— labelme.labelme_shapes_to_detections has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
COCOEvaluator._accumulate (cyclomatic 20) src/supervision/metrics/mean_average_precision.py:1057— COCOEvaluator._accumulate has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_geometry._intersect_convex_convex (cyclomatic 19) src/supervision/_cv2/_geometry.py:258— _geometry._intersect_convex_convex has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CompactMask.from_coco_rle (cyclomatic 19) src/supervision/detection/compact_mask.py:976— CompactMask.from_coco_rle has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
compact_mask._rle_split_cols (cyclomatic 19) src/supervision/detection/compact_mask.py:435— compact_mask._rle_split_cols has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_contours._trace_borders (cyclomatic 17) src/supervision/_cv2/_contours.py:88— _contours._trace_borders has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_drawing._clip_line_endpoints (cyclomatic 17) src/supervision/_cv2/_drawing.py:288— _drawing._clip_line_endpoints has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InferenceSlicer._run_callback_batch (cyclomatic 17) src/supervision/detection/tools/inference_slicer.py:693— InferenceSlicer._run_callback_batch has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
vlm.from_florence_2 (cyclomatic 17) src/supervision/detection/vlm.py:518— vlm.from_florence_2 has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
vlm.from_google_gemini_2_5 (cyclomatic 17) src/supervision/detection/vlm.py:921— vlm.from_google_gemini_2_5 has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EdgeAnnotator.annotate (cyclomatic 17) src/supervision/key_points/annotators.py:170— EdgeAnnotator.annotate has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_color._cvt_color (cyclomatic 16) src/supervision/_cv2/_color.py:21— _color._cvt_color has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
vlm.from_qwen_2_5_vl (cyclomatic 16) src/supervision/detection/vlm.py:311— vlm.from_qwen_2_5_vl has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
KeyPoints.from_mediapipe (cyclomatic 16) src/supervision/key_points/core.py:568— KeyPoints.from_mediapipe has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
KeyPoints._get_by_2d_bool_mask (cyclomatic 16) src/supervision/key_points/core.py:1043— KeyPoints._get_by_2d_bool_mask has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MeanAveragePrecision._prepare_targets (cyclomatic 16) src/supervision/metrics/mean_average_precision.py:1620— MeanAveragePrecision._prepare_targets has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Detections.from_sam3 (cognitive 60) src/supervision/detection/core.py:1040— Detections.from_sam3 has cognitive complexity 60 (threshold 15). Drivers by points: if/else 16 (47 pts), boolean chains 7, loops 3 (6 pts) (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
_ConfusionMatrixMetric._compute (cognitive 60) src/supervision/metrics/_confusion_matrix_metric.py:99— _ConfusionMatrixMetric._compute has cognitive complexity 60 (threshold 15). Drivers by points: if/else 17 (51 pts), boolean chains 4, ternaries 1 (4 pts), loops 1 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
COCOEvaluator._accumulate (cognitive 58) src/supervision/metrics/mean_average_precision.py:1057— COCOEvaluator._accumulate has cognitive complexity 58 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 7 (21 pts), ternaries 1 (5 pts), boolean chains 1 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KeyPoints.select (cognitive 52) src/supervision/key_points/core.py:1169— KeyPoints.select has cognitive complexity 52 (threshold 15). Drivers by points: if/else 23 (37 pts), boolean chains 13, loops 1, ternaries 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_video._mux_audio (cognitive 48) src/supervision/_cv2/_video.py:392— _video._mux_audio has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (24 pts), ternaries 6 (14 pts), boolean chains 7, loops 2, error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
coco.detections_to_coco_annotations (cognitive 44) src/supervision/dataset/formats/coco.py:431— coco.detections_to_coco_annotations has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 5, error handling 1 (4 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InferenceSlicer.__call__ (cognitive 44) src/supervision/detection/tools/inference_slicer.py:316— InferenceSlicer.__call__ has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 5 (12 pts), boolean chains 6 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_drawing._clip_line_endpoints (cognitive 43) src/supervision/_cv2/_drawing.py:288— _drawing._clip_line_endpoints has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (27 pts), ternaries 4 (14 pts), boolean chains 2 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
compact_mask._rle_split_cols (cognitive 42) src/supervision/detection/compact_mask.py:435— compact_mask._rle_split_cols has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (32 pts), loops 4 (7 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
labelme.labelme_shapes_to_detections (cognitive 40) src/supervision/dataset/formats/labelme.py:63— labelme.labelme_shapes_to_detections has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (34 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_contours._trace_borders (cognitive 39) src/supervision/_cv2/_contours.py:88— _contours._trace_borders has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (28 pts), loops 4 (7 pts), boolean chains 4 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
yolo.detections_to_yolo_annotations (cognitive 36) src/supervision/dataset/formats/yolo.py:615— yolo.detections_to_yolo_annotations has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EdgeAnnotator.annotate (cognitive 35) src/supervision/key_points/annotators.py:170— EdgeAnnotator.annotate has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (26 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MeanAveragePrecision._prepare_targets (cognitive 34) src/supervision/metrics/mean_average_precision.py:1620— MeanAveragePrecision._prepare_targets has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (28 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
polygon_zone._detections_to_union_mask (cognitive 32) src/supervision/detection/tools/polygon_zone.py:130— polygon_zone._detections_to_union_mask has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (12 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_drawing._clip_line (cognitive 31) src/supervision/_cv2/_drawing.py:802— _drawing._clip_line has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 4 (14 pts), boolean chains 3 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
CompactMask.from_coco_rle (cognitive 31) src/supervision/detection/compact_mask.py:976— CompactMask.from_coco_rle has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConfusionMatrix.plot (cognitive 30) src/supervision/metrics/detection.py:1437— ConfusionMatrix.plot has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 4 (12 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_geometry._intersect_convex_convex (cognitive 29) src/supervision/_cv2/_geometry.py:258— _geometry._intersect_convex_convex has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 4 (6 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
coco.coco_annotations_to_masks (cognitive 29) src/supervision/dataset/formats/coco.py:120— coco.coco_annotations_to_masks has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InferenceSlicer._run_callback_batch (cognitive 29) src/supervision/detection/tools/inference_slicer.py:693— InferenceSlicer._run_callback_batch has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vlm.from_florence_2 (cognitive 27) src/supervision/detection/vlm.py:518— vlm.from_florence_2 has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (20 pts), loops 2 (5 pts), ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_drawing._fill_ellipse_arc_mask (cognitive 26) src/supervision/_cv2/_drawing.py:599— _drawing._fill_ellipse_arc_mask has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vlm.from_google_gemini_2_5 (cognitive 26) src/supervision/detection/vlm.py:921— vlm.from_google_gemini_2_5 has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, error handling 1 (3 pts), loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MeanAverageRecall._compute (cognitive 26) src/supervision/metrics/mean_average_recall.py:385— MeanAverageRecall._compute has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pycon_copy.document.addEventListener("DOMContentLoaded") (cognitive 26) docs/javascripts/pycon_copy.js:5— pycon_copy.document.addEventListener("DOMContentLoaded") has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 6). None of this is in the body itself: all 26 points belong to 5 function items inside it that branch (a function literal at line 82, handleSelectionCopy, handleCopyButtonClick, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
_drawing._fill_convex_fixed_point (cognitive 25) src/supervision/_cv2/_drawing.py:894— _drawing._fill_convex_fixed_point has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
core._merge_detection_group (cognitive 25) src/supervision/detection/core.py:3375— core._merge_detection_group has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (17 pts), ternaries 3 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
internal.get_data_item (cognitive 25) src/supervision/detection/utils/internal.py:977— internal.get_data_item has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (21 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
KeyPointMeanAveragePrecision._prepare_targets (cognitive 25) src/supervision/metrics/keypoint_mean_average_precision.py:570— KeyPointMeanAveragePrecision._prepare_targets has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 2 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
yolo.yolo_annotations_to_detections (cognitive 23) src/supervision/dataset/formats/yolo.py:387— yolo.yolo_annotations_to_detections has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vlm.from_qwen_2_5_vl (cognitive 23) src/supervision/detection/vlm.py:311— vlm.from_qwen_2_5_vl has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 3 (6 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_color._cvt_color (cognitive 22) src/supervision/_cv2/_color.py:21— _color._cvt_color has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_contours._follow_border (cognitive 22) src/supervision/_cv2/_contours.py:24— _contours._follow_border has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_drawing._fill_polygon_mask (cognitive 22) src/supervision/_cv2/_drawing.py:425— _drawing._fill_polygon_mask has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
masks.filter_segments_by_distance (cognitive 22) src/supervision/detection/utils/masks.py:374— masks.filter_segments_by_distance has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_geometry._simplify_slices (cognitive 21) src/supervision/_cv2/_geometry.py:97— _geometry._simplify_slices has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (6 pts), boolean chains 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TraceAnnotator.annotate (cognitive 21) src/supervision/annotators/core.py:2331— TraceAnnotator.annotate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 pts), error handling 1 (4 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
yolo_pose.key_points_to_yolo_pose_annotations (cognitive 21) src/supervision/dataset/formats/yolo_pose.py:391— yolo_pose.key_points_to_yolo_pose_annotations has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 3 (5 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_BaseVertexEllipseAnnotator._iter_ellipse_params (cognitive 21) src/supervision/key_points/annotators.py:364— _BaseVertexEllipseAnnotator._iter_ellipse_params has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
detection._split_detections_by_outcome (cognitive 21) src/supervision/metrics/detection.py:437— detection._split_detections_by_outcome has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (18 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
EvaluationDataset.get_annotation_ids (cognitive 21) src/supervision/metrics/mean_average_precision.py:337— EvaluationDataset.get_annotation_ids has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MeanAveragePrecision._prepare_predictions (cognitive 21) src/supervision/metrics/mean_average_precision.py:1710— MeanAveragePrecision._prepare_predictions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
file.list_files_with_extensions (cognitive 21) src/supervision/utils/file.py:116— file.list_files_with_extensions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LineZone.trigger (cognitive 20) src/supervision/detection/line_zone.py:196— LineZone.trigger has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
masks._masks_to_roi (cognitive 20) src/supervision/detection/utils/masks.py:589— masks._masks_to_roi has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
video.get_video_frames_generator (cognitive 20) src/supervision/utils/video.py:235— video.get_video_frames_generator has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (3 pts), error handling 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
pascal_voc.detections_to_pascal_voc (cognitive 19) REDACTED:108— pascal_voc.detections_to_pascal_voc has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Detections.select (cognitive 19) src/supervision/detection/core.py:2513— Detections.select has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 6 (7 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JSONSink.parse_detection_data (cognitive 19) src/supervision/detection/tools/json_sink.py:160— JSONSink.parse_detection_data has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (7 pts), if/else 4 (6 pts), ternaries 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vlm._recover_gemini_json_objects (cognitive 19) src/supervision/detection/vlm.py:661— vlm._recover_gemini_json_objects has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), error handling 1 (4 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VertexLabelAnnotator.annotate (cognitive 19) src/supervision/key_points/annotators.py:791— VertexLabelAnnotator.annotate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
detection.detections_to_tensor (cognitive 19) src/supervision/metrics/detection.py:275— detection.detections_to_tensor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
video._validate_and_setup_video (cognitive 19) src/supervision/utils/video.py:183— video._validate_and_setup_video has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, error handling 2 (3 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
video.process_video (cognitive 19) src/supervision/utils/video.py:446— video.process_video has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
check_doctest_fences._check_content (cognitive 18) .github/scripts/check_doctest_fences.py:15— check_doctest_fences._check_content has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Detections.from_azure_analyze_image (cognitive 18) src/supervision/detection/core.py:1188— Detections.from_azure_analyze_image has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LineZoneAnnotatorMulticlass.annotate (cognitive 18) src/supervision/detection/line_zone.py:1025— LineZoneAnnotatorMulticlass.annotate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 5 (8 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
internal.process_semantic_segmentation (cognitive 18) src/supervision/detection/utils/internal.py:643— internal.process_semantic_segmentation has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, ternaries 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
iou_and_nms.compact_mask_iou_batch (cognitive 18) src/supervision/detection/utils/iou_and_nms.py:909— iou_and_nms.compact_mask_iou_batch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (7 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
core._paint_masks_by_area (cognitive 17) src/supervision/annotators/core.py:508— core._paint_masks_by_area has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 2, boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
labelme.detections_to_labelme_shapes (cognitive 17) src/supervision/dataset/formats/labelme.py:325— labelme.detections_to_labelme_shapes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (4 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CSVSink.parse_detection_data (cognitive 17) src/supervision/detection/tools/csv_sink.py:201— CSVSink.parse_detection_data has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (7 pts), ternaries 3 (6 pts), if/else 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
KeyPoints._get_by_2d_bool_mask (cognitive 17) src/supervision/key_points/core.py:1043— KeyPoints._get_by_2d_bool_mask has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, loops 2, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
_image._resize (cognitive 16) src/supervision/_cv2/_image.py:235— _image._resize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Detections.remap_classes (cognitive 16) src/supervision/detection/core.py:3198— Detections.remap_classes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (16 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
converters.xyxy_to_mask (cognitive 16) src/supervision/detection/utils/converters.py:350— converters.xyxy_to_mask has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
internal.merge_data (cognitive 16) src/supervision/detection/utils/internal.py:784— internal.merge_data has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4 (5 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
internal.merge_metadata (cognitive 16) src/supervision/detection/utils/internal.py:876— internal.merge_metadata has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vlm._parse_gemini_boxes (cognitive 16) src/supervision/detection/vlm.py:751— vlm._parse_gemini_boxes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
utils.draw_image (cognitive 16) src/supervision/draw/utils.py:485— utils.draw_image has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
aggregate.plot_aggregate_metric_results (cognitive 16) src/supervision/metrics/utils/aggregate.py:79— aggregate.plot_aggregate_metric_results has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionTooLong: cookbooks-card.document.addEventListener("DOMContentLoaded") docs/javascripts/cookbooks-card.js:1— FunctionTooLong — document.addEventListener("DOMContentLoaded") runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (6 members, 50+ identical tokens) src/supervision/metrics/f1_score.py:106— src/supervision/metrics/f1_score.py:106-129 | src/supervision/metrics/keypoint_mean_average_precision.py:435-496 | src/supervision/metrics/mean_average_precision.py:1544-1579 | src/supervision/metrics/mean_average_recall.py:340-363 | src/supervision/metrics/precision.py:109-132 | src/supervision/metrics/recall.py:134-157 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×1
Edited copy of a member (40 corresponding lines) src/supervision/_cv2/_drawing.py:291— src/supervision/_cv2/_drawing.py:291-350 | src/supervision/_cv2/_drawing.py:805-844 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (50 corresponding lines) · ×1
Edited copy of a member (50 corresponding lines) src/supervision/metrics/_confusion_matrix_metric.py:367— src/supervision/metrics/_confusion_matrix_metric.py:367-416 | src/supervision/metrics/mean_average_recall.py:697-753 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) src/supervision/metrics/_confusion_matrix_metric.py:421— src/supervision/metrics/_confusion_matrix_metric.py:421-449 | src/supervision/metrics/mean_average_recall.py:790-818 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (73 corresponding lines) · ×1
Edited copy of a member (73 corresponding lines) src/supervision/annotators/core.py:1655— src/supervision/annotators/core.py:1655-1729 | src/supervision/draw/utils.py:197-269 — These two members are one piece of code written twice and then edited apart: 73 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (45 corresponding lines) · ×1
Edited copy of a member (45 corresponding lines) src/supervision/metrics/utils/object_size.py:326— src/supervision/metrics/utils/object_size.py:326-370 | src/supervision/metrics/utils/object_size.py:376-434 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (59 corresponding lines) · ×1
Edited copy of a member (59 corresponding lines) src/supervision/annotators/core.py:1313— src/supervision/annotators/core.py:1313-1371 | src/supervision/annotators/core.py:2807-2873 — These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×1
Edited copy of a member (33 corresponding lines) src/supervision/detection/tools/transformers.py:140— src/supervision/detection/tools/transformers.py:140-184 | src/supervision/detection/tools/transformers.py:190-222 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (56 corresponding lines) · ×1
Edited copy of a member (56 corresponding lines) src/supervision/detection/core.py:2957— src/supervision/detection/core.py:2957-3012 | src/supervision/detection/core.py:3120-3196 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 28+ corresponding lines) · ×1
Edited copies of one member (5 members, 28+ corresponding lines) src/supervision/metrics/f1_score.py:327— src/supervision/metrics/f1_score.py:327-354 | src/supervision/metrics/mean_average_precision.py:230-262 | src/supervision/metrics/mean_average_recall.py:199-228 | src/supervision/metrics/precision.py:330-360 | src/supervision/metrics/recall.py:353-380 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (44 corresponding lines) · ×1
Edited copy of a member (44 corresponding lines) src/supervision/classification/core.py:58— src/supervision/classification/core.py:58-101 | src/supervision/classification/core.py:134-185 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×1
Edited copy of a member (19 corresponding lines) src/supervision/validators/__init__.py:145— src/supervision/validators/__init__.py:145-163 | src/supervision/validators/__init__.py:243-262 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (49 corresponding lines) · ×1
Edited copy of a member (49 corresponding lines) src/supervision/annotators/core.py:275— src/supervision/annotators/core.py:275-323 | src/supervision/annotators/core.py:843-895 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (68 corresponding lines) · ×1
Edited copy of a member (68 corresponding lines) src/supervision/annotators/core.py:1435— src/supervision/annotators/core.py:1435-1502 | src/supervision/annotators/core.py:1805-1874 — These two members are one piece of code written twice and then edited apart: 68 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 16+ corresponding lines) · ×1
Edited copies of one member (3 members, 16+ corresponding lines) src/supervision/metrics/f1_score.py:260— src/supervision/metrics/f1_score.py:260-275 | src/supervision/metrics/precision.py:261-276 | src/supervision/metrics/recall.py:286-301 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (64 corresponding lines) · ×1
Edited copy of a member (64 corresponding lines) src/supervision/key_points/annotators.py:440— src/supervision/key_points/annotators.py:440-504 | src/supervision/key_points/annotators.py:541-604 — These two members are one piece of code written twice and then edited apart: 64 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (55 corresponding lines) · ×1
Edited copy of a member (55 corresponding lines) src/supervision/utils/image.py:232— src/supervision/utils/image.py:232-286 | src/supervision/utils/image.py:295-365 — These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×1
Edited copy of a member (15 corresponding lines) src/supervision/dataset/utils.py:465— src/supervision/dataset/utils.py:465-479 | src/supervision/dataset/utils.py:485-521 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×1
Edited copy of a member (12 corresponding lines) examples/time_in_zone/rfdetr_stream_example.py:30— examples/time_in_zone/rfdetr_stream_example.py:30-42 | src/supervision/detection/utils/iou_and_nms.py:74-85 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×1
Edited copy of a member (38 corresponding lines) src/supervision/detection/utils/iou_and_nms.py:1446— src/supervision/detection/utils/iou_and_nms.py:1446-1483 | src/supervision/detection/utils/iou_and_nms.py:1491-1539 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (47 corresponding lines) · ×1
Edited copy of a member (47 corresponding lines) src/supervision/detection/core.py:2657— src/supervision/detection/core.py:2657-2708 | src/supervision/key_points/core.py:1413-1459 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (47–48 lines × 2) src/supervision/annotators/core.py:2199— src/supervision/annotators/core.py:2199-2245 | src/supervision/annotators/core.py:2689-2736 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/supervision/annotators/core.py:2199` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (41–45 lines × 2) src/supervision/metrics/_confusion_matrix_metric.py:367— src/supervision/metrics/_confusion_matrix_metric.py:367-407 | src/supervision/metrics/mean_average_recall.py:697-741 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (40 lines × 2) src/supervision/annotators/core.py:1049— src/supervision/annotators/core.py:1049-1088 | src/supervision/annotators/core.py:2913-2955 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/supervision/annotators/core.py:2913` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (19–32 lines × 6) src/supervision/metrics/f1_score.py:106— src/supervision/metrics/f1_score.py:106-124 | src/supervision/metrics/keypoint_mean_average_precision.py:435-466 | src/supervision/metrics/mean_average_precision.py:1544-1562 | src/supervision/metrics/mean_average_recall.py:340-358 | src/supervision/metrics/precision.py:109-127 | src/supervision/metrics/recall.py:134-152 — before extracting anything, compare `src/supervision/metrics/f1_score.py` and `src/supervision/metrics/precision.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `predictions` to `Detections | list[Detections]` in one and `KeyPoints | list[KeyPoints]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (30–31 lines × 2) src/supervision/metrics/_confusion_matrix_metric.py:192— src/supervision/metrics/_confusion_matrix_metric.py:192-221 | src/supervision/metrics/mean_average_recall.py:435-465 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/supervision/metrics/_confusion_matrix_metric.py:192` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–29 lines × 4) src/supervision/detection/utils/iou_and_nms.py:1548— src/supervision/detection/utils/iou_and_nms.py:1548-1576 | src/supervision/detection/utils/iou_and_nms.py:1719-1728 | src/supervision/detection/utils/iou_and_nms.py:1793-1817 | src/supervision/detection/utils/iou_and_nms.py:2345-2359 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (26–27 lines × 2) src/supervision/annotators/core.py:1574— src/supervision/annotators/core.py:1574-1600 | src/supervision/annotators/core.py:1980-2005 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (26 lines × 2) src/supervision/draw/color.py:213— src/supervision/draw/color.py:213-238 | src/supervision/draw/color.py:242-267 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (19 lines × 2) src/supervision/dataset/core.py:239— src/supervision/dataset/core.py:239-257 | src/supervision/dataset/core.py:1741-1759 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18 lines × 4) src/supervision/metrics/f1_score.py:132— src/supervision/metrics/f1_score.py:132-149 | src/supervision/metrics/mean_average_recall.py:366-383 | src/supervision/metrics/precision.py:135-152 | src/supervision/metrics/recall.py:160-177 — before extracting anything, compare `src/supervision/metrics/f1_score.py` and `src/supervision/metrics/precision.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (13–14 lines × 2) src/supervision/dataset/core.py:732— src/supervision/dataset/core.py:732-745 | src/supervision/dataset/core.py:1626-1638 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/supervision/dataset/core.py:1641` calls `_check_key_points_carry_class_id` and `src/supervision/dataset/core.py:746` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12–14 lines × 2) src/supervision/detection/tools/inference_slicer.py:644— src/supervision/detection/tools/inference_slicer.py:644-657 | src/supervision/detection/tools/inference_slicer.py:742-753 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/supervision/detection/tools/inference_slicer.py:644` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 4) examples/time_in_zone/rfdetr_file_example.py:33— examples/time_in_zone/rfdetr_file_example.py:33-44 | examples/time_in_zone/rfdetr_naive_stream_example.py:33-44 | src/supervision/detection/utils/iou_and_nms.py:39-50 | src/supervision/detection/vlm.py:62-73 — before extracting anything, compare `examples/time_in_zone/rfdetr_file_example.py` and `examples/time_in_zone/rfdetr_naive_stream_example.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `value` to `ModelSize | str` in one and `OverlapFilter | str` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8–11 lines × 2) src/supervision/metrics/_confusion_matrix_metric.py:455— src/supervision/metrics/_confusion_matrix_metric.py:455-462 | src/supervision/metrics/mean_average_recall.py:823-833 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9–10 lines × 3) src/supervision/metrics/f1_score.py:346— src/supervision/metrics/f1_score.py:346-354 | src/supervision/metrics/precision.py:351-360 | src/supervision/metrics/recall.py:372-380 — before extracting anything, compare `src/supervision/metrics/f1_score.py` and `src/supervision/metrics/precision.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/supervision/metrics/f1_score.py:346` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 4) src/supervision/metrics/mean_average_precision.py:1804— src/supervision/metrics/mean_average_precision.py:1804-1818 | src/supervision/metrics/mean_average_precision.py:1819-1828 | src/supervision/metrics/mean_average_precision.py:1833-1842 | src/supervision/metrics/mean_average_precision.py:1847-1857 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/supervision/metrics/mean_average_precision.py:1804` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 3) src/supervision/validators/__init__.py:100— src/supervision/validators/__init__.py:100-109 | src/supervision/validators/__init__.py:123-132 | src/supervision/validators/__init__.py:176-185 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9–10 lines × 2) src/supervision/detection/utils/iou_and_nms.py:514— src/supervision/detection/utils/iou_and_nms.py:514-522 | src/supervision/detection/utils/iou_and_nms.py:523-532 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 3) REDACTED:268— REDACTED:268-276 | src/supervision/dataset/formats/yolo.py:532-540 | src/supervision/dataset/formats/yolo_pose.py:296-304 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (7–8 lines × 2) src/supervision/detection/utils/boxes.py:403— src/supervision/detection/utils/boxes.py:403-410 | src/supervision/detection/utils/iou_and_nms.py:421-427 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (22 lines × 4) src/supervision/depth/colormaps.py:54— src/supervision/depth/colormaps.py:54-83 | src/supervision/depth/core.py:61-88 | src/supervision/depth/core.py:121-142 | src/supervision/depth/core.py:168-189 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `value` to `DepthColormap | str` in one and `DepthKind | str` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (22 lines × 2) src/supervision/detection/tools/csv_sink.py:151— src/supervision/detection/tools/csv_sink.py:151-172 | src/supervision/detection/tools/json_sink.py:136-157 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 3) src/supervision/metrics/f1_score.py:164— src/supervision/metrics/f1_score.py:164-176 | src/supervision/metrics/precision.py:167-179 | src/supervision/metrics/recall.py:192-204 — before extracting anything, compare `src/supervision/metrics/f1_score.py` and `src/supervision/metrics/precision.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/supervision/metrics/f1_score.py:164` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication· Near-duplicate member family (6 members, 23 shared lines) · ×1
Near-duplicate member family (6 members, 23 shared lines) examples/time_in_zone/inference_naive_stream_example.py:25— examples/time_in_zone/inference_naive_stream_example.py:25-104 | examples/time_in_zone/inference_stream_example.py:41-83 | examples/time_in_zone/rfdetr_naive_stream_example.py:102-182 | examples/time_in_zone/rfdetr_stream_example.py:105-143 | examples/time_in_zone/ultralytics_naive_stream_example.py:25-108 | examples/time_in_zone/ultralytics_stream_example.py:42-83 — These 6 members are variants of one another: a block of 23 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Near-duplicate member family (4 members, 42 shared lines) · ×1
Near-duplicate member family (4 members, 42 shared lines) examples/speed_estimation/inference_example.py:57— examples/speed_estimation/inference_example.py:57-156 | examples/speed_estimation/rfdetr_example.py:58-148 | examples/speed_estimation/ultralytics_example.py:54-140 | examples/speed_estimation/yolo_nas_example.py:55-143 — These 4 members are variants of one another: a block of 42 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 40 shared lines) · ×1
Near-duplicate member family (3 members, 40 shared lines) examples/time_in_zone/inference_file_example.py:25— examples/time_in_zone/inference_file_example.py:25-94 | examples/time_in_zone/rfdetr_file_example.py:102-171 | examples/time_in_zone/ultralytics_file_example.py:87-192 — These 3 members are variants of one another: a block of 40 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 17 shared lines) · ×1
Near-duplicate member family (3 members, 17 shared lines) examples/traffic_analysis/inference_example.py:160— examples/traffic_analysis/inference_example.py:160-180 | examples/traffic_analysis/rfdetr_example.py:167-188 | examples/traffic_analysis/ultralytics_example.py:157-177 — These 3 members are variants of one another: a block of 17 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication· Edited copies of one member (3 members, 48+ corresponding lines) · ×1
Edited copies of one member (3 members, 48+ corresponding lines) examples/count_people_in_zone/inference_example.py:135— examples/count_people_in_zone/inference_example.py:135-192 | examples/count_people_in_zone/rfdetr_example.py:138-185 | examples/count_people_in_zone/ultralytics_example.py:133-180 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 48 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 34+ corresponding lines) · ×1
Edited copies of one member (3 members, 34+ corresponding lines) examples/tracking/inference_example.py:18— examples/tracking/inference_example.py:18-60 | examples/tracking/rfdetr_example.py:16-49 | examples/tracking/ultralytics_example.py:15-49 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 34 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 20+ corresponding lines) · ×1
Edited copies of one member (3 members, 20+ corresponding lines) examples/traffic_analysis/inference_example.py:83— examples/traffic_analysis/inference_example.py:83-102 | examples/traffic_analysis/rfdetr_example.py:87-107 | examples/traffic_analysis/ultralytics_example.py:80-99 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×1
Edited copy of a member (16 corresponding lines) examples/time_in_zone/rfdetr_file_example.py:50— examples/time_in_zone/rfdetr_file_example.py:50-65 | examples/time_in_zone/rfdetr_naive_stream_example.py:50-65 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×1
Edited copy of a member (34 corresponding lines) examples/time_in_zone/rfdetr_stream_example.py:156— examples/time_in_zone/rfdetr_stream_example.py:156-189 | examples/time_in_zone/ultralytics_stream_example.py:95-133 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) examples/count_people_in_zone/inference_example.py:67— examples/count_people_in_zone/inference_example.py:67-90 | examples/count_people_in_zone/ultralytics_example.py:65-89 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 2+ corresponding lines) · ×1
Edited copies of one member (3 members, 2+ corresponding lines) examples/traffic_analysis/inference_example.py:31— examples/traffic_analysis/inference_example.py:31-32 | examples/traffic_analysis/rfdetr_example.py:33-35 | examples/traffic_analysis/ultralytics_example.py:29-30 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 3+ corresponding lines) · ×1
Edited copies of one member (4 members, 3+ corresponding lines) examples/speed_estimation/inference_example.py:28— examples/speed_estimation/inference_example.py:28-30 | examples/speed_estimation/rfdetr_example.py:28-31 | examples/speed_estimation/ultralytics_example.py:27-29 | examples/speed_estimation/yolo_nas_example.py:28-30 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×1
Edited copy of a member (7 corresponding lines) examples/compact_mask/bench_inference_api.py:310— examples/compact_mask/bench_inference_api.py:310-316 | examples/compact_mask/benchmark.py:241-252 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (37 lines × 2) examples/heatmap_and_track/rfdetr_example.py:47— examples/heatmap_and_track/rfdetr_example.py:47-83 | examples/heatmap_and_track/script.py:42-78 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (4–35 lines × 4) examples/speed_estimation/inference_example.py:122— examples/speed_estimation/inference_example.py:122-156 | examples/speed_estimation/rfdetr_example.py:119-122 | examples/speed_estimation/ultralytics_example.py:106-140 | examples/speed_estimation/yolo_nas_example.py:109-143 — before extracting anything, compare `examples/speed_estimation/inference_example.py` and `examples/speed_estimation/rfdetr_example.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (31 lines × 3) examples/traffic_analysis/inference_example.py:127— examples/traffic_analysis/inference_example.py:127-157 | examples/traffic_analysis/rfdetr_example.py:134-164 | examples/traffic_analysis/ultralytics_example.py:124-154 — before extracting anything, compare `examples/traffic_analysis/inference_example.py` and `examples/traffic_analysis/rfdetr_example.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 98 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (30 lines × 3) examples/count_people_in_zone/inference_example.py:163— examples/count_people_in_zone/inference_example.py:163-192 | examples/count_people_in_zone/rfdetr_example.py:156-185 | examples/count_people_in_zone/ultralytics_example.py:151-180 — before extracting anything, compare `examples/count_people_in_zone/inference_example.py` and `examples/count_people_in_zone/rfdetr_example.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (26 lines × 4) examples/speed_estimation/inference_example.py:79— examples/speed_estimation/inference_example.py:79-104 | examples/speed_estimation/rfdetr_example.py:72-97 | examples/speed_estimation/ultralytics_example.py:65-90 | examples/speed_estimation/yolo_nas_example.py:66-91 — before extracting anything, compare `examples/speed_estimation/inference_example.py` and `examples/speed_estimation/rfdetr_example.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (20 lines × 3) examples/time_in_zone/inference_naive_stream_example.py:37— examples/time_in_zone/inference_naive_stream_example.py:37-56 | examples/time_in_zone/rfdetr_naive_stream_example.py:116-135 | examples/time_in_zone/ultralytics_naive_stream_example.py:37-56 — before extracting anything, compare `examples/time_in_zone/inference_naive_stream_example.py` and `examples/time_in_zone/rfdetr_naive_stream_example.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (16–19 lines × 9) examples/time_in_zone/inference_file_example.py:72— examples/time_in_zone/inference_file_example.py:72-88 | examples/time_in_zone/inference_naive_stream_example.py:82-98 | examples/time_in_zone/inference_stream_example.py:65-81 | examples/time_in_zone/rfdetr_file_example.py:149-165 | examples/time_in_zone/rfdetr_naive_stream_example.py:159-175 | examples/time_in_zone/rfdetr_stream_example.py:126-141 | examples/time_in_zone/ultralytics_file_example.py:160-178 | examples/time_in_zone/ultralytics_naive_stream_example.py:86-102 | examples/time_in_zone/ultralytics_stream_example.py:65-81 — before extracting anything, compare `examples/time_in_zone/inference_file_example.py` and `examples/time_in_zone/inference_naive_stream_example.py` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/time_in_zone/ultralytics_file_example.py:184` calls `write_frame` and `examples/time_in_zone/inference_file_example.py:91` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (19 lines × 3) examples/time_in_zone/inference_naive_stream_example.py:63— examples/time_in_zone/inference_naive_stream_example.py:63-81 | examples/time_in_zone/rfdetr_naive_stream_example.py:140-158 | examples/time_in_zone/ultralytics_naive_stream_example.py:67-85 — before extracting anything, compare `examples/time_in_zone/inference_naive_stream_example.py` and `examples/time_in_zone/rfdetr_naive_stream_example.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 2) examples/time_in_zone/inference_file_example.py:37— examples/time_in_zone/inference_file_example.py:37-54 | examples/time_in_zone/rfdetr_file_example.py:116-133 — before extracting anything, compare `examples/time_in_zone/inference_file_example.py` and `examples/time_in_zone/rfdetr_file_example.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 3) examples/traffic_analysis/inference_example.py:164— examples/traffic_analysis/inference_example.py:164-180 | examples/traffic_analysis/rfdetr_example.py:172-188 | examples/traffic_analysis/ultralytics_example.py:161-177 — before extracting anything, compare `examples/traffic_analysis/inference_example.py` and `examples/traffic_analysis/rfdetr_example.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 98 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (15–16 lines × 3) examples/time_in_zone/inference_stream_example.py:45— examples/time_in_zone/inference_stream_example.py:45-60 | examples/time_in_zone/rfdetr_stream_example.py:107-121 | examples/time_in_zone/ultralytics_stream_example.py:45-60 — before extracting anything, compare `examples/time_in_zone/inference_stream_example.py` and `examples/time_in_zone/rfdetr_stream_example.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/time_in_zone/inference_stream_example.py:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/time_in_zone/inference_stream_example.py:44` calls `from_inference` and `examples/time_in_zone/rfdetr_stream_example.py:106` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12–15 lines × 4) examples/speed_estimation/inference_example.py:113— examples/speed_estimation/inference_example.py:113-127 | examples/speed_estimation/rfdetr_example.py:105-116 | examples/speed_estimation/ultralytics_example.py:97-111 | examples/speed_estimation/yolo_nas_example.py:100-114 — before extracting anything, compare `examples/speed_estimation/inference_example.py` and `examples/speed_estimation/rfdetr_example.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11–12 lines × 3) examples/time_in_zone/rfdetr_file_example.py:50— examples/time_in_zone/rfdetr_file_example.py:50-61 | examples/time_in_zone/rfdetr_naive_stream_example.py:50-61 | examples/time_in_zone/rfdetr_stream_example.py:48-58 — before extracting anything, compare `examples/time_in_zone/rfdetr_file_example.py` and `examples/time_in_zone/rfdetr_naive_stream_example.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8–10 lines × 2) examples/time_in_zone/inference_file_example.py:59— examples/time_in_zone/inference_file_example.py:59-66 | examples/time_in_zone/ultralytics_file_example.py:145-154 — before extracting anything, compare `examples/time_in_zone/inference_file_example.py` and `examples/time_in_zone/ultralytics_file_example.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/time_in_zone/inference_file_example.py:59` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) examples/compact_mask/bench_inference_api.py:332— examples/compact_mask/bench_inference_api.py:332-339 | examples/compact_mask/benchmark.py:921-932 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 6) examples/time_in_zone/inference_naive_stream_example.py:67— examples/time_in_zone/inference_naive_stream_example.py:67-73 | examples/time_in_zone/inference_stream_example.py:50-56 | examples/time_in_zone/rfdetr_naive_stream_example.py:144-150 | examples/time_in_zone/rfdetr_stream_example.py:111-117 | examples/time_in_zone/ultralytics_naive_stream_example.py:71-77 | examples/time_in_zone/ultralytics_stream_example.py:50-56 — before extracting anything, compare `examples/time_in_zone/inference_naive_stream_example.py` and `examples/time_in_zone/rfdetr_naive_stream_example.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 2) examples/traffic_analysis/rfdetr_example.py:198— examples/traffic_analysis/rfdetr_example.py:198-214 | examples/traffic_analysis/ultralytics_example.py:187-203 — before extracting anything, compare `examples/traffic_analysis/rfdetr_example.py` and `examples/traffic_analysis/ultralytics_example.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 115 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
X2 · Cancellation propagation· Async function without AbortSignal · ×1
Async function without AbortSignal: renderCard docs/javascripts/cookbooks-card.js:31— `renderCard` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
Duplicated predicate src/supervision/depth/core.py:1025— `box.shape != (4,) or not np.isfinite(box).all()` appears character-identically in 2 files — src/supervision/depth/core.py, src/supervision/detection/vlm.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/supervision/dataset/formats/createml.py:285— `class_index < 0 or class_index >= len(classes)` appears character-identically in 2 files — src/supervision/dataset/formats/createml.py, src/supervision/dataset/formats/labelme.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/supervision/metrics/_confusion_matrix_metric.py:469— `detections.is_empty() or size_category == ObjectSizeCategory.ANY` appears character-identically in 2 files — src/supervision/metrics/_confusion_matrix_metric.py, src/supervision/metrics/mean_average_recall.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/supervision/classification/core.py:17— `isinstance(class_id, np.ndarray) and class_id.shape == (n,)` appears character-identically in 2 files — src/supervision/classification/core.py, src/supervision/validators/__init__.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/supervision/classification/core.py:25— `isinstance(confidence, np.ndarray) and confidence.shape == (n,)` appears character-identically in 2 files — src/supervision/classification/core.py, src/supervision/validators/__init__.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/supervision/dataset/utils.py:77— `isinstance(value, (int, np.integer)) and not isinstance(value, bool)` appears character-identically in 2 files — src/supervision/dataset/utils.py, src/supervision/detection/compact_mask.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/supervision/detection/tools/csv_sink.py:170— `isinstance(value, (list, tuple)) and len(value) == n` appears character-identically in 2 files — src/supervision/detection/tools/csv_sink.py, src/supervision/detection/tools/json_sink.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/supervision/detection/utils/iou_and_nms.py:365— `len(boxes_detection) == 0 or len(boxes_true) == 0` appears character-identically in 2 files — src/supervision/detection/utils/iou_and_nms.py, src/supervision/metrics/mean_average_precision.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/supervision/depth/annotators.py:247— `math.isfinite(low) and math.isfinite(high)` appears character-identically in 2 files — src/supervision/depth/annotators.py, src/supervision/depth/core.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate REDACTED:211— `not polygons and not mask_to_polygons(mask=mask)` appears character-identically in 2 files — REDACTED, src/supervision/dataset/formats/yolo.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/supervision/detection/tools/csv_sink.py:120— `parent_directory and not os.path.exists(parent_directory)` appears character-identically in 2 files — src/supervision/detection/tools/csv_sink.py, src/supervision/detection/tools/json_sink.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/supervision/annotators/core.py:3153— `position == Position.CENTER or position == Position.CENTER_OF_MASS` appears character-identically in 2 files — src/supervision/annotators/core.py, src/supervision/annotators/utils.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate src/supervision/metrics/_confusion_matrix_metric.py:167— `predictions.class_id is None or targets.class_id is None` appears character-identically in 3 files — src/supervision/metrics/_confusion_matrix_metric.py, src/supervision/metrics/detection.py, src/supervision/metrics/mean_average_recall.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 1 significant file(s) lose their only recent owner: src/supervision/_cv2/_text.py. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (2 single-owned of 72 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 72 of the 94 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: src/supervision/depth/readers.py.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation· No architecture diagram/doc · ×1
No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
No SAST .github/workflows/ci-build-docs.yml:6— No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 14 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling· Dependabot does not watch uv · ×1
Dependabot does not watch uv .github/dependabot.yml:2— `.github/dependabot.yml` schedules updates, but no `package-ecosystem` entry covers `uv`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list.
Security headers incomplete docs/_headers:1— Set: Content-Security-Policy, Permissions-Policy, Referrer-Policy, Strict-Transport-Security, X-Content-Type-Options. Missing: X-Frame-Options — the four headers that carry the points of this card's security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each. (−0.5 on this card.)
X2 · Cancellation propagation· Not all async functions that make a request accept an AbortSignal · ×1
Not all async functions that make a request accept an AbortSignal — Only 0/1 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
Dependency hygiene PARTLY measured — Python dependencies read, no exact pin to grade for currency — This repository's Python dependencies were read: 10 shipped distribution(s) across 1 manifest(s) (25 development or optional declaration(s) excluded, because a consumer does not install them). Whether any of them is behind its current release is the dependency-CURRENCY question, and no declaration here carries an EXACT pin to ask it about — every one is a floor or a range, which installs the newest release it admits and therefore cannot be behind one. That is a healthy declaration style, NOT a defect and NOT a gap in this analyzer; there is simply no currency question to answer. This is NOT a finding that these dependencies are current or healthy. Lockfiles are deliberately not read (poetry.lock, REDACTED, Pipfile.lock, pdm.lock): the four disagree about dev/optional membership, and misreading one would charge a test-only package a consumer never receives. Known CVEs in the same dependency graph are a separate question, reported under D30.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1d790-7440-7c44-b78d-fce0edc26870 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 6 · Warnings: 288 · Recommendations: 22 · Info: 1 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 00:58 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.