Public report of signag/raspi-cam-srv, published 22 October 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.10.5). Watchdog 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, 22 October 2026, 21:07 UTC · Survey ID cd_c5453b588d6d442aa0db45a396dbddf8
signag/raspi-cam-srv
Measured 22 October 2026, 21:05 UTC, at code version af7579a
Test distribution is not measured: No automated tests.
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
Down 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: 34,852 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 0.2 person-years · Weakest lens: Production Readiness, 21
Findings by how serious they are
31 critical639 serious31 minor
15 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks 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
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
22 October 2026, 21:05 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 Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
The score is deterministic, which means the same code always gets the same score. Watchdog works 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 ▸
60of 64 dimensions measured by tools. The other 4 are advisory notes from an AI model, which explain the code but don't count towards the score.
688of 701 findings point to an exact file and line, so you can open each one in the code. The other 13 concern the repository as a whole, such as missing documentation.
64dimensions across 6 lenses, read from 34,852 lines of product code in 1 project.
signag/raspi-cam-srv scores 38 out of 100 and is rated Weak, while five of its six lenses score higher still: Architecture at 85, Code Health at 73, Security and Compliance at 64 and Maturity at 54, all rated Adequate, and Accessibility at 41, rated Weak.
The score is lower than those five because the weakest lens counts most, and here that is Production Readiness, which scores 21 and is rated Critical. Its Code Coverage dimension scores 0 out of 10, and until that reaches 4, Production Readiness can't be rated higher than Adequate. The first actions are to resolve the 1 No automated tests finding(s) in Code Coverage and to resolve the 1 No tests found finding(s) in Test Distribution, and if Production Readiness rose to 70, the score would rise from 38 to about 52.
31 findings are critical: 14 in Keyboard semantics, seven in Forms & labels, four in Static Analysis (SAST), three in IaC & Container Security, two in Text alternatives and one in Code Coverage.
Watchdog couldn't measure 12 dimensions in this code, among them Internal API Consistency, Navigability and Data Protection, so they are left out of the score. The product code is 34,852 lines, which would take an estimated 0.2 person-years, around €30,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.
If Production Readiness rose from 21 to 70, the lowest score rated Strong, the score would rise from 38 to about 52.
Code composition: what the lines of code are
Product code 100%
New since the last survey: 11 findings
These 11 critical or serious findings weren't in the previous survey, on 8 October 2026.
Visual & motion safety · Focus outline removed in CSS without a :focus replacement raspiCamSrv/static/w3.css
Visual & motion safety · Focus outline removed in CSS without a :focus replacement raspiCamSrv/static/w3.css
Visual & motion safety · Focus outline removed in CSS without a :focus replacement raspiCamSrv/static/w3.css
Visual & motion safety · Animation without a prefers-reduced-motion guard raspiCamSrv/static/w3.css
Visual & motion safety · Animation without a prefers-reduced-motion guard raspiCamSrv/static/w3.css
Visual & motion safety · Animation without a prefers-reduced-motion guard raspiCamSrv/static/w3.css
Visual & motion safety · Animation without a prefers-reduced-motion guard raspiCamSrv/static/w3.css
Visual & motion safety · Animation without a prefers-reduced-motion guard raspiCamSrv/static/w3.css
Visual & motion safety · Animation without a prefers-reduced-motion guard raspiCamSrv/static/w3.css
Visual & motion safety · Animation without a prefers-reduced-motion guard raspiCamSrv/static/w3.css
Visual & motion safety · Animation without a prefers-reduced-motion guard raspiCamSrv/static/w3.css
Watchdog compares 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.
Rebuild cost: about €30,000 · Estimate
Cost to rebuild
€9,900 to €49,000, for 164 to 521 hours of work, about 0.2 person-years for one engineer
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.7 at a score of 38. 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: 34,852 lines of product code
How the estimate is made: Watchdog prices 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
Resolve the 1 No automated tests finding(s) in Code Coverage.
Raises the score by about 14 points · Low effort · Code Coverage
2
Resolve the 1 No tests found finding(s) in Test Distribution.
Raises the score by about 14 points · Low effort · Test Distribution
3
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Raises the score by about 3 points · Low effort · ADR Quality
Diagnosis: what the measurements show together
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 €30,000 to build again, about 0.2 person-years of work. Its weakest lens is Production Readiness, at 21 (Critical). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No automated tests finding(s) in Code Coverage. Of all the actions in this report, it raises the score most for the work it takes: about 14 points for low effort, because it clears the 1 Code Coverage findings. 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 5.6 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 6% to 14% on every change. The history of the code shows how much it changes: about 368 lines over the last 90 days, which is about 1,492 lines a year. At that pace, the extra work comes to an estimated 0.2 to 1.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 Watchdog's 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; 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.
22 modules, with 8 dependencies between them. Every module uses only modules listed above it, so there are no loops.
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.
raspiCamSrv.photoseriesCfg uses raspiCamSrv.camCfg, so a change to raspiCamSrv.camCfg can break raspiCamSrv.photoseriesCfg, while a change to raspiCamSrv.photoseriesCfg can't break raspiCamSrv.camCfg.
Position
Below the diagonal: raspiCamSrv.photoseriesCfg uses a module listed above it, which is the healthy direction.
raspiCamSrv.stereoCam uses raspiCamSrv.camCfg, so a change to raspiCamSrv.camCfg can break raspiCamSrv.stereoCam, while a change to raspiCamSrv.stereoCam can't break raspiCamSrv.camCfg.
Position
Below the diagonal: raspiCamSrv.stereoCam uses a module listed above it, which is the healthy direction.
raspiCamSrv.triggerHandler uses raspiCamSrv.camCfg, so a change to raspiCamSrv.camCfg can break raspiCamSrv.triggerHandler, while a change to raspiCamSrv.triggerHandler can't break raspiCamSrv.camCfg.
Position
Below the diagonal: raspiCamSrv.triggerHandler uses a module listed above it, which is the healthy direction.
raspiCamSrv uses raspiCamSrv.camCfg, so a change to raspiCamSrv.camCfg can break raspiCamSrv, while a change to raspiCamSrv can't break raspiCamSrv.camCfg.
Position
Below the diagonal: raspiCamSrv uses a module listed above it, which is the healthy direction.
raspiCamSrv uses raspiCamSrv.photoseriesCfg, so a change to raspiCamSrv.photoseriesCfg can break raspiCamSrv, while a change to raspiCamSrv can't break raspiCamSrv.photoseriesCfg.
Position
Below the diagonal: raspiCamSrv uses a module listed above it, which is the healthy direction.
raspiCamSrv.camera_pi uses raspiCamSrv.camCfg, so a change to raspiCamSrv.camCfg can break raspiCamSrv.camera_pi, while a change to raspiCamSrv.camera_pi can't break raspiCamSrv.camCfg.
Position
Below the diagonal: raspiCamSrv.camera_pi uses a module listed above it, which is the healthy direction.
raspiCamSrv.camera_pi uses raspiCamSrv.photoseriesCfg, so a change to raspiCamSrv.photoseriesCfg can break raspiCamSrv.camera_pi, while a change to raspiCamSrv.camera_pi can't break raspiCamSrv.photoseriesCfg.
Position
Below the diagonal: raspiCamSrv.camera_pi uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 73% · Adequate · gated by D2 ·
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
A05:2025 — Injection
61
High / Critical
A02:2025 — Security Misconfiguration
6
High / Critical
Roadmap
First, establish a CI workflow that builds and runs the test suite on every push to address the lack of automated testing and test distribution. Integrate security tooling like bandit or semgrep into this pipeline to ensure security regressions fail the build immediately. Finally, improve accessibility by making custom controls keyboard-operable and fixing anchor elements to ensure proper keyboard semantics.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No automated tests finding(s) in Code Coverage.
Run what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
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.
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 — 31
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 — 639
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 — 31
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 15
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
Watchdog 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. 60 of 64 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 4 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three 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; ◐ Advisory — an LLM prose judgement. 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; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 64 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, 688 of 701 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, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — 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.
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 11 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.
D16 Bus Factor — 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. Single-maintainer repository — bus factor is not applicable (2 contributor(s) across 308 commit(s) sampled, automation and bot accounts excluded). One of them holds 98% of the history; the other 1 hold 2% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
D22 Internal API Consistency — not measured this run — Watchdog 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: 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.
D27 Navigability — not measured this run — Watchdog 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. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
AX6 Interface segregation — not measured this run — Watchdog 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.
AXR1 Runtime accessibility — not measured this run — Watchdog 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. Render strategy: boot via DockerCompose (REDACTED). compose up failed (exit 17 — an image could not be built) — raspi-cam-srv Pulling raspi-cam-srv Warning Get "https://registry-1.docker.io/v2/": Forbidden failed to solve: failed to resolve source metadata for docker.io/docker/dockerfile:1: failed to do request: Head "https://registry-1.docker.io/v2/docker/dockerfile/manifests/1": Forbidden; runtime evidence skipped.
C1 Data Protection — not measured this run — Watchdog 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 — Watchdog 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 no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala 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.
IC1 Incompleteness & stubs — not measured this run — Watchdog 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 no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala 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.
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.
S1 Web-Security Posture — not measured this run — Watchdog 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 web-security 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 web-security controls.
X16 Unfloored truncation loop — not measured this run — Watchdog 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 JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, 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.
X18 Disposal-pattern correctness — not measured this run — Watchdog 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 JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, 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.
X29 Per-element action decided by a fixed element — not measured this run — Watchdog 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 JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala or Kotlin was found in this repository, 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.
X5 Nullable reference types — not measured this run — Watchdog 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 (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does 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.
D8 Code Coverage: Coverage is measured by building and running the test suite inside Watchdog's isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
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.
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 is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
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 requirements.txt, 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.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
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 REDACTED (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.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
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.
C4 Data Retention: This control is scored from in-repo evidence only — its real-world effectiveness, exercised only at runtime, is outside a static scan.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
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.
The LLM boundary
LLM-set scores this run (4): D19, D21, D26, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
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.
+ 82 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 5 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with Camera.applyControls (cyclomatic 85), photoseries.tlseries_properties (cyclomatic 77), CameraController.requestConfig (cyclomatic 72). — 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 5 together lifts Cyclomatic Complexity from 4.8 to about 5.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Stand up a CI pipeline, then gate Cyclomatic Complexity in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
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.
+ 207 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 212 bodies over 15 down to 15 or less in Cognitive Complexity — start with photoseries.tlseries_properties (cognitive 327), Camera._photoSeriesThread (cognitive 216), config.liveViewCfg (cognitive 192). — 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 212 together lifts Cognitive Complexity from 2.0 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
Stand up a CI pipeline, then gate Cognitive Complexity in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.0 / 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.
TooManyMethods: Camera · ×2raspiCamSrv/camera_pi.py:1503
What to do
Resolve the 15 FileTooLong finding(s) in God Classes — start with REDACTED, camera_pi.py, REDACTED. — One of this dimension's main actionable groups (15 warning-level).
Resolve the 2 TooManyMethods finding(s) in God Classes — start with camera_pi.py, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
Stand up a CI pipeline, then gate God Classes in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
196 duplicated block group(s) detected. A further 16 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 106 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 10 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with triggerHandler.py (3), REDACTED (2), api.py. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 9 Duplicated block (14 lines × 2) finding(s) in Code Duplication — start with api.py (2), REDACTED (2), auth.py. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 8 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with motionAlgoIB.py (2), api.py, REDACTED. — One of this dimension's main actionable groups (8 warning-level).
Stand up a CI pipeline, then gate Code Duplication in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
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.
Resolve the 3 Low cohesion finding(s) in Cohesion (LCOM4) — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
Stand up a CI pipeline, then gate Cohesion (LCOM4) in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D8 · Code Coverage0.0 / 10Critical✓ Tool-verified
What it measures: How much of the code is actually exercised by tests.
Method: Coverage from coverlet runs or committed reports (Cobertura/OpenCover/lcov), computed per-file with structured exclusions for generated, trivial, and glue code. When the suite can't be built/run in-image AND no report is committed, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.
No automated tests — no test code was found in this repository.
No automated tests
What to do
Resolve the 1 No automated tests finding(s) in Code Coverage. — One of this dimension's main actionable groups (1 issue-level).
Stand up a CI pipeline, then gate Code Coverage in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d8_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution0.0 / 10Critical✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
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 38 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 11 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (27 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. 5 of them publish no licence on PyPI this pass can read; that is missing data, not a violation, and none of them is charged.
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.
Resolve the 2 Hotspot finding(s) in Churn × Complexity Hotspots — start with motionDetector.py, __init__.py. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d15_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.
6 deducted task-comment markers across 34852 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.
TodoComment · ×6raspiCamSrv/sun.py:81
What to do
Resolve the 6 TodoComment finding(s) in Explicit Debt — start with camera_pi.py (2), REDACTED (2), sun.py. — One of this dimension's main actionable groups (6 warning-level).
Stand up a CI pipeline, then gate Explicit Debt in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
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: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
This repository's documentation is comprehensive and well-structured. The root README (raspiCamSrv V4.10.3) gives a clear overview of what the project does (a Web server for Raspberry Pi systems providing App control/streaming of CSI/USB cameras plus GPIO device control), its supported platforms, and links to detailed documentation such as Features List, getting started, installation, and a live overview image. The architecture/Docs set is exceptionally large at 86 markdown files covering topics like the AI camera support guide (4102 words), authorization, background processes, multi-camera control, stereo vision, and webcam access, with each one clearly scoped to its subject and an outline of all sections present in the body. This is a comprehensive camera-control documentation set covering raspiCamSrv's configuration, controls, and information screens for both CSI and USB cameras. The README files alone (only one) are not the project's overview; they document the CameraControls/Configuration/Console groups with detailed usage examples, tooltips, and cross-references to related topics such as AI model selection, autofocus modes, and camera detection. The architecture/design docs are separately enumerated at 86 markdown documents, so any missing architecture content is outside this review.
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
1 of 1 build units (Python) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
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).
79 finding(s): 0 critical, 4 high, 75 medium, 0 low. semgrep hit a parse error in 6 file(s) — `raspiCamSrv/templates/base.html` (lines 120–121), `REDACTED` (lines 1–4, lines 19–21, lines 121–2200), `REDACTED` (lines 4–2671), `REDACTED`, `REDACTED`, … (+1 more) — 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.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 40 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (27), REDACTED (9), REDACTED (2). — One of this dimension's main actionable groups (40 warning-level).
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-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.
Resolve the 3 High IaC finding(s) in IaC & Container Security — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 2 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d31_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 21 of the 28 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 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. Scored 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. SCORED, not informational.
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 0 platform declaration(s) and 11 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.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives6.1 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×2) — REDACTED:1638, REDACTED:1872
Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation). — raspiCamSrv/templates/media_viewer.html:37
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels6.9 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
This <img> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. — REDACTED:1638
This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×6) — REDACTED:53, REDACTED:77, REDACTED:84, …
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Do you agree with this assessment?
AC3 · Page structure3.8 / 10Weak✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×2) — raspiCamSrv/templates/base.html:2, raspiCamSrv/templates/media_viewer.html:2
A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope). (×11) — REDACTED:81, REDACTED:1520, REDACTED:1869, …
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler. (×14) — raspiCamSrv/templates/base.html:37, REDACTED:115, REDACTED:29, …
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
`.w3-modal-content` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — raspiCamSrv/static/w3.css:565
`.w3-bar .w3-bar-item` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — raspiCamSrv/static/w3.css:585
`.w3-bar-block .w3-bar-item` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — raspiCamSrv/static/w3.css:606
`.w3-main` moves (`transition: margin-left .4s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — raspiCamSrv/static/w3.css:543
`.w3-spin` moves (`animation: w3-spin 2s infinite linear`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — raspiCamSrv/static/w3.css:1166
`.w3-animate-top` moves (`animation: animatetop 0.4s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — raspiCamSrv/static/w3.css:1213
`.w3-animate-left` moves (`animation: animateleft 0.4s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — raspiCamSrv/static/w3.css:1230
`.w3-animate-right` moves (`animation: animateright 0.4s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — raspiCamSrv/static/w3.css:1247
`.w3-animate-bottom` moves (`animation: animatebottom 0.4s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — raspiCamSrv/static/w3.css:1264
`.w3-animate-zoom` moves (`animation: animatezoom 0.6s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — raspiCamSrv/static/w3.css:1280
`.w3-animate-input` moves (`transition: width 0.4s ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — raspiCamSrv/static/w3.css:1294
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Do you agree with this assessment?
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified
Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.
Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.
Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.
No accessibility enforcement found — no automated accessibility check runs over your pages. Add an accessibility checker (axe-core, pa11y or Lighthouse) over your HTML in CI and fail the build on new violations. What was searched, so you can tell an absence from a miss: the 15 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
What to do
Enforce accessibility over your pages: run an accessibility checker (axe-core, pa11y or Lighthouse) against your HTML in CI and fail the build on new violations — these run as standalone tools without adding a package manifest.
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.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
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.
Do you agree with this assessment?
C2 · Access Controls7.0 / 10Strong✓ Tool-verified
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
What to do
Name the access rules — DRF permission classes, django-guardian or django-rules permissions, a casbin or oso policy, or roles and permissions declared once — and consult them where access is checked (permission_classes, @permission_required, Depends), so the rule set is reviewable and testable on its own.
Do you agree with this assessment?
C4 · Data Retention5.0 / 10Adequate✓ Tool-verified
Other · Security — Whether data has a defined lifetime — retention periods, TTLs, cleanup jobs (storage limitation).
Method: Roslyn scan: retention/TTL configuration presence in schema; CascadeDelete detected but not scored as retention control. Deterministic, gated by PII presence.
A retention mechanism is present, but the data-lifecycle is not yet complete — missing: an expiry limit — a declared maximum age / TTL after which the data is no longer kept, a scheduled purge / cleanup job (a Celery beat task, APScheduler job or management command that deletes rows past their retention — Session.objects.filter(created__lt=cutoff).delete(), purge_expired… / delete_old…).
What to do
Complete the data-lifecycle story: an expiry limit (a declared maximum age for the stored data — a retention-age setting, or a store-level TTL where your storage offers one), a scheduled purge/cleanup job that enforces it, and a documented retention period covering the personal data.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
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.
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.
Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Production code isn't grouped under a src/ folder — it all sits under raspiCamSrv/ alongside the root build files, so the conventional src/ boundary between the product and its tooling isn't drawn.
What to do
Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
Start a test surface where your build system looks for one (tests/, test/, spec/, or your ecosystem's test source set) — the separation follows from putting the first tests in the right place.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
docs/Troubelshooting.md names `__init___.py`, but no file or folder `__init___.py` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/Troubelshooting.md:143
What to do
Reconcile the README with reality: docs/Troubelshooting.md names `__init___.py`, but no file or folder `__init___.py` exists.
Do you agree with this assessment?
P1 · CI/CD gates0.0 / 10Critical✓ Tool-verified
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.
No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
What to do
Add a CI workflow that builds and runs the test suite on every push/PR.
Do you agree with this assessment?
P2 · Observability7.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
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 — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 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.
What to do
Run what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
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.
Deployment is orchestrated by compose, but no service declares a `healthcheck:` and nothing pins a previous image to fall back to — the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse.
What to do
Add a `healthcheck:` to the served compose service — probing the endpoint it already answers on where it has one — with `depends_on: condition: service_healthy` on whatever waits for it, and keep the deployed image tag immutable and recorded so rolling back is re-pointing at the previous tag rather than rebuilding.
Add an approval/environment gate (required reviewers / protection rules) before production promotion.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — REDACTED:6019
What to do
Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
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.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. 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 `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document3.5 / 10Weak✓ Tool-verified
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
`castType` is public and takes `tpl: object` from its caller, and it calls itself at line 1200 (`castType`) with a piece of `tpl` — and nowhere in `castType` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `castType` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — raspiCamSrv/trigger.py:1200
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
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.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. 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.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. 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` 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. — raspiCamSrv/images.py:316
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×6) — REDACTED:1261, REDACTED:1497, REDACTED:6881, …
`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. (×5) — REDACTED:1598, REDACTED:6236, REDACTED:7058, …
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
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.
`debug` at line 73 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — raspiCamSrv/sun.py:73
`debug` at line 74 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — raspiCamSrv/sun.py:74
`debug` at line 75 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — raspiCamSrv/sun.py:75
`debug` at line 78 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — raspiCamSrv/sun.py:78
`debug` at line 83 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — raspiCamSrv/sun.py:83
`debug` at line 93 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — raspiCamSrv/sun.py:93
`debug` at line 108 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — raspiCamSrv/sun.py:108
`debug` at line 113 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — raspiCamSrv/sun.py:113
`debug` at line 119 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — raspiCamSrv/sun.py:119
`debug` at line 134 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — raspiCamSrv/sun.py:134
`debug` at line 139 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — raspiCamSrv/sun.py:139
`debug` at line 140 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — raspiCamSrv/sun.py:140
`debug` at line 141 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — raspiCamSrv/sun.py:141
`error` at line 6032 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:6032
`error` at line 6564 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:6564
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
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.
Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 2 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 — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 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.
C3 Audit Trail — Repo shows no audit-logging mechanism (an audit-log table or model — a class or table named for it — django-simple-history, django-auditlog, django-reversion, django-pghistory or SQLAlchemy-Continuum recording each change, or an event-sourced store beside one) for sensitive changes — absence of evidence is not evidence of a working control. Record an audit trail in code (or document where it lives) so this dimension can be scored.
C5 Data-Subject Rights — Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary — absence of evidence is not evidence of a working control. Implement erasure, data export/portability and consent tracking over the subject's records.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 50 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.
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.
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
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — compose up failed (exit 17 — an image could not be built) — raspi-cam-srv Pulling raspi-cam-srv Warning Get "https://registry-1.docker.io/v2/": Forbidden failed to solve: failed to resolve source metadata for docker.io/docker/dockerfile:1: failed to do request: Head "https://registry-1.docker.io/v2/docker/dockerfile/manifests/1": Forbidden; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
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.
D10 Test Quality — No tests were found in the analyzed repository to assess for quality.
D11 Test Reliability — No test suite was found to re-run, so reliability couldn't be assessed. Two searches produced that zero and both came back empty: the classifier that reads the loaded workspace recognised no suite it could run, and a walk of the source on disk — which covers the JS/TS `*.test.*` and `*.spec.*` conventions and probes for a Pester suite — found no test source in any other ecosystem either. Neither search reaches a suite that is missing from the loaded workspace and carries no name either walk recognises, so this is 'no suite found by those two searches', not a verdict that the repository has none.
D12 Dependency Hygiene — Dependency currency not established — no declaration carries an exact pin to grade
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
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.
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+ projects each declaring an entity of their own. 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 — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.py), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
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.
D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
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.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
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 — no manifest declares this repository's modules, and its source holds 1 production component(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production components 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
DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
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
P12 CI test-gate honesty — no CI workflow found
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 — no coverage report found on disk — produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for a pytest-benchmark or pytest-codspeed dependency with tests taking the `benchmark` fixture, an asv.conf.json with its `time_`/`mem_`/`peakmem_` benchmarks, or a pyperf Runner, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not applicable: Python runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
S1 Web-Security Posture — Not assessed: these web-security 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 web-security 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.
X16 Unfloored truncation loop — 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
X18 Disposal-pattern correctness — 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
X2 Cancellation propagation — no C# was loaded; this repository's Python was read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation
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.
X29 Per-element action decided by a fixed element — 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
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.
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.
Critical — 31 finding(s)
AC4 · Keyboard semantics· Click handler on a non-interactive <img> · ×14
Click handler on a non-interactive <img> raspiCamSrv/templates/base.html:37— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <img> REDACTED:115— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <img> REDACTED:29— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <img> REDACTED:16— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <img> REDACTED:77— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <img> REDACTED:1638— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <img> raspiCamSrv/templates/home/liveDirectPanel.html:17— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <img> REDACTED:38— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <img> REDACTED:167— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <img> REDACTED:59— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <img> REDACTED:44— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <img> REDACTED:87— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <img> REDACTED:103— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <img> REDACTED:51— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
AC2 · Forms & labels· <input> without a programmatic label · ×4
<input> without a programmatic label REDACTED:77— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label REDACTED:84— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label REDACTED:160— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label REDACTED:162— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC1 · Text alternatives· <img> without a text alternative · ×2
<img> without a text alternative REDACTED:1638— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative REDACTED:1872— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
AC2 · Forms & labels· <select> without a programmatic label · ×2
<select> without a programmatic label REDACTED:53— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label REDACTED:25— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels· Custom control with no accessible name on <img> · ×1
Custom control with no accessible name on <img> REDACTED:1638— This <img> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
No automated tests — No automated tests — no test code was found in this repository. Untested code is the largest single risk to changing it safely. Start with the code you change most often: add a suite in a framework a runner can collect (pytest or unittest), and run it in CI so the gap cannot reopen.
FileTooLong: REDACTED REDACTED— FileTooLong — 6647 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 6147 over it, 13.29× 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: raspiCamSrv/camera_pi.py raspiCamSrv/camera_pi.py— FileTooLong — 6345 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 5845 over it, 12.69× 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: REDACTED REDACTED— FileTooLong — 2285 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1785 over it, 4.57× 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: raspiCamSrv/config.py raspiCamSrv/config.py— FileTooLong — 2186 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1686 over it, 4.37× 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: raspiCamSrv/webcam.py raspiCamSrv/webcam.py— FileTooLong — 1762 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1262 over it, 3.52× 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: REDACTED REDACTED— FileTooLong — 1553 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1053 over it, 3.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: raspiCamSrv/photoseriesCfg.py raspiCamSrv/photoseriesCfg.py— FileTooLong — 1405 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 905 over it, 2.81× 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: raspiCamSrv/trigger.py raspiCamSrv/trigger.py— FileTooLong — 1381 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 881 over it, 2.76× 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: raspiCamSrv/photoseries.py raspiCamSrv/photoseries.py— FileTooLong — 1129 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 629 over it, 2.26× 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: raspiCamSrv/motionDetector.py raspiCamSrv/motionDetector.py— FileTooLong — 771 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 271 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: raspiCamSrv/motionAlgoIB.py raspiCamSrv/motionAlgoIB.py— FileTooLong — 770 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 270 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: raspiCamSrv/api.py raspiCamSrv/api.py— FileTooLong — 695 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 195 over it, 1.39× 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: raspiCamSrv/stereoCam.py raspiCamSrv/stereoCam.py— FileTooLong — 569 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 69 over it, 1.14× 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: raspiCamSrv/gpioDevices.py raspiCamSrv/gpioDevices.py— FileTooLong — 557 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 57 over it, 1.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: REDACTED REDACTED— FileTooLong — 552 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 52 over it, 1.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.
AC3 · Page structure· Data table has no header cells · ×11
Data table has no header cells REDACTED:81— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells REDACTED:1520— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells REDACTED:1869— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells REDACTED:1878— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells raspiCamSrv/templates/home/liveDirectPanel.html:27— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells raspiCamSrv/templates/home/liveDirectPanel.html:409— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells REDACTED:46— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells REDACTED:149— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells REDACTED:66— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells REDACTED:89— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Data table has no header cells REDACTED:122— A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
Duplicated block (11 lines × 2) raspiCamSrv/api.py:88— raspiCamSrv/api.py:88-98 | raspiCamSrv/api.py:173-183 — 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 (11 lines × 2) REDACTED:832— REDACTED:832-842 | REDACTED:849-859 — 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) REDACTED:8075— REDACTED:8075-8085 | REDACTED:8168-8178 — 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) raspiCamSrv/camera_pi.py:4825— raspiCamSrv/camera_pi.py:4825-4835 | raspiCamSrv/camera_pi.py:4929-4939 — 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 `raspiCamSrv/camera_pi.py:4825` 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 (11 lines × 2) REDACTED:140— REDACTED:140-150 | REDACTED:224-234 — 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) raspiCamSrv/images.py:204— raspiCamSrv/images.py:204-214 | raspiCamSrv/images.py:221-231 — 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) raspiCamSrv/triggerHandler.py:921— raspiCamSrv/triggerHandler.py:921-931 | raspiCamSrv/triggerHandler.py:955-965 — 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) raspiCamSrv/triggerHandler.py:1335— raspiCamSrv/triggerHandler.py:1335-1345 | raspiCamSrv/triggerHandler.py:1457-1467 — 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) raspiCamSrv/triggerHandler.py:1331— raspiCamSrv/triggerHandler.py:1331-1341 | raspiCamSrv/triggerHandler.py:1359-1369 — 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 `raspiCamSrv/triggerHandler.py:1331` 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 (11 lines × 2) raspiCamSrv/webcam.py:1282— raspiCamSrv/webcam.py:1282-1292 | raspiCamSrv/webcam.py:1302-1312 — 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) raspiCamSrv/api.py:37— raspiCamSrv/api.py:37-50 | raspiCamSrv/auth.py:112-125 — 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 (14 lines × 2) raspiCamSrv/api.py:413— raspiCamSrv/api.py:413-426 | raspiCamSrv/api.py:475-488 — 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) raspiCamSrv/auth.py:110— raspiCamSrv/auth.py:110-123 | raspiCamSrv/auth.py:151-164 — 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) REDACTED:7398— REDACTED:7398-7411 | REDACTED:7421-7434 — 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 `REDACTED:7398` 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 (14 lines × 2) raspiCamSrv/camera_pi.py:5361— raspiCamSrv/camera_pi.py:5361-5374 | raspiCamSrv/camera_pi.py:5918-5931 — 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 (14 lines × 2) REDACTED:1456— REDACTED:1456-1469 | REDACTED:1501-1514 — 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) REDACTED:1674— REDACTED:1674-1687 | REDACTED:1705-1718 — 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, `REDACTED:1720` calls `rsplit` and `REDACTED:1690` 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) raspiCamSrv/motionAlgoIB.py:554— raspiCamSrv/motionAlgoIB.py:554-567 | raspiCamSrv/motionAlgoIB.py:1060-1073 — 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 (14 lines × 2) raspiCamSrv/motionDetector.py:633— raspiCamSrv/motionDetector.py:633-646 | raspiCamSrv/triggerHandler.py:1079-1092 — 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.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×8
Animation without a prefers-reduced-motion guard raspiCamSrv/static/w3.css:543— `.w3-main` moves (`transition: margin-left .4s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard raspiCamSrv/static/w3.css:1166— `.w3-spin` moves (`animation: w3-spin 2s infinite linear`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard raspiCamSrv/static/w3.css:1213— `.w3-animate-top` moves (`animation: animatetop 0.4s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard raspiCamSrv/static/w3.css:1230— `.w3-animate-left` moves (`animation: animateleft 0.4s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard raspiCamSrv/static/w3.css:1247— `.w3-animate-right` moves (`animation: animateright 0.4s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard raspiCamSrv/static/w3.css:1264— `.w3-animate-bottom` moves (`animation: animatebottom 0.4s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard raspiCamSrv/static/w3.css:1280— `.w3-animate-zoom` moves (`animation: animatezoom 0.6s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard raspiCamSrv/static/w3.css:1294— `.w3-animate-input` moves (`transition: width 0.4s ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Duplicated block (9 lines × 2) raspiCamSrv/api.py:473— raspiCamSrv/api.py:473-481 | raspiCamSrv/api.py:536-544 — 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) REDACTED:6055— REDACTED:6055-6063 | REDACTED:6080-6088 — 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) raspiCamSrv/config.py:2234— raspiCamSrv/config.py:2234-2242 | raspiCamSrv/config.py:2320-2328 — 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) raspiCamSrv/gpioDevices.py:122— raspiCamSrv/gpioDevices.py:122-130 | raspiCamSrv/gpioDevices.py:202-210 — 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) raspiCamSrv/motionAlgoIB.py:499— raspiCamSrv/motionAlgoIB.py:499-507 | raspiCamSrv/motionAlgoIB.py:1005-1013 — 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, `raspiCamSrv/motionAlgoIB.py:510` calls `cvtColor` and `raspiCamSrv/motionAlgoIB.py:1016` 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 (9 lines × 2) raspiCamSrv/motionAlgoIB.py:517— raspiCamSrv/motionAlgoIB.py:517-525 | raspiCamSrv/motionAlgoIB.py:1021-1029 — 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) raspiCamSrv/motionDetector.py:115— raspiCamSrv/motionDetector.py:115-123 | raspiCamSrv/motionDetector.py:148-156 — 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, `raspiCamSrv/motionDetector.py:145` calls `debug`, `get_ident` and `raspiCamSrv/motionDetector.py:114` 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 (9 lines × 2) raspiCamSrv/webcam.py:1392— raspiCamSrv/webcam.py:1392-1400 | raspiCamSrv/webcam.py:1408-1416 — 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 (18 lines × 2) REDACTED:354— REDACTED:354-371 | REDACTED:446-463 — 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 (18 lines × 2) REDACTED:7329— REDACTED:7329-7346 | REDACTED:7361-7378 — 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 (18 lines × 2) raspiCamSrv/camera_pi.py:2306— raspiCamSrv/camera_pi.py:2306-2323 | raspiCamSrv/camera_pi.py:2333-2350 — 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 (18 lines × 2) raspiCamSrv/camera_pi.py:6103— raspiCamSrv/camera_pi.py:6103-6120 | raspiCamSrv/camera_pi.py:6128-6145 — 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 × 2) raspiCamSrv/camera_pi.py:7403— raspiCamSrv/camera_pi.py:7403-7420 | raspiCamSrv/camera_pi.py:7720-7737 — 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 (18 lines × 2) raspiCamSrv/photoseriesCfg.py:59— raspiCamSrv/photoseriesCfg.py:59-76 | raspiCamSrv/photoseriesCfg.py:894-911 — 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 (18 lines × 2) raspiCamSrv/webcam.py:285— raspiCamSrv/webcam.py:285-302 | raspiCamSrv/webcam.py:374-391 — 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 (15 lines × 2) raspiCamSrv/camera_pi.py:898— raspiCamSrv/camera_pi.py:898-912 | raspiCamSrv/camera_pi.py:958-972 — 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 (15 lines × 2) raspiCamSrv/camera_pi.py:1821— raspiCamSrv/camera_pi.py:1821-1835 | raspiCamSrv/camera_pi.py:2209-2223 — 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 `raspiCamSrv/camera_pi.py:1821` 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 (15 lines × 2) raspiCamSrv/camera_pi.py:1888— raspiCamSrv/camera_pi.py:1888-1902 | raspiCamSrv/camera_pi.py:1910-1924 — 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 (15 lines × 2) raspiCamSrv/motionAlgoIB.py:592— raspiCamSrv/motionAlgoIB.py:592-606 | raspiCamSrv/motionAlgoIB.py:1115-1129 — 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 lines × 2) REDACTED:1652— REDACTED:1652-1666 | raspiCamSrv/trigger.py:1218-1232 — 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 (15 lines × 2) raspiCamSrv/trigger.py:236— raspiCamSrv/trigger.py:236-250 | raspiCamSrv/trigger.py:512-526 — 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 (15 lines × 2) raspiCamSrv/triggerHandler.py:1363— raspiCamSrv/triggerHandler.py:1363-1377 | raspiCamSrv/triggerHandler.py:1400-1414 — 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) raspiCamSrv/api.py:112— raspiCamSrv/api.py:112-121 | raspiCamSrv/api.py:198-207 — 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 (10 lines × 2) raspiCamSrv/auth.py:29— raspiCamSrv/auth.py:29-38 | raspiCamSrv/auth.py:103-112 — 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) REDACTED:1454— REDACTED:1454-1463 | REDACTED:2811-2820 — 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) REDACTED:7643— REDACTED:7643-7652 | REDACTED:7888-7897 — 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, `REDACTED:7639` calls `TriggerConfig`, `ServerConfig` and `REDACTED:7885` 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 (10 lines × 2) raspiCamSrv/images.py:349— raspiCamSrv/images.py:349-358 | raspiCamSrv/images.py:362-371 — 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) raspiCamSrv/trigger.py:568— raspiCamSrv/trigger.py:568-577 | raspiCamSrv/trigger.py:584-593 — 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 (10 lines × 2) raspiCamSrv/trigger.py:617— raspiCamSrv/trigger.py:617-626 | raspiCamSrv/trigger.py:633-642 — 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 (7 lines × 2) raspiCamSrv/api.py:103— raspiCamSrv/api.py:103-109 | raspiCamSrv/api.py:126-132 — 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) raspiCamSrv/camera_pi.py:7291— raspiCamSrv/camera_pi.py:7291-7297 | raspiCamSrv/camera_pi.py:7314-7320 — 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) raspiCamSrv/camera_pi.py:7646— raspiCamSrv/camera_pi.py:7646-7652 | raspiCamSrv/camera_pi.py:7972-7978 — 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) REDACTED:513— REDACTED:513-519 | REDACTED:684-690 — 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) raspiCamSrv/triggerHandler.py:141— raspiCamSrv/triggerHandler.py:141-147 | raspiCamSrv/triggerHandler.py:151-157 — 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) raspiCamSrv/triggerHandler.py:620— raspiCamSrv/triggerHandler.py:620-626 | raspiCamSrv/triggerHandler.py:715-721 — 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) raspiCamSrv/motionAlgoIB.py:335— raspiCamSrv/motionAlgoIB.py:335-341 | raspiCamSrv/stereoCam.py:116-123 — 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 `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.
TodoComment raspiCamSrv/sun.py:81— # TODO: ceil ? — 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 REDACTED:1233— # TODO: Check sleep time. This might lead to errors when stopping video within that time — 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 raspiCamSrv/camera_pi.py:84— # TODO: Clarify under which conditions this exception is raised — 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 raspiCamSrv/camera_pi.py:92— # TODO: Clarify under which conditions this exception is raised — 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 REDACTED:708— # TODO: int->float — 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 REDACTED:1541— # TODO: Investigate why this test no longer works — 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.
Duplicated block (21 lines × 2) REDACTED:1430— REDACTED:1430-1450 | REDACTED:2787-2807 — 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 (21 lines × 2) raspiCamSrv/camera_pi.py:6149— raspiCamSrv/camera_pi.py:6149-6169 | raspiCamSrv/camera_pi.py:6282-6302 — 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 (21 lines × 2) raspiCamSrv/config.py:443— raspiCamSrv/config.py:443-463 | raspiCamSrv/config.py:564-584 — 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 (21 lines × 2) REDACTED:1616— REDACTED:1616-1636 | raspiCamSrv/trigger.py:1118-1138 — 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 `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 (21 lines × 2) raspiCamSrv/triggerHandler.py:1791— raspiCamSrv/triggerHandler.py:1791-1811 | raspiCamSrv/triggerHandler.py:1822-1842 — 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 (21 lines × 2) raspiCamSrv/webcam.py:880— raspiCamSrv/webcam.py:880-900 | raspiCamSrv/webcam.py:938-958 — 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 (16 lines × 2) raspiCamSrv/auth.py:260— raspiCamSrv/auth.py:260-275 | raspiCamSrv/auth.py:283-298 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `raspiCamSrv/auth.py:281` calls `CameraCfg` and `raspiCamSrv/auth.py:259` 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 (16 lines × 2) raspiCamSrv/camera_pi.py:3508— raspiCamSrv/camera_pi.py:3508-3523 | raspiCamSrv/camera_pi.py:3530-3545 — 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 (16 lines × 2) raspiCamSrv/camera_pi.py:7001— raspiCamSrv/camera_pi.py:7001-7016 | raspiCamSrv/camera_pi.py:7018-7033 — 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 (16 lines × 2) raspiCamSrv/camera_pi.py:7610— raspiCamSrv/camera_pi.py:7610-7625 | raspiCamSrv/camera_pi.py:7931-7946 — 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 (16 lines × 2) raspiCamSrv/photoseries.py:1033— raspiCamSrv/photoseries.py:1033-1048 | raspiCamSrv/photoseries.py:1133-1148 — 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 (16 lines × 2) raspiCamSrv/photoseriesCfg.py:974— raspiCamSrv/photoseriesCfg.py:974-989 | raspiCamSrv/photoseriesCfg.py:1263-1278 — 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.
Swallowed exception (caught, then discarded) raspiCamSrv/images.py:316— `except` 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) REDACTED:1598— `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) REDACTED:6236— `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) REDACTED:7058— `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) REDACTED:7071— `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) REDACTED:7111— `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 (empty catch) REDACTED:1261— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:1497— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:6881— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:6930— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:6960— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) REDACTED:7291— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Duplicated block (19 lines × 2) raspiCamSrv/camera_pi.py:2190— raspiCamSrv/camera_pi.py:2190-2208 | raspiCamSrv/camera_pi.py:2284-2302 — 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, `raspiCamSrv/camera_pi.py:2185` calls `debug` and `raspiCamSrv/camera_pi.py:2281` 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 × 2) raspiCamSrv/camera_pi.py:5651— raspiCamSrv/camera_pi.py:5651-5669 | raspiCamSrv/camera_pi.py:5727-5745 — 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 (19 lines × 2) raspiCamSrv/camera_pi.py:6360— raspiCamSrv/camera_pi.py:6360-6378 | raspiCamSrv/camera_pi.py:6384-6402 — 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 (19 lines × 2) raspiCamSrv/config.py:517— raspiCamSrv/config.py:517-535 | raspiCamSrv/config.py:606-624 — 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 `raspiCamSrv/config.py:517` 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 (19 lines × 2) REDACTED:747— REDACTED:747-765 | REDACTED:815-833 — 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 lines × 2) REDACTED:242— REDACTED:242-253 | REDACTED:442-453 — 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 lines × 2) raspiCamSrv/camera_pi.py:1009— raspiCamSrv/camera_pi.py:1009-1020 | raspiCamSrv/camera_pi.py:3783-3794 — 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, `raspiCamSrv/camera_pi.py:3778` calls `StreamConfiguration` and `raspiCamSrv/camera_pi.py:1005` 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 lines × 2) raspiCamSrv/motionAlgoIB.py:526— raspiCamSrv/motionAlgoIB.py:526-537 | raspiCamSrv/motionAlgoIB.py:725-736 — 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 lines × 2) raspiCamSrv/photoseries.py:50— raspiCamSrv/photoseries.py:50-61 | raspiCamSrv/photoseries.py:127-138 — 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 lines × 2) raspiCamSrv/trigger.py:778— raspiCamSrv/trigger.py:778-789 | raspiCamSrv/trigger.py:853-864 — 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 (23 lines × 2) raspiCamSrv/camera_pi.py:7561— raspiCamSrv/camera_pi.py:7561-7583 | raspiCamSrv/camera_pi.py:7880-7902 — 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) REDACTED:54— REDACTED:54-76 | REDACTED:97-119 — 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 (23 lines × 2) REDACTED:1668— REDACTED:1668-1690 | raspiCamSrv/trigger.py:1234-1256 — 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 (23 lines × 2) raspiCamSrv/trigger.py:942— raspiCamSrv/trigger.py:942-964 | raspiCamSrv/trigger.py:1265-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 (6 lines × 3) raspiCamSrv/api.py:166— raspiCamSrv/api.py:166-171 | raspiCamSrv/api.py:190-195 | raspiCamSrv/api.py:214-219 — 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 (6 lines × 3) REDACTED:1227— REDACTED:1227-1232 | raspiCamSrv/webcam.py:621-626 | raspiCamSrv/webcam.py:981-986 — there are 3 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 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6 lines × 3) raspiCamSrv/motionAlgoIB.py:502— raspiCamSrv/motionAlgoIB.py:502-507 | raspiCamSrv/motionAlgoIB.py:702-707 | raspiCamSrv/motionAlgoIB.py:1008-1013 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `raspiCamSrv/motionAlgoIB.py:510` calls `cvtColor` and `raspiCamSrv/motionAlgoIB.py:710` 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 (6 lines × 3) REDACTED:1204— REDACTED:1204-1209 | REDACTED:1308-1313 | REDACTED:1419-1424 — 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 (6 lines × 2) REDACTED:7050— REDACTED:7050-7055 | REDACTED:7062-7067 — 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, `REDACTED:7069` calls `strip` and `REDACTED:7057` 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 × 2) REDACTED:329— REDACTED:329-334 | REDACTED:1623-1628 — 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 × 2) raspiCamSrv/photoseriesCfg.py:1208— raspiCamSrv/photoseriesCfg.py:1208-1213 | raspiCamSrv/photoseriesCfg.py:1223-1228 — 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 `raspiCamSrv/photoseriesCfg.py:1208` 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 (6 lines × 2) raspiCamSrv/triggerHandler.py:565— raspiCamSrv/triggerHandler.py:565-570 | raspiCamSrv/triggerHandler.py:622-627 — 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, `raspiCamSrv/triggerHandler.py:629` calls `now` and `raspiCamSrv/triggerHandler.py:572` 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 (5 lines × 3) REDACTED:1211— REDACTED:1211-1215 | REDACTED:1315-1319 | REDACTED:1427-1431 — 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.
Duplicated block (5 lines × 3) raspiCamSrv/triggerHandler.py:1647— raspiCamSrv/triggerHandler.py:1647-1651 | raspiCamSrv/triggerHandler.py:1685-1689 | raspiCamSrv/triggerHandler.py:1723-1727 — 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 (5 lines × 3) REDACTED:745— REDACTED:745-749 | REDACTED:776-780 | REDACTED:2527-2531 — 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.
Duplicated block (5 lines × 3) REDACTED:1198— REDACTED:1198-1202 | REDACTED:1302-1306 | REDACTED:1406-1410 — 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.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×3
Focus outline removed in CSS without a :focus replacement raspiCamSrv/static/w3.css:565— `.w3-modal-content` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement raspiCamSrv/static/w3.css:585— `.w3-bar .w3-bar-item` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement raspiCamSrv/static/w3.css:606— `.w3-bar-block .w3-bar-item` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Duplicated block (20 lines × 2) raspiCamSrv/camera_pi.py:333— raspiCamSrv/camera_pi.py:333-352 | raspiCamSrv/camera_pi.py:371-390 — 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 (20 lines × 2) raspiCamSrv/camera_pi.py:2678— raspiCamSrv/camera_pi.py:2678-2697 | raspiCamSrv/camera_pi.py:2722-2741 — 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 (20 lines × 2) raspiCamSrv/camera_pi.py:5334— raspiCamSrv/camera_pi.py:5334-5353 | raspiCamSrv/camera_pi.py:5887-5906 — 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 `raspiCamSrv/camera_pi.py:5334` 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. 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 (17–18 lines × 2) raspiCamSrv/camera_pi.py:2968— raspiCamSrv/camera_pi.py:2968-2985 | raspiCamSrv/camera_pi.py:3060-3076 — 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 (17–18 lines × 2) raspiCamSrv/camera_pi.py:5266— raspiCamSrv/camera_pi.py:5266-5282 | raspiCamSrv/camera_pi.py:5817-5834 — 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 `raspiCamSrv/camera_pi.py:5266` 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 (17–18 lines × 2) REDACTED:1242— REDACTED:1242-1258 | raspiCamSrv/webcam.py:635-652 — 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 `raspiCamSrv/webcam.py:635` 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 `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. 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 (16–17 lines × 2) raspiCamSrv/camera_pi.py:5313— raspiCamSrv/camera_pi.py:5313-5329 | raspiCamSrv/camera_pi.py:5864-5879 — 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 `raspiCamSrv/camera_pi.py:5313` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `raspiCamSrv/camera_pi.py:5880` calls `imwrite` and `raspiCamSrv/camera_pi.py:5330` 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 (16–17 lines × 2) raspiCamSrv/camera_pi.py:5454— raspiCamSrv/camera_pi.py:5454-5470 | raspiCamSrv/camera_pi.py:6010-6025 — 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 `raspiCamSrv/camera_pi.py:5454` 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 (16–17 lines × 2) REDACTED:1162— REDACTED:1162-1177 | raspiCamSrv/webcam.py:534-550 — 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 `raspiCamSrv/webcam.py:534` 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 `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. 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, `REDACTED:1161` calls `debug` and `raspiCamSrv/webcam.py:533` 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 (14 lines × 3) REDACTED:3294— REDACTED:3294-3307 | REDACTED:7337-7350 | REDACTED:7369-7382 — 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) raspiCamSrv/config.py:1206— raspiCamSrv/config.py:1206-1219 | raspiCamSrv/config.py:1504-1517 | raspiCamSrv/config.py:1733-1746 — 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) REDACTED:36— REDACTED:36-49 | REDACTED:82-95 | REDACTED:125-138 — 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 (13 lines × 2) raspiCamSrv/camera_pi.py:4266— raspiCamSrv/camera_pi.py:4266-4278 | raspiCamSrv/camera_pi.py:4408-4420 — 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 (13 lines × 2) raspiCamSrv/trigger.py:975— raspiCamSrv/trigger.py:975-987 | raspiCamSrv/trigger.py:990-1002 — 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 (13 lines × 2) raspiCamSrv/triggerHandler.py:1681— raspiCamSrv/triggerHandler.py:1681-1693 | raspiCamSrv/triggerHandler.py:1719-1731 — 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 × 3) REDACTED:8076— REDACTED:8076-8085 | REDACTED:8129-8138 | REDACTED:8169-8178 — 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 (10 lines × 3) REDACTED:1147— REDACTED:1147-1156 | REDACTED:1184-1193 | REDACTED:1219-1228 — 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 (10 lines × 3) raspiCamSrv/images.py:108— raspiCamSrv/images.py:108-117 | raspiCamSrv/images.py:165-174 | raspiCamSrv/images.py:190-199 — 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, `raspiCamSrv/images.py:107` calls `debug` and `raspiCamSrv/images.py:164` 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 (9 lines × 3) raspiCamSrv/camera_pi.py:7699— raspiCamSrv/camera_pi.py:7699-7707 | raspiCamSrv/camera_pi.py:7866-7874 | raspiCamSrv/camera_pi.py:7966-7974 — 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 lines × 3) raspiCamSrv/webcam.py:544— raspiCamSrv/webcam.py:544-552 | raspiCamSrv/webcam.py:590-598 | raspiCamSrv/webcam.py:646-654 — 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 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 × 3) raspiCamSrv/webcam.py:719— raspiCamSrv/webcam.py:719-727 | raspiCamSrv/webcam.py:761-769 | raspiCamSrv/webcam.py:810-818 — 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 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 (5 lines × 2) raspiCamSrv/camera_pi.py:7397— raspiCamSrv/camera_pi.py:7397-7401 | raspiCamSrv/camera_pi.py:7714-7718 — 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 (5 lines × 2) raspiCamSrv/stereoCam.py:450— raspiCamSrv/stereoCam.py:450-454 | raspiCamSrv/stereoCam.py:475-479 — 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 (5 lines × 2) raspiCamSrv/camera_pi.py:7452— raspiCamSrv/camera_pi.py:7452-7456 | raspiCamSrv/camera_pi.py:7778-7782 — 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.
Low cohesion: ServerConfig (LCOM4 13) REDACTED:4412— ServerConfig's methods fall into 13 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 13 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: TriggerConfig (LCOM4 9) REDACTED:465— TriggerConfig's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: StereoConfig (LCOM4 5) REDACTED:3797— StereoConfig's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
AC3 · Page structure· Page without a main landmark · ×2
Page without a main landmark raspiCamSrv/templates/base.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark raspiCamSrv/templates/media_viewer.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Hotspot: raspiCamSrv/motionDetector.py raspiCamSrv/motionDetector.py:786— raspiCamSrv/motionDetector.py changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in MotionDetector._motionThread at line 786. 2 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-04-12..2026-07-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-04-12 22:38:55 +02:00' --until='2026-07-11 22:38:55 +02:00' --full-history --no-merges -- raspiCamSrv/motionDetector.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: raspiCamSrv/__init__.py raspiCamSrv/__init__.py:15— raspiCamSrv/__init__.py changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in raspiCamSrv.create_app at line 15. 2 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-04-12..2026-07-11, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-04-12 22:38:55 +02:00' --until='2026-07-11 22:38:55 +02:00' --full-history --no-merges -- raspiCamSrv/__init__.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.
TooManyMethods: Camera raspiCamSrv/camera_pi.py:1503— TooManyMethods — 107 methods. The bar is 30 methods; this is 77 over it, 3.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ServerConfig REDACTED:4412— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (23–24 lines × 2) raspiCamSrv/camera_pi.py:483— raspiCamSrv/camera_pi.py:483-506 | raspiCamSrv/camera_pi.py:2179-2201 — 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 `raspiCamSrv/camera_pi.py:483` 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 (23–24 lines × 2) raspiCamSrv/camera_pi.py:5001— raspiCamSrv/camera_pi.py:5001-5023 | raspiCamSrv/camera_pi.py:5054-5077 — 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 (24 lines × 2) raspiCamSrv/camera_pi.py:1788— raspiCamSrv/camera_pi.py:1788-1811 | raspiCamSrv/camera_pi.py:1862-1885 — 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 (24 lines × 2) raspiCamSrv/camera_pi.py:3879— raspiCamSrv/camera_pi.py:3879-3902 | raspiCamSrv/camera_pi.py:3930-3953 — 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 (17 lines × 2) raspiCamSrv/trigger.py:1302— raspiCamSrv/trigger.py:1302-1318 | raspiCamSrv/trigger.py:1320-1336 — 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 (17 lines × 2) raspiCamSrv/triggerHandler.py:1390— raspiCamSrv/triggerHandler.py:1390-1406 | raspiCamSrv/triggerHandler.py:1447-1463 — 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 `raspiCamSrv/triggerHandler.py:1390` 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 (11–12 lines × 2) REDACTED:1228— REDACTED:1228-1239 | raspiCamSrv/webcam.py:622-632 — 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–12 lines × 2) raspiCamSrv/webcam.py:1283— raspiCamSrv/webcam.py:1283-1294 | raspiCamSrv/webcam.py:1347-1357 — 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 × 3) REDACTED:756— REDACTED:756-766 | REDACTED:821-831 | REDACTED:889-899 — 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 (11 lines × 3) raspiCamSrv/images.py:238— raspiCamSrv/images.py:238-248 | raspiCamSrv/images.py:259-269 | raspiCamSrv/images.py:324-334 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `raspiCamSrv/images.py:336` calls `str` and `raspiCamSrv/images.py:270` 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 (9 lines × 4) REDACTED:1169— REDACTED:1169-1177 | REDACTED:1204-1212 | raspiCamSrv/webcam.py:541-550 | raspiCamSrv/webcam.py:587-596 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/webcam.py:541` 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 `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. 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 × 4) raspiCamSrv/photoseries.py:898— raspiCamSrv/photoseries.py:898-906 | raspiCamSrv/photoseries.py:909-917 | raspiCamSrv/photoseries.py:920-928 | raspiCamSrv/photoseries.py:931-939 — 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.
Duplicated block (8 lines × 2) raspiCamSrv/api.py:188— raspiCamSrv/api.py:188-195 | raspiCamSrv/api.py:212-219 — 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 (8 lines × 2) raspiCamSrv/motionAlgoIB.py:949— raspiCamSrv/motionAlgoIB.py:949-956 | raspiCamSrv/motionAlgoIB.py:967-974 — 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.
AC1 · Text alternatives· <video> without a captions track · ×1
<video> without a captions track raspiCamSrv/templates/media_viewer.html:37— Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation).
AC7 · A11y enforcement· Accessibility enforcement below the top rung · ×1
Accessibility enforcement below the top rung — No accessibility enforcement found — no automated accessibility check runs over your pages. Add an accessibility checker (axe-core, pa11y or Lighthouse) over your HTML in CI and fail the build on new violations. What was searched, so you can tell an absence from a miss: the 15 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
Camera.applyControls (cyclomatic 85) raspiCamSrv/camera_pi.py:4121— Camera.applyControls has cyclomatic complexity 85 (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 file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
photoseries.tlseries_properties (cyclomatic 77) raspiCamSrv/photoseries.py:762— photoseries.tlseries_properties has cyclomatic complexity 77 (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.
CameraController.requestConfig (cyclomatic 72) raspiCamSrv/camera_pi.py:768— CameraController.requestConfig has cyclomatic complexity 72 (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 file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
ServerConfig.initFromDict (cyclomatic 71) REDACTED:7313— ServerConfig.initFromDict has cyclomatic complexity 71 (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.
Camera._photoSeriesThread (cyclomatic 64) raspiCamSrv/camera_pi.py:6761— Camera._photoSeriesThread has cyclomatic complexity 64 (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 file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
CameraController.compareConfig (cyclomatic 55) raspiCamSrv/camera_pi.py:1210— CameraController.compareConfig has cyclomatic complexity 55 (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 file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
config.liveViewCfg (cyclomatic 55) raspiCamSrv/config.py:864— config.liveViewCfg has cyclomatic complexity 55 (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.
MotionDetector._doAction (cyclomatic 49) raspiCamSrv/motionDetector.py:368— MotionDetector._doAction has cyclomatic complexity 49 (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.
config.photoCfg (cyclomatic 48) raspiCamSrv/config.py:1186— config.photoCfg has cyclomatic complexity 48 (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.
config.videoCfg (cyclomatic 47) raspiCamSrv/config.py:1713— config.videoCfg has cyclomatic complexity 47 (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.
trigger.castType (cyclomatic 41) raspiCamSrv/trigger.py:1140— trigger.castType has cyclomatic complexity 41 (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.
TriggerHandler._logEvent (cyclomatic 41) raspiCamSrv/triggerHandler.py:1263— TriggerHandler._logEvent has cyclomatic complexity 41 (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.
TriggerConfig.checkNotificationRecipient (cyclomatic 38) REDACTED:1467— TriggerConfig.checkNotificationRecipient has cyclomatic complexity 38 (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.
settings.serverconfig (cyclomatic 38) REDACTED:59— settings.serverconfig has cyclomatic complexity 38 (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.
trigger.new_action (cyclomatic 37) raspiCamSrv/trigger.py:1262— trigger.new_action has cyclomatic complexity 37 (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.
Camera.setStreamingConfigs (cyclomatic 34) raspiCamSrv/camera_pi.py:3293— Camera.setStreamingConfigs has cyclomatic complexity 34 (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 file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
webcam.stereo_config (cyclomatic 34) raspiCamSrv/webcam.py:1227— webcam.stereo_config has cyclomatic complexity 34 (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.
Series.nextTimeSunCtrl (cyclomatic 30) raspiCamSrv/photoseriesCfg.py:1078— Series.nextTimeSunCtrl has cyclomatic complexity 30 (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.
Camera.initCamera (cyclomatic 28) raspiCamSrv/camera_pi.py:1742— Camera.initCamera has cyclomatic complexity 28 (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 file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
trigger.notify (cyclomatic 28) raspiCamSrv/trigger.py:398— trigger.notify has cyclomatic complexity 28 (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.
TriggerHandler._doGpioAction (cyclomatic 28) raspiCamSrv/triggerHandler.py:238— TriggerHandler._doGpioAction has cyclomatic complexity 28 (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.
Camera._thread (cyclomatic 27) raspiCamSrv/camera_pi.py:4579— Camera._thread has cyclomatic complexity 27 (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 file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
CameraCfg.setUsbCamControls (cyclomatic 26) REDACTED:8231— CameraCfg.setUsbCamControls has cyclomatic complexity 26 (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.
Camera.setSecondCamera (cyclomatic 26) raspiCamSrv/camera_pi.py:3135— Camera.setSecondCamera has cyclomatic complexity 26 (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 file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
settings.device_properties (cyclomatic 26) REDACTED:1721— settings.device_properties has cyclomatic complexity 26 (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.
TriggerHandler._doCameraAction (cyclomatic 25) raspiCamSrv/triggerHandler.py:766— TriggerHandler._doCameraAction 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.
config.customTuning (cyclomatic 24) raspiCamSrv/config.py:424— config.customTuning has cyclomatic complexity 24 (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.
photoseries.calcSunControlledSeries (cyclomatic 24) raspiCamSrv/photoseries.py:647— photoseries.calcSunControlledSeries has cyclomatic complexity 24 (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.
settings.test_device (cyclomatic 24) REDACTED:1841— settings.test_device has cyclomatic complexity 24 (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.
trigger.new_trigger (cyclomatic 24) raspiCamSrv/trigger.py:939— trigger.new_trigger has cyclomatic complexity 24 (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.
Camera.switchCamera (cyclomatic 22) raspiCamSrv/camera_pi.py:2126— Camera.switchCamera 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 file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
MotionDetector._motionThread (cyclomatic 22) raspiCamSrv/motionDetector.py:786— MotionDetector._motionThread 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.
photoseries.continue_series (cyclomatic 22) raspiCamSrv/photoseries.py:306— photoseries.continue_series 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.
trigger.trigger_action (cyclomatic 22) raspiCamSrv/trigger.py:1462— trigger.trigger_action 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.
CameraController.requestStart (cyclomatic 21) raspiCamSrv/camera_pi.py:408— CameraController.requestStart 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. This file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
photoseries.start_series (cyclomatic 21) raspiCamSrv/photoseries.py:149— photoseries.start_series 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.
Series.calcSunCtrlData (cyclomatic 21) raspiCamSrv/photoseriesCfg.py:1005— Series.calcSunCtrlData 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.
settings.docalibrate (cyclomatic 21) REDACTED:2153— settings.docalibrate 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.
StereoCam._takeCalibPhotoThread (cyclomatic 21) raspiCamSrv/stereoCam.py:386— StereoCam._takeCalibPhotoThread 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.
TriggerHandler._initNotificationMessage (cyclomatic 21) raspiCamSrv/triggerHandler.py:880— TriggerHandler._initNotificationMessage 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.
raspiCamSrv.create_app (cyclomatic 20) raspiCamSrv/__init__.py:15— raspiCamSrv.create_app 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.
Camera.usbFrameApplyControls (cyclomatic 20) raspiCamSrv/camera_pi.py:4006— Camera.usbFrameApplyControls 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. This file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
Camera.stopCameraSystem (cyclomatic 20) raspiCamSrv/camera_pi.py:4459— Camera.stopCameraSystem 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. This file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
Camera.takeImage (cyclomatic 20) raspiCamSrv/camera_pi.py:5238— Camera.takeImage 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. This file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
Camera.takeRawImage (cyclomatic 20) raspiCamSrv/camera_pi.py:5799— Camera.takeRawImage 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. This file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
config.enableAi (cyclomatic 20) raspiCamSrv/config.py:2199— config.enableAi 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.
webcam.doInitCalibration (cyclomatic 20) raspiCamSrv/webcam.py:1831— webcam.doInitCalibration has cyclomatic complexity 20 (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.
TriggerConfig.cameraSettings (cyclomatic 19) REDACTED:1911— TriggerConfig.cameraSettings has cyclomatic complexity 19 (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.
Camera.getActiveCamera (cyclomatic 19) raspiCamSrv/camera_pi.py:1972— Camera.getActiveCamera 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. This file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
config.ai_settings (cyclomatic 19) raspiCamSrv/config.py:2283— config.ai_settings 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.
MotionDetector._stopAction (cyclomatic 19) raspiCamSrv/motionDetector.py:686— MotionDetector._stopAction 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.
Series.logPhoto (cyclomatic 19) raspiCamSrv/photoseriesCfg.py:1416— Series.logPhoto has cyclomatic complexity 19 (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.
Camera.loadCameraSpecifics (cyclomatic 18) raspiCamSrv/camera_pi.py:2904— Camera.loadCameraSpecifics has cyclomatic complexity 18 (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 file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
config.doSyncAspectRatio (cyclomatic 18) raspiCamSrv/config.py:122— config.doSyncAspectRatio has cyclomatic complexity 18 (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.
config.defaultTuning (cyclomatic 18) raspiCamSrv/config.py:545— config.defaultTuning has cyclomatic complexity 18 (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.
config.getAiModelFiles (cyclomatic 18) raspiCamSrv/config.py:2004— config.getAiModelFiles has cyclomatic complexity 18 (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.
MotionDetectOpticalFlow.detectMotion (cyclomatic 18) raspiCamSrv/motionAlgoIB.py:664— MotionDetectOpticalFlow.detectMotion has cyclomatic complexity 18 (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.
MotionDetector.prepareRoIs (cyclomatic 18) raspiCamSrv/motionDetector.py:194— MotionDetector.prepareRoIs has cyclomatic complexity 18 (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.
settings.castType (cyclomatic 18) REDACTED:1638— settings.castType has cyclomatic complexity 18 (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.
trigger.trgcontrol (cyclomatic 18) raspiCamSrv/trigger.py:72— trigger.trgcontrol has cyclomatic complexity 18 (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.
TriggerConfig.checkRoisAgainstScalerCropLiveView (cyclomatic 17) REDACTED:820— TriggerConfig.checkRoisAgainstScalerCropLiveView 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.
ServerConfig.checkMicrophone (cyclomatic 17) REDACTED:6887— ServerConfig.checkMicrophone 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.
ServerConfig._countThreads (cyclomatic 17) REDACTED:7196— ServerConfig._countThreads 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.
Camera.takeImage2 (cyclomatic 17) raspiCamSrv/camera_pi.py:5377— Camera.takeImage2 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. This file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
Camera.cameraStatus (cyclomatic 17) raspiCamSrv/camera_pi.py:7225— Camera.cameraStatus 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. This file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
config.setAiModelFile (cyclomatic 17) raspiCamSrv/config.py:2102— config.setAiModelFile 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.
images.getFileList (cyclomatic 17) raspiCamSrv/images.py:19— images.getFileList 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.
photoseries.series_properties (cyclomatic 17) raspiCamSrv/photoseries.py:460— photoseries.series_properties 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.
photoseries.expseries_properties (cyclomatic 17) raspiCamSrv/photoseries.py:1030— photoseries.expseries_properties 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.
photoseries.focusstack_properties (cyclomatic 17) raspiCamSrv/photoseries.py:1130— photoseries.focusstack_properties 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.
TriggerHandler._actionDispatcher (cyclomatic 17) raspiCamSrv/triggerHandler.py:1480— TriggerHandler._actionDispatcher 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.
api.probeTerm (cyclomatic 16) raspiCamSrv/api.py:662— api.probeTerm 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.
TriggerConfig.getEventList (cyclomatic 16) REDACTED:1234— TriggerConfig.getEventList 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.
Camera._thread2 (cyclomatic 16) raspiCamSrv/camera_pi.py:4712— Camera._thread2 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. This file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
Camera.framesUsb (cyclomatic 16) raspiCamSrv/camera_pi.py:4814— Camera.framesUsb 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. This file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
Camera.takeRawImage2 (cyclomatic 16) raspiCamSrv/camera_pi.py:5934— Camera.takeRawImage2 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. This file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
Camera._videoThreadUsb (cyclomatic 16) raspiCamSrv/camera_pi.py:6053— Camera._videoThreadUsb 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. This file is where this pass's cyclomatic complexity CONCENTRATES: raspiCamSrv/camera_pi.py holds 22 of the 87 methods over the threshold — including the worst — and 319 of the 957 points over it (33%), 2.4× the next-largest file (raspiCamSrv/config.py at 134). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
MotionDetectFrameDiff.detectMotion (cyclomatic 16) raspiCamSrv/motionAlgoIB.py:471— MotionDetectFrameDiff.detectMotion 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. This shape REPEATS in the file: one other method here (MotionDetectBgSubtract.detectMotion) 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.
MotionDetectBgSubtract.detectMotion (cyclomatic 16) raspiCamSrv/motionAlgoIB.py:977— MotionDetectBgSubtract.detectMotion 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. This shape REPEATS in the file: one other method here (MotionDetectFrameDiff.detectMotion) 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.
settings.calibrate_fbwd (cyclomatic 16) REDACTED:2007— settings.calibrate_fbwd 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. This shape REPEATS in the file: 3 other methods here (settings.calibrate_bwd, settings.calibrate_fwd, settings.calibrate_ffwd) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
settings.calibrate_bwd (cyclomatic 16) REDACTED:2080— settings.calibrate_bwd 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. This shape REPEATS in the file: 3 other methods here (settings.calibrate_fbwd, settings.calibrate_fwd, settings.calibrate_ffwd) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
settings.calibrate_fwd (cyclomatic 16) REDACTED:2256— settings.calibrate_fwd 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. This shape REPEATS in the file: 3 other methods here (settings.calibrate_fbwd, settings.calibrate_bwd, settings.calibrate_ffwd) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
settings.calibrate_ffwd (cyclomatic 16) REDACTED:2329— settings.calibrate_ffwd 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. This shape REPEATS in the file: 3 other methods here (settings.calibrate_fbwd, settings.calibrate_bwd, settings.calibrate_fwd) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
trigger.action_activation (cyclomatic 16) raspiCamSrv/trigger.py:1402— trigger.action_activation 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.
TriggerHandler._findDeviceInRegistry (cyclomatic 16) raspiCamSrv/triggerHandler.py:81— TriggerHandler._findDeviceInRegistry 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.
webcam.switch_cameras (cyclomatic 16) raspiCamSrv/webcam.py:231— webcam.switch_cameras 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.
webcam.change_active_camera (cyclomatic 16) raspiCamSrv/webcam.py:331— webcam.change_active_camera 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.
photoseries.tlseries_properties (cognitive 327) raspiCamSrv/photoseries.py:762— photoseries.tlseries_properties has cognitive complexity 327 (threshold 15). Drivers by points: if/else 60 (300 pts), loops 3 (18 pts), boolean chains 9 (nesting depth added 255). 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.
Camera._photoSeriesThread (cognitive 216) raspiCamSrv/camera_pi.py:6761— Camera._photoSeriesThread has cognitive complexity 216 (threshold 15). Drivers by points: if/else 54 (186 pts), loops 4 (17 pts), boolean chains 8, error handling 2 (5 pts) (nesting depth added 148). 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.
config.liveViewCfg (cognitive 192) raspiCamSrv/config.py:864— config.liveViewCfg has cognitive complexity 192 (threshold 15). Drivers by points: if/else 47 (180 pts), boolean chains 12 (nesting depth added 133). 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.
webcam.stereo_config (cognitive 186) raspiCamSrv/webcam.py:1227— webcam.stereo_config has cognitive complexity 186 (threshold 15). Drivers by points: if/else 46 (170 pts), error handling 2 (16 pts) (nesting depth added 138). 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.
trigger.new_action (cognitive 182) raspiCamSrv/trigger.py:1262— trigger.new_action has cognitive complexity 182 (threshold 15). Drivers by points: if/else 40 (159 pts), loops 3 (21 pts), boolean chains 2 (nesting depth added 137). 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.
config.photoCfg (cognitive 160) raspiCamSrv/config.py:1186— config.photoCfg has cognitive complexity 160 (threshold 15). Drivers by points: if/else 37 (148 pts), boolean chains 12 (nesting depth added 111). 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.
config.videoCfg (cognitive 157) raspiCamSrv/config.py:1713— config.videoCfg has cognitive complexity 157 (threshold 15). Drivers by points: if/else 36 (145 pts), boolean chains 12 (nesting depth added 109). 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.
settings.serverconfig (cognitive 144) REDACTED:59— settings.serverconfig has cognitive complexity 144 (threshold 15). Drivers by points: if/else 36 (130 pts), loops 2 (10 pts), boolean chains 4 (nesting depth added 102). 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.
CameraController.requestConfig (cognitive 140) raspiCamSrv/camera_pi.py:768— CameraController.requestConfig has cognitive complexity 140 (threshold 15). Drivers by points: if/else 63 (135 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 74). 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.
ServerConfig.initFromDict (cognitive 136) REDACTED:7313— ServerConfig.initFromDict has cognitive complexity 136 (threshold 15). Drivers by points: loops 16 (72 pts), if/else 26 (64 pts) (nesting depth added 94). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Camera.applyControls (cognitive 129) raspiCamSrv/camera_pi.py:4121— Camera.applyControls has cognitive complexity 129 (threshold 15). Drivers by points: if/else 54 (101 pts), boolean chains 28 (nesting depth added 47). 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.
settings.test_device (cognitive 116) REDACTED:1841— settings.test_device has cognitive complexity 116 (threshold 15). Drivers by points: if/else 22 (83 pts), error handling 4 (21 pts), loops 2 (12 pts) (nesting depth added 88). 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.
trigger.castType (cognitive 115) raspiCamSrv/trigger.py:1140— trigger.castType has cognitive complexity 115 (threshold 15). Drivers by points: if/else 30 (95 pts), error handling 4 (14 pts), loops 1 (5 pts), boolean chains 1 (nesting depth added 79). 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.
CameraController.compareConfig (cognitive 108) raspiCamSrv/camera_pi.py:1210— CameraController.compareConfig has cognitive complexity 108 (threshold 15). Drivers by points: if/else 52 (104 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 54). 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.
Series.nextTimeSunCtrl (cognitive 108) raspiCamSrv/photoseriesCfg.py:1078— Series.nextTimeSunCtrl has cognitive complexity 108 (threshold 15). Drivers by points: if/else 33 (97 pts), loops 2 (9 pts), boolean chains 2 (nesting depth added 71). 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.
MotionDetector._doAction (cognitive 105) raspiCamSrv/motionDetector.py:368— MotionDetector._doAction has cognitive complexity 105 (threshold 15). Drivers by points: if/else 40 (94 pts), boolean chains 11 (nesting depth added 54). 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.
config.customTuning (cognitive 100) raspiCamSrv/config.py:424— config.customTuning has cognitive complexity 100 (threshold 15). Drivers by points: if/else 23 (88 pts), error handling 2 (12 pts) (nesting depth added 75). 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.
Camera.setStreamingConfigs (cognitive 97) raspiCamSrv/camera_pi.py:3293— Camera.setStreamingConfigs has cognitive complexity 97 (threshold 15). Drivers by points: if/else 34 (87 pts), loops 2 (7 pts), boolean chains 3 (nesting depth added 58). 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.
TriggerConfig.checkNotificationRecipient (cognitive 90) REDACTED:1467— TriggerConfig.checkNotificationRecipient has cognitive complexity 90 (threshold 15). Drivers by points: if/else 31 (73 pts), error handling 4 (17 pts) (nesting depth added 55). 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.
trigger.notify (cognitive 86) raspiCamSrv/trigger.py:398— trigger.notify has cognitive complexity 86 (threshold 15). Drivers by points: if/else 34 (84 pts), boolean chains 2 (nesting depth added 50). 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.
CameraController.requestStart (cognitive 80) raspiCamSrv/camera_pi.py:408— CameraController.requestStart has cognitive complexity 80 (threshold 15). Drivers by points: if/else 28 (71 pts), error handling 2 (8 pts), boolean chains 1 (nesting depth added 49). 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.
settings.docalibrate (cognitive 79) REDACTED:2153— settings.docalibrate has cognitive complexity 79 (threshold 15). Drivers by points: if/else 16 (58 pts), error handling 3 (16 pts), loops 1 (5 pts) (nesting depth added 59). 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.
TriggerHandler._logEvent (cognitive 79) raspiCamSrv/triggerHandler.py:1263— TriggerHandler._logEvent has cognitive complexity 79 (threshold 15). Drivers by points: if/else 39 (78 pts), boolean chains 1 (nesting depth added 39). 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.
TriggerHandler._doGpioAction (cognitive 75) raspiCamSrv/triggerHandler.py:238— TriggerHandler._doGpioAction has cognitive complexity 75 (threshold 15). Drivers by points: if/else 29 (61 pts), error handling 2 (7 pts), loops 2 (7 pts) (nesting depth added 42). 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.
trigger.trigger_action (cognitive 72) raspiCamSrv/trigger.py:1462— trigger.trigger_action has cognitive complexity 72 (threshold 15). Drivers by points: if/else 14 (54 pts), loops 5 (16 pts), boolean chains 2 (nesting depth added 51). 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.
photoseries.continue_series (cognitive 71) raspiCamSrv/photoseries.py:306— photoseries.continue_series has cognitive complexity 71 (threshold 15). Drivers by points: if/else 20 (68 pts), boolean chains 3 (nesting depth added 48). 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.
trigger.new_trigger (cognitive 71) raspiCamSrv/trigger.py:939— trigger.new_trigger has cognitive complexity 71 (threshold 15). Drivers by points: if/else 28 (63 pts), loops 2 (8 pts) (nesting depth added 41). 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.
TriggerHandler._initNotificationMessage (cognitive 70) raspiCamSrv/triggerHandler.py:880— TriggerHandler._initNotificationMessage has cognitive complexity 70 (threshold 15). Drivers by points: if/else 22 (61 pts), loops 5 (9 pts) (nesting depth added 43). 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.
Camera.initCamera (cognitive 69) raspiCamSrv/camera_pi.py:1742— Camera.initCamera has cognitive complexity 69 (threshold 15). Drivers by points: if/else 28 (57 pts), error handling 3 (9 pts), boolean chains 3 (nesting depth added 35). 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.
photoseries.start_series (cognitive 69) raspiCamSrv/photoseries.py:149— photoseries.start_series has cognitive complexity 69 (threshold 15). Drivers by points: if/else 19 (67 pts), boolean chains 2 (nesting depth added 48). 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.
MotionDetector._motionThread (cognitive 68) raspiCamSrv/motionDetector.py:786— MotionDetector._motionThread has cognitive complexity 68 (threshold 15). Drivers by points: if/else 21 (62 pts), error handling 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 43). 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.
photoseries.calcSunControlledSeries (cognitive 68) raspiCamSrv/photoseries.py:647— photoseries.calcSunControlledSeries has cognitive complexity 68 (threshold 15). Drivers by points: if/else 18 (57 pts), loops 3 (9 pts), boolean chains 2 (nesting depth added 45). 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.
Camera.setSecondCamera (cognitive 65) raspiCamSrv/camera_pi.py:3135— Camera.setSecondCamera has cognitive complexity 65 (threshold 15). Drivers by points: if/else 23 (53 pts), boolean chains 4, error handling 2 (4 pts), loops 2 (4 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.
photoseries.expseries_properties (cognitive 65) raspiCamSrv/photoseries.py:1030— photoseries.expseries_properties has cognitive complexity 65 (threshold 15). Drivers by points: if/else 21 (63 pts), boolean chains 2 (nesting depth added 42). 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.
ServerConfig.checkMicrophone (cognitive 63) REDACTED:6887— ServerConfig.checkMicrophone has cognitive complexity 63 (threshold 15). Drivers by points: if/else 15 (53 pts), loops 2 (8 pts), error handling 2 (nesting depth added 44). 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.
MotionDetector._stopAction (cognitive 63) raspiCamSrv/motionDetector.py:686— MotionDetector._stopAction has cognitive complexity 63 (threshold 15). Drivers by points: if/else 17 (59 pts), boolean chains 4 (nesting depth added 42). 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.
config.defaultTuning (cognitive 62) raspiCamSrv/config.py:545— config.defaultTuning has cognitive complexity 62 (threshold 15). Drivers by points: if/else 20 (62 pts) (nesting depth added 42). 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.
TriggerHandler._actionDispatcher (cognitive 62) raspiCamSrv/triggerHandler.py:1480— TriggerHandler._actionDispatcher has cognitive complexity 62 (threshold 15). Drivers by points: if/else 14 (56 pts), loops 2 (6 pts) (nesting depth added 46). 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.
settings.remove_users (cognitive 60) REDACTED:746— settings.remove_users has cognitive complexity 60 (threshold 15). Drivers by points: if/else 14 (39 pts), loops 4 (21 pts) (nesting depth added 42). 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.
ServerConfig._countThreads (cognitive 59) REDACTED:7196— ServerConfig._countThreads has cognitive complexity 59 (threshold 15). Drivers by points: if/else 16 (56 pts), error handling 2, loops 1 (nesting depth added 40). 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.
settings.calibrate_fbwd (cognitive 56) REDACTED:2007— settings.calibrate_fbwd has cognitive complexity 56 (threshold 15). Drivers by points: if/else 13 (40 pts), error handling 3 (16 pts) (nesting depth added 40). 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. This shape REPEATS in the file: 3 other methods here (settings.calibrate_bwd, settings.calibrate_fwd, settings.calibrate_ffwd) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
settings.calibrate_bwd (cognitive 56) REDACTED:2080— settings.calibrate_bwd has cognitive complexity 56 (threshold 15). Drivers by points: if/else 13 (40 pts), error handling 3 (16 pts) (nesting depth added 40). 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. This shape REPEATS in the file: 3 other methods here (settings.calibrate_fbwd, settings.calibrate_fwd, settings.calibrate_ffwd) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
settings.calibrate_fwd (cognitive 56) REDACTED:2256— settings.calibrate_fwd has cognitive complexity 56 (threshold 15). Drivers by points: if/else 13 (40 pts), error handling 3 (16 pts) (nesting depth added 40). 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. This shape REPEATS in the file: 3 other methods here (settings.calibrate_fbwd, settings.calibrate_bwd, settings.calibrate_ffwd) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
settings.calibrate_ffwd (cognitive 56) REDACTED:2329— settings.calibrate_ffwd has cognitive complexity 56 (threshold 15). Drivers by points: if/else 13 (40 pts), error handling 3 (16 pts) (nesting depth added 40). 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. This shape REPEATS in the file: 3 other methods here (settings.calibrate_fbwd, settings.calibrate_bwd, settings.calibrate_fwd) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
settings.device_properties (cognitive 55) REDACTED:1721— settings.device_properties has cognitive complexity 55 (threshold 15). Drivers by points: if/else 20 (51 pts), error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 33). 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.
Series.calcSunCtrlData (cognitive 54) raspiCamSrv/photoseriesCfg.py:1005— Series.calcSunCtrlData has cognitive complexity 54 (threshold 15). Drivers by points: if/else 28 (53 pts), boolean chains 1 (nesting depth added 25). 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.
config.setAiModelFile (cognitive 52) raspiCamSrv/config.py:2102— config.setAiModelFile has cognitive complexity 52 (threshold 15). Drivers by points: if/else 17 (49 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 33). 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.
Trigger.initFromDict (cognitive 51) REDACTED:333— Trigger.initFromDict has cognitive complexity 51 (threshold 15). Drivers by points: if/else 13 (38 pts), loops 4 (13 pts) (nesting depth added 34). 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.
config.enableAi (cognitive 50) raspiCamSrv/config.py:2199— config.enableAi has cognitive complexity 50 (threshold 15). Drivers by points: if/else 19 (48 pts), boolean chains 2 (nesting depth added 29). 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.
StereoCam._takeCalibPhotoThread (cognitive 50) raspiCamSrv/stereoCam.py:386— StereoCam._takeCalibPhotoThread has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (46 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 27). 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.
webcam.switch_cameras (cognitive 50) raspiCamSrv/webcam.py:231— webcam.switch_cameras has cognitive complexity 50 (threshold 15). Drivers by points: if/else 19 (47 pts), loops 1 (3 pts) (nesting depth added 30). 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.
Camera.switchCamera (cognitive 49) raspiCamSrv/camera_pi.py:2126— Camera.switchCamera has cognitive complexity 49 (threshold 15). Drivers by points: if/else 21 (39 pts), error handling 2 (8 pts), boolean chains 2 (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.
Camera.stopCameraSystem (cognitive 48) raspiCamSrv/camera_pi.py:4459— Camera.stopCameraSystem has cognitive complexity 48 (threshold 15). Drivers by points: if/else 23 (39 pts), loops 4 (9 pts) (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.
Camera.cameraStatus (cognitive 48) raspiCamSrv/camera_pi.py:7225— Camera.cameraStatus has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (41 pts), loops 1 (6 pts), boolean chains 1 (nesting depth added 28). 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.
config.getAiModelFiles (cognitive 48) raspiCamSrv/config.py:2004— config.getAiModelFiles has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (42 pts), loops 1 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 30). 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.
images.download_selected (cognitive 48) raspiCamSrv/images.py:323— images.download_selected has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (43 pts), loops 2 (5 pts) (nesting depth added 35). 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.
photoseries.focusstack_properties (cognitive 48) raspiCamSrv/photoseries.py:1130— photoseries.focusstack_properties has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (46 pts), boolean chains 2 (nesting depth added 29). 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.
TriggerHandler._waitForCompletion (cognitive 47) raspiCamSrv/triggerHandler.py:1223— TriggerHandler._waitForCompletion has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (40 pts), loops 2 (7 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.
photoseries.series_properties (cognitive 46) raspiCamSrv/photoseries.py:460— photoseries.series_properties has cognitive complexity 46 (threshold 15). Drivers by points: if/else 19 (44 pts), boolean chains 2 (nesting depth added 25). 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.
settings.delete_device (cognitive 45) REDACTED:1563— settings.delete_device has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (38 pts), loops 2 (7 pts) (nesting depth added 32). 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.
Camera._thread (cognitive 44) raspiCamSrv/camera_pi.py:4579— Camera._thread has cognitive complexity 44 (threshold 15). Drivers by points: if/else 22 (38 pts), error handling 3, 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.
config.remLiveViewControls (cognitive 44) raspiCamSrv/config.py:1109— config.remLiveViewControls has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 3 (14 pts) (nesting depth added 29). 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. This shape REPEATS in the file: 3 other methods here (config.remPhotoControls, config.remRawControls, config.remVideoControls) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
config.remPhotoControls (cognitive 44) raspiCamSrv/config.py:1410— config.remPhotoControls has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 3 (14 pts) (nesting depth added 29). 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. This shape REPEATS in the file: 3 other methods here (config.remLiveViewControls, config.remRawControls, config.remVideoControls) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
config.remRawControls (cognitive 44) raspiCamSrv/config.py:1639— config.remRawControls has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 3 (14 pts) (nesting depth added 29). 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. This shape REPEATS in the file: 3 other methods here (config.remLiveViewControls, config.remPhotoControls, config.remVideoControls) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
config.remVideoControls (cognitive 44) raspiCamSrv/config.py:1930— config.remVideoControls has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 3 (14 pts) (nesting depth added 29). 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. This shape REPEATS in the file: 3 other methods here (config.remLiveViewControls, config.remPhotoControls, config.remRawControls) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
trigger.action_activation (cognitive 44) raspiCamSrv/trigger.py:1402— trigger.action_activation has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (37 pts), loops 2 (7 pts) (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.
webcam.calib_settings (cognitive 44) raspiCamSrv/webcam.py:1552— webcam.calib_settings has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (44 pts) (nesting depth added 28). 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.
TriggerConfig.getEventList (cognitive 43) REDACTED:1234— TriggerConfig.getEventList has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (32 pts), loops 4 (9 pts), error handling 1 (2 pts) (nesting depth added 23). 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.
images.getFileList (cognitive 43) raspiCamSrv/images.py:19— images.getFileList has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (31 pts), loops 3 (5 pts), boolean chains 4, error handling 1 (3 pts) (nesting depth added 25). 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.
MotionDetector.prepareRoIs (cognitive 43) raspiCamSrv/motionDetector.py:194— MotionDetector.prepareRoIs has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (39 pts), loops 2 (4 pts) (nesting depth added 26). 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.
webcam.change_active_camera (cognitive 43) raspiCamSrv/webcam.py:331— webcam.change_active_camera has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (41 pts), loops 1 (2 pts) (nesting depth added 26). 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.
Camera.getActiveCamera (cognitive 42) raspiCamSrv/camera_pi.py:1972— Camera.getActiveCamera has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (34 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 22). 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.
settings.load_config (cognitive 42) REDACTED:873— settings.load_config has cognitive complexity 42 (threshold 15). Drivers by points: if/else 19 (42 pts) (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.
config.ai_settings (cognitive 41) raspiCamSrv/config.py:2283— config.ai_settings has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (38 pts), boolean chains 3 (nesting depth added 23). 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.
trigger.trgcontrol (cognitive 41) raspiCamSrv/trigger.py:72— trigger.trgcontrol has cognitive complexity 41 (threshold 15). Drivers by points: if/else 22 (38 pts), loops 1 (2 pts), boolean chains 1 (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.
raspiCamSrv.create_app (cognitive 40) raspiCamSrv/__init__.py:15— raspiCamSrv.create_app has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (36 pts), boolean chains 2, error handling 1, loops 1 (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.
api.probeTerm (cognitive 39) raspiCamSrv/api.py:662— api.probeTerm has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (36 pts), error handling 2, loops 1 (nesting depth added 20). 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.
ServerConfig.checkJwtSettings (cognitive 39) REDACTED:7077— ServerConfig.checkJwtSettings has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (31 pts), error handling 2 (8 pts) (nesting depth added 22). 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.
TriggerHandler._doCameraAction (cognitive 39) raspiCamSrv/triggerHandler.py:766— TriggerHandler._doCameraAction has cognitive complexity 39 (threshold 15). Drivers by points: if/else 23 (37 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.
StereoConfig.getNextPhotoIdx (cognitive 38) REDACTED:4361— StereoConfig.getNextPhotoIdx has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (32 pts), loops 2 (6 pts) (nesting depth added 25). 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.
CameraCfg.setUsbCamControls (cognitive 38) REDACTED:8231— CameraCfg.setUsbCamControls has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 5, loops 2 (4 pts), error handling 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.
MotionDetectOpticalFlow.detectMotion (cognitive 38) raspiCamSrv/motionAlgoIB.py:664— MotionDetectOpticalFlow.detectMotion has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (34 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 22). 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.
CameraController.requestStop (cognitive 37) raspiCamSrv/camera_pi.py:632— CameraController.requestStop has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (22 pts), error handling 4 (9 pts), loops 2 (6 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.
Camera.loadCameraSpecifics (cognitive 37) raspiCamSrv/camera_pi.py:2904— Camera.loadCameraSpecifics has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 2, loops 1 (2 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.
Camera.usbFrameApplyControls (cognitive 37) raspiCamSrv/camera_pi.py:4006— Camera.usbFrameApplyControls has cognitive complexity 37 (threshold 15). Drivers by points: if/else 21 (37 pts) (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.
config.doSyncAspectRatio (cognitive 37) raspiCamSrv/config.py:122— config.doSyncAspectRatio has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (31 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 24). 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.
config.deleteTuningFile (cognitive 37) raspiCamSrv/config.py:634— config.deleteTuningFile has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (34 pts), loops 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.
api.record_video_both (cognitive 36) raspiCamSrv/api.py:535— api.record_video_both has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (36 pts) (nesting depth added 20). 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.
config.rawCfg (cognitive 36) raspiCamSrv/config.py:1484— config.rawCfg has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (36 pts) (nesting depth added 22). 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.
MotionDetectFrameDiff.detectMotion (cognitive 36) raspiCamSrv/motionAlgoIB.py:471— MotionDetectFrameDiff.detectMotion has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (33 pts), loops 2 (3 pts) (nesting depth added 22). 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. This shape REPEATS in the file: one other method here (MotionDetectBgSubtract.detectMotion) 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.
MotionDetectBgSubtract.detectMotion (cognitive 36) raspiCamSrv/motionAlgoIB.py:977— MotionDetectBgSubtract.detectMotion has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (33 pts), loops 2 (3 pts) (nesting depth added 22). 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. This shape REPEATS in the file: one other method here (MotionDetectFrameDiff.detectMotion) 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.
settings.castType (cognitive 36) REDACTED:1638— settings.castType has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 1 (5 pts), error handling 2 (4 pts) (nesting depth added 23). 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.
Camera._videoThreadUsb (cognitive 35) raspiCamSrv/camera_pi.py:6053— Camera._videoThreadUsb has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 2 (4 pts), boolean chains 1, error handling 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.
config.uploadTuningFile (cognitive 35) raspiCamSrv/config.py:786— config.uploadTuningFile has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 1 (4 pts), error handling 1 (3 pts) (nesting depth added 22). 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.
home.focus_control (cognitive 35) REDACTED:139— home.focus_control has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (35 pts) (nesting depth added 18). 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.
settings.api_config (cognitive 35) REDACTED:1027— settings.api_config has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (29 pts), error handling 1 (5 pts), boolean chains 1 (nesting depth added 20). 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.
webcam.cam_record_video_both (cognitive 35) raspiCamSrv/webcam.py:963— webcam.cam_record_video_both has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (35 pts) (nesting depth added 21). 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.
Camera.takeImage (cognitive 34) raspiCamSrv/camera_pi.py:5238— Camera.takeImage has cognitive complexity 34 (threshold 15). Drivers by points: if/else 21 (32 pts), boolean chains 1, error handling 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.
Camera._videoThread2Usb (cognitive 34) raspiCamSrv/camera_pi.py:6305— Camera._videoThread2Usb has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 2 (4 pts), error handling 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.
Series.logPhoto (cognitive 34) raspiCamSrv/photoseriesCfg.py:1416— Series.logPhoto has cognitive complexity 34 (threshold 15). Drivers by points: if/else 28 (29 pts), loops 2 (5 pts) (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.
settings.new_device (cognitive 34) REDACTED:1435— settings.new_device has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 3 (11 pts) (nesting depth added 22). 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.
trigger.start_triggered_capture (cognitive 34) raspiCamSrv/trigger.py:492— trigger.start_triggered_capture has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (33 pts), boolean chains 1 (nesting depth added 20). 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.
ServerConfig.displayBufferRemove (cognitive 33) REDACTED:6644— ServerConfig.displayBufferRemove has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 2 (8 pts) (nesting depth added 22). 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.
Camera.takeRawImage (cognitive 33) raspiCamSrv/camera_pi.py:5799— Camera.takeRawImage has cognitive complexity 33 (threshold 15). Drivers by points: if/else 21 (31 pts), boolean chains 1, error handling 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.
settings.vbutton_dimensions (cognitive 33) REDACTED:1114— settings.vbutton_dimensions has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2 (9 pts), boolean chains 2 (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. This shape REPEATS in the file: 2 other methods here (settings.abutton_dimensions, settings.lbutton_dimensions) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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.
settings.abutton_dimensions (cognitive 33) REDACTED:1219— settings.abutton_dimensions has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2 (9 pts), boolean chains 2 (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. This shape REPEATS in the file: 2 other methods here (settings.vbutton_dimensions, settings.lbutton_dimensions) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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.
settings.lbutton_dimensions (cognitive 33) REDACTED:1323— settings.lbutton_dimensions has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2 (9 pts), boolean chains 2 (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. This shape REPEATS in the file: 2 other methods here (settings.vbutton_dimensions, settings.abutton_dimensions) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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.
config.tuningCfg (cognitive 32) raspiCamSrv/config.py:341— config.tuningCfg has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (32 pts) (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.
api.switch_cameras (cognitive 31) raspiCamSrv/api.py:354— api.switch_cameras has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (30 pts), 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.
trigger.test_motion_detection (cognitive 31) raspiCamSrv/trigger.py:214— trigger.test_motion_detection has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (31 pts) (nesting depth added 19). 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.
TriggerHandler._closeGpioDevices (cognitive 31) raspiCamSrv/triggerHandler.py:1875— TriggerHandler._closeGpioDevices has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (22 pts), error handling 1 (6 pts), loops 2 (3 pts) (nesting depth added 21). 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.
auth.register (cognitive 30) raspiCamSrv/auth.py:27— auth.register has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 4 (12 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.
Camera.startLiveStream2 (cognitive 30) raspiCamSrv/camera_pi.py:2444— Camera.startLiveStream2 has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (29 pts), boolean chains 1 (nesting depth added 18). 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.
TriggerConfig.triggerEvents (cognitive 29) REDACTED:1716— TriggerConfig.triggerEvents has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (26 pts), loops 1 (3 pts) (nesting depth added 20). 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.
CameraController.requestCameraForConfig (cognitive 29) raspiCamSrv/camera_pi.py:192— CameraController.requestCameraForConfig has cognitive complexity 29 (threshold 15). Drivers by points: if/else 20 (29 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.
Camera.framesUsb (cognitive 29) raspiCamSrv/camera_pi.py:4814— Camera.framesUsb has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (24 pts), error handling 4, loops 1 (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.
webcam.cam_record_video (cognitive 28) raspiCamSrv/webcam.py:603— webcam.cam_record_video has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (28 pts) (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.
Action.initFromDict (cognitive 27) REDACTED:440— Action.initFromDict has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 3 (9 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.
Camera.takeImage2 (cognitive 27) raspiCamSrv/camera_pi.py:5377— Camera.takeImage2 has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 1, error handling 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.
Camera.draw_detections (cognitive 27) raspiCamSrv/camera_pi.py:7535— Camera.draw_detections has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 2 (4 pts), boolean chains 3 (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.
home.record_video (cognitive 27) REDACTED:1218— home.record_video has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (27 pts) (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.
trigger.motion (cognitive 27) raspiCamSrv/trigger.py:146— trigger.motion has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (26 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.
auth.password (cognitive 26) raspiCamSrv/auth.py:141— auth.password has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), error handling 3 (10 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.
TriggerConfig.checkRoisAgainstScalerCropLiveView (cognitive 26) REDACTED:820— TriggerConfig.checkRoisAgainstScalerCropLiveView has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 2, loops 2 (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.
webcam.cam_take_raw_photo_both (cognitive 26) raspiCamSrv/webcam.py:904— webcam.cam_take_raw_photo_both has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (26 pts) (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.
CameraInfo.setUsbDev (cognitive 25) REDACTED:2112— CameraInfo.setUsbDev has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (15 pts), error handling 2 (6 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 16). 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.
ServerConfig.libcameraInfo (cognitive 25) REDACTED:6228— ServerConfig.libcameraInfo has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (3 pts), boolean chains 2, error handling 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.
Camera._thread2 (cognitive 25) raspiCamSrv/camera_pi.py:4712— Camera._thread2 has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (23 pts), error handling 1, 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.
Camera.takeRawImage2 (cognitive 25) raspiCamSrv/camera_pi.py:5934— Camera.takeRawImage2 has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 1, error handling 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.
Camera._videoThread (cognitive 25) raspiCamSrv/camera_pi.py:6172— Camera._videoThread has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 2 (4 pts), error handling 3, 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.
webcam.doInitCalibration (cognitive 25) raspiCamSrv/webcam.py:1831— webcam.doInitCalibration has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19 (25 pts) (nesting depth added 6). 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.
CameraCfg.setUsbSensorModes (cognitive 24) REDACTED:8155— CameraCfg.setUsbSensorModes has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (21 pts), error handling 2, loops 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.
Camera.restoreConfigFromStreamingConfig (cognitive 24) raspiCamSrv/camera_pi.py:3652— Camera.restoreConfigFromStreamingConfig has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (24 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.
api.take_photo_both (cognitive 23) raspiCamSrv/api.py:125— api.take_photo_both has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (23 pts) (nesting depth added 12). 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. This shape REPEATS in the file: one other method here (api.take_raw_photo_both) 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.
api.take_raw_photo_both (cognitive 23) raspiCamSrv/api.py:211— api.take_raw_photo_both has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (23 pts) (nesting depth added 12). 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. This shape REPEATS in the file: one other method here (api.take_photo_both) 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.
Camera.quickPhoto (cognitive 23) raspiCamSrv/camera_pi.py:5496— Camera.quickPhoto has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (20 pts), error handling 1 (3 pts) (nesting depth added 13). 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.
config.getTuningFiles (cognitive 23) raspiCamSrv/config.py:313— config.getTuningFiles has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 1 (3 pts) (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.
home.ae_control (cognitive 23) REDACTED:755— home.ae_control has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (23 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.
photoseries.new_series (cognitive 23) raspiCamSrv/photoseries.py:47— photoseries.new_series has cognitive complexity 23 (threshold 15). Drivers by points: error handling 4 (12 pts), if/else 6 (11 pts) (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.
TriggerHandler._bouncing (cognitive 23) raspiCamSrv/triggerHandler.py:194— TriggerHandler._bouncing has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (23 pts) (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.
TriggerHandler._stageVideoPlaceholder (cognitive 23) raspiCamSrv/triggerHandler.py:386— TriggerHandler._stageVideoPlaceholder has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 1 (2 pts) (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.
TriggerHandler._doStartVideo (cognitive 23) raspiCamSrv/triggerHandler.py:486— TriggerHandler._doStartVideo has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 1, error handling 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.
TriggerHandler._findActiveCameraAction (cognitive 23) raspiCamSrv/triggerHandler.py:730— TriggerHandler._findActiveCameraAction has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (6 pts) (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.
webcam.cam_take_raw_photo (cognitive 23) raspiCamSrv/webcam.py:557— webcam.cam_take_raw_photo has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (23 pts) (nesting depth added 13). 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.
ServerConfig.freeGpioPins (cognitive 22) REDACTED:6167— ServerConfig.freeGpioPins has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (18 pts), loops 3 (4 pts) (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.
Camera.startLiveStream (cognitive 22) raspiCamSrv/camera_pi.py:2387— Camera.startLiveStream has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 2 (nesting depth added 12). 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.
config.addLiveViewControls (cognitive 22) raspiCamSrv/config.py:1050— config.addLiveViewControls has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 1 (3 pts) (nesting depth added 13). 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. This shape REPEATS in the file: 3 other methods here (config.addPhotoControls, config.addRawControls, config.addVideoControls) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
config.addPhotoControls (cognitive 22) raspiCamSrv/config.py:1352— config.addPhotoControls has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 1 (3 pts) (nesting depth added 13). 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. This shape REPEATS in the file: 3 other methods here (config.addLiveViewControls, config.addRawControls, config.addVideoControls) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
config.addRawControls (cognitive 22) raspiCamSrv/config.py:1581— config.addRawControls has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 1 (3 pts) (nesting depth added 13). 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. This shape REPEATS in the file: 3 other methods here (config.addLiveViewControls, config.addPhotoControls, config.addVideoControls) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
config.addVideoControls (cognitive 22) raspiCamSrv/config.py:1872— config.addVideoControls has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 1 (3 pts) (nesting depth added 13). 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. This shape REPEATS in the file: 3 other methods here (config.addLiveViewControls, config.addPhotoControls, config.addRawControls) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
home.exposure_control (cognitive 22) REDACTED:820— home.exposure_control has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (22 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.
home.image_control (cognitive 22) REDACTED:888— home.image_control has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (22 pts) (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.
home.take_raw_photo (cognitive 22) REDACTED:1183— home.take_raw_photo has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (22 pts) (nesting depth added 13). 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.
settings.parseColorTuple (cognitive 22) REDACTED:1693— settings.parseColorTuple has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 1 (4 pts) (nesting depth added 13). 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.
TriggerHandler._doTakePhoto (cognitive 22) raspiCamSrv/triggerHandler.py:634— TriggerHandler._doTakePhoto has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 1, error handling 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.
TriggerHandler._attachMedia (cognitive 22) raspiCamSrv/triggerHandler.py:992— TriggerHandler._attachMedia has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 2 (6 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.
api.record_video (cognitive 21) raspiCamSrv/api.py:411— api.record_video has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (21 pts) (nesting depth added 12). 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.
CameraController.codeGenConfig (cognitive 21) raspiCamSrv/camera_pi.py:1065— CameraController.codeGenConfig has cognitive complexity 21 (threshold 15). Drivers by points: if/else 20 (21 pts) (nesting depth added 1). 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.
Camera.quickVideoStart (cognitive 21) raspiCamSrv/camera_pi.py:5579— Camera.quickVideoStart has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 1 (3 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.
Camera._videoThread2 (cognitive 21) raspiCamSrv/camera_pi.py:6430— Camera._videoThread2 has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (4 pts), error handling 3 (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.
Camera.cam2_draw_detections (cognitive 21) raspiCamSrv/camera_pi.py:7858— Camera.cam2_draw_detections has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 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.
MotionDetectAlgoIB.recordMotion (cognitive 21) raspiCamSrv/motionAlgoIB.py:289— MotionDetectAlgoIB.recordMotion has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (8 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.
settings.configBackup (cognitive 21) REDACTED:411— settings.configBackup has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 1 (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.
webcam.change_second_camera (cognitive 21) raspiCamSrv/webcam.py:413— webcam.change_second_camera has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 1 (2 pts) (nesting depth added 12). 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.
webcam.doCleanup (cognitive 21) raspiCamSrv/webcam.py:1779— webcam.doCleanup has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 1 (5 pts), loops 2 (4 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.
api.start_triggered_capture (cognitive 20) raspiCamSrv/api.py:251— api.start_triggered_capture has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2 (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.
TriggerConfig.initFromDict (cognitive 20) REDACTED:1993— TriggerConfig.initFromDict has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (9 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.
Camera.getUsbCamMetadata (cognitive 20) raspiCamSrv/camera_pi.py:5170— Camera.getUsbCamMetadata has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2 (nesting depth added 10). 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.
Series.getPreviewListHistDetail (cognitive 20) raspiCamSrv/photoseriesCfg.py:1344— Series.getPreviewListHistDetail has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 1 (2 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.
TriggerHandler._findDeviceInRegistry (cognitive 20) raspiCamSrv/triggerHandler.py:81— TriggerHandler._findDeviceInRegistry has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (20 pts) (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.
webcam.cam_take_photo (cognitive 20) raspiCamSrv/webcam.py:510— webcam.cam_take_photo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (20 pts) (nesting depth added 12). 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.
webcam.take_photo_both (cognitive 20) raspiCamSrv/webcam.py:856— webcam.take_photo_both has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (20 pts) (nesting depth added 11). 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.
ServerConfig._checkMicrophoneNoJson (cognitive 19) REDACTED:6833— ServerConfig._checkMicrophoneNoJson has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (16 pts), error handling 2, loops 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.
Camera.get_photoFrame2_hr (cognitive 19) raspiCamSrv/camera_pi.py:2867— Camera.get_photoFrame2_hr has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 1 (5 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.
Camera.applyMappedControlToUsbCamera (cognitive 19) raspiCamSrv/camera_pi.py:3846— Camera.applyMappedControlToUsbCamera has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 1 (4 pts), boolean chains 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.
Camera.applyControlsForAfCycle (cognitive 19) raspiCamSrv/camera_pi.py:4393— Camera.applyControlsForAfCycle has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 6 (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.
home.take_photo (cognitive 19) REDACTED:1146— home.take_photo has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (19 pts) (nesting depth added 12). 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.
photoseries.calcSunAzimuthSeries (cognitive 19) raspiCamSrv/photoseries.py:717— photoseries.calcSunAzimuthSeries has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (5 pts), boolean chains 2 (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.
Series.nextTime (cognitive 19) raspiCamSrv/photoseriesCfg.py:1235— Series.nextTime has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 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.
settings.calibrate_device (cognitive 19) REDACTED:1956— settings.calibrate_device has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 1 (4 pts) (nesting depth added 11). 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.
api.propGen (cognitive 18) raspiCamSrv/api.py:636— api.propGen has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (17 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.
TriggerConfig.actionTargets (cognitive 18) REDACTED:1775— TriggerConfig.actionTargets has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (3 pts) (nesting depth added 11). 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.
TriggerConfig.cameraSettings (cognitive 18) REDACTED:1911— TriggerConfig.cameraSettings has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18. 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.
ServerConfig.unregisterStreamingClient (cognitive 18) REDACTED:5715— ServerConfig.unregisterStreamingClient has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (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.
ServerConfig.displayBufferCheck (cognitive 18) REDACTED:6710— ServerConfig.displayBufferCheck has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 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.
home.trigger_autofocus (cognitive 18) REDACTED:223— home.trigger_autofocus has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (18 pts) (nesting depth added 10). 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.
MotionDetector.startMotionDetection (cognitive 18) raspiCamSrv/motionDetector.py:878— MotionDetector.startMotionDetection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (18 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.
GPIODevice.initFromDict (cognitive 17) REDACTED:240— GPIODevice.initFromDict has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (5 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.
TriggerConfig._parseWindows (cognitive 17) REDACTED:1429— TriggerConfig._parseWindows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (3 pts) (nesting depth added 10). 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. This shape REPEATS in the file: one other method here (CameraControls._parseWindows) 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.
CameraControls._parseWindows (cognitive 17) REDACTED:2786— CameraControls._parseWindows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (3 pts) (nesting depth added 10). 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. This shape REPEATS in the file: one other method here (TriggerConfig._parseWindows) 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.
CameraConfig.initFromDict (cognitive 17) REDACTED:3281— CameraConfig.initFromDict has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 4 (8 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ServerConfig.registerStreamingClient (cognitive 17) REDACTED:5685— ServerConfig.registerStreamingClient has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 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.
Camera.loadUsbCameraSpecifics (cognitive 17) raspiCamSrv/camera_pi.py:3032— Camera.loadUsbCameraSpecifics has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (17 pts) (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.
home.zoom_in (cognitive 17) REDACTED:308— home.zoom_in has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (3 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.
MotionDetectBgSubtract.backSubModel (cognitive 17) raspiCamSrv/motionAlgoIB.py:944— MotionDetectBgSubtract.backSubModel has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 5 (8 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Series.nextPhoto (cognitive 17) raspiCamSrv/photoseriesCfg.py:953— Series.nextPhoto has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (17 pts) (nesting depth added 10). 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.
Series.initFromDict (cognitive 17) raspiCamSrv/photoseriesCfg.py:1548— Series.initFromDict has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 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.
settings.select_device (cognitive 17) REDACTED:1494— settings.select_device has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (6 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.
Sun.find_times_for_azimuth (cognitive 17) raspiCamSrv/sun.py:307— Sun.find_times_for_azimuth has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2, 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.
TriggerHandler._registerGpioTrigger (cognitive 17) raspiCamSrv/triggerHandler.py:1604— TriggerHandler._registerGpioTrigger has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (2 pts), error handling 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.
REDACTED.showAfWindows (cognitive 17) REDACTED:2001— REDACTED.showAfWindows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (17 pts) (nesting depth added 9). 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.
REDACTED.parseWindows (cognitive 17) REDACTED:2117— REDACTED.parseWindows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (3 pts) (nesting depth added 10). 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.
REDACTED.parseWindows (cognitive 17) REDACTED:2448— REDACTED.parseWindows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (3 pts) (nesting depth added 10). 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.
home.zoom_out (cognitive 16) REDACTED:400— home.zoom_out has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 1 (3 pts) (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.
images.delete_selected (cognitive 16) raspiCamSrv/images.py:258— images.delete_selected has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 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.
photoseries.pause_series (cognitive 16) raspiCamSrv/photoseries.py:238— photoseries.pause_series has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 1 (nesting depth added 10). 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. This shape REPEATS in the file: one other method here (photoseries.finish_series) 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.
photoseries.finish_series (cognitive 16) raspiCamSrv/photoseries.py:271— photoseries.finish_series has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 1 (nesting depth added 10). 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. This shape REPEATS in the file: one other method here (photoseries.pause_series) 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.
Series.checkPhotos (cognitive 16) raspiCamSrv/photoseriesCfg.py:1520— Series.checkPhotos has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (14 pts), error handling 1, loops 1 (nesting depth added 10). 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.
TriggerHandler.doAction (cognitive 16) raspiCamSrv/triggerHandler.py:1116— TriggerHandler.doAction has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (16 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.
TriggerHandler._unregisterGpioTrigger (cognitive 16) raspiCamSrv/triggerHandler.py:1758— TriggerHandler._unregisterGpioTrigger has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (16 pts) (nesting depth added 10). 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. This shape REPEATS in the file: 2 other methods here (TriggerHandler._unregisterCameraTrigger, TriggerHandler._unregisterMotionDetectorTrigger) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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.
TriggerHandler._unregisterCameraTrigger (cognitive 16) raspiCamSrv/triggerHandler.py:1790— TriggerHandler._unregisterCameraTrigger has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (16 pts) (nesting depth added 10). 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. This shape REPEATS in the file: 2 other methods here (TriggerHandler._unregisterGpioTrigger, TriggerHandler._unregisterMotionDetectorTrigger) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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.
TriggerHandler._unregisterMotionDetectorTrigger (cognitive 16) raspiCamSrv/triggerHandler.py:1821— TriggerHandler._unregisterMotionDetectorTrigger has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (16 pts) (nesting depth added 10). 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. This shape REPEATS in the file: 2 other methods here (TriggerHandler._unregisterGpioTrigger, TriggerHandler._unregisterCameraTrigger) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 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· Near-duplicate member family (8 members, 17 shared lines) · ×1
Near-duplicate member family (8 members, 17 shared lines) REDACTED:264— REDACTED:264-303 | REDACTED:401-449 | REDACTED:455-494 | REDACTED:500-533 | REDACTED:539-578 | REDACTED:584-626 | REDACTED:632-665 | REDACTED:671-704 — These 8 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 8 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 8 times.
D4 · Code Duplication· Near-duplicate member family (3 members, 41 shared lines) · ×1
Near-duplicate member family (3 members, 41 shared lines) raspiCamSrv/motionAlgoIB.py:472— raspiCamSrv/motionAlgoIB.py:472-567 | raspiCamSrv/motionAlgoIB.py:665-767 | raspiCamSrv/motionAlgoIB.py:978-1073 — These 3 members are variants of one another: a block of 41 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.
Near-duplicate member pair (68 shared lines) raspiCamSrv/camera_pi.py:5244— raspiCamSrv/camera_pi.py:5244-5374 | raspiCamSrv/camera_pi.py:5802-5931 — These two members are variants of one another: 68 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (55 shared lines) raspiCamSrv/camera_pi.py:1743— raspiCamSrv/camera_pi.py:1743-1969 | raspiCamSrv/camera_pi.py:2127-2384 — These two members are variants of one another: 55 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (35 shared lines) raspiCamSrv/camera_pi.py:5383— raspiCamSrv/camera_pi.py:5383-5493 | raspiCamSrv/camera_pi.py:5937-6050 — These two members are variants of one another: 35 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×1
Edited copy of a member (22 corresponding lines) raspiCamSrv/motionAlgoIB.py:570— raspiCamSrv/motionAlgoIB.py:570-606 | raspiCamSrv/motionAlgoIB.py:1076-1129 — These two members are one piece of code written twice and then edited apart: 22 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 (23 corresponding lines) · ×1
Edited copy of a member (23 corresponding lines) raspiCamSrv/camera_pi.py:5001— raspiCamSrv/camera_pi.py:5001-5050 | raspiCamSrv/camera_pi.py:5054-5114 — These two members are one piece of code written twice and then edited apart: 23 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· Members sharing a duplicated core (24 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (24 members, 50+ identical tokens) raspiCamSrv/config.py:43— raspiCamSrv/config.py:43-82 | raspiCamSrv/config.py:191-259 | raspiCamSrv/config.py:342-419 | raspiCamSrv/config.py:425-540 | raspiCamSrv/config.py:546-629 | raspiCamSrv/config.py:635-727 | raspiCamSrv/config.py:733-781 | raspiCamSrv/config.py:787-859 | raspiCamSrv/config.py:865-1045 | raspiCamSrv/config.py:1051-1104 | raspiCamSrv/config.py:1110-1181 | raspiCamSrv/config.py:1187-1347 | raspiCamSrv/config.py:1353-1405 | raspiCamSrv/config.py:1411-1479 | raspiCamSrv/config.py:1485-1576 | raspiCamSrv/config.py:1582-1634 | raspiCamSrv/config.py:1640-1708 | raspiCamSrv/config.py:1714-1867 | raspiCamSrv/config.py:1873-1925 | raspiCamSrv/config.py:1931-1999 | raspiCamSrv/config.py:2005-2097 | raspiCamSrv/config.py:2103-2194 | raspiCamSrv/config.py:2200-2278 | raspiCamSrv/config.py:2284-2353 — These 24 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 24 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 24 times.
D4 · Code Duplication· Members sharing a duplicated core (18 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (18 members, 50+ identical tokens) REDACTED:1001— REDACTED:1001-1023 | REDACTED:1115-1170 | REDACTED:1175-1215 | REDACTED:1220-1274 | REDACTED:1279-1319 | REDACTED:1324-1378 | REDACTED:1383-1431 | REDACTED:1436-1490 | REDACTED:1495-1528 | REDACTED:1564-1613 | REDACTED:1722-1815 | REDACTED:1842-1952 | REDACTED:1957-2003 | REDACTED:2008-2076 | REDACTED:2081-2149 | REDACTED:2154-2252 | REDACTED:2257-2325 | REDACTED:2330-2398 — These 18 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 18 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 18 times.
D4 · Code Duplication· Members sharing a duplicated core (17 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (17 members, 50+ identical tokens) REDACTED:39— REDACTED:39-55 | REDACTED:60-198 | REDACTED:228-282 | REDACTED:287-407 | REDACTED:412-497 | REDACTED:564-643 | REDACTED:648-687 | REDACTED:692-742 | REDACTED:840-869 | REDACTED:874-973 | REDACTED:1028-1085 | REDACTED:1090-1110 | REDACTED:2403-2428 | REDACTED:2433-2475 | REDACTED:2480-2502 | REDACTED:2507-2530 | REDACTED:2535-2557 — These 17 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 17 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 17 times.
D4 · Code Duplication· Members sharing a duplicated core (16 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (16 members, 50+ identical tokens) raspiCamSrv/photoseries.py:48— raspiCamSrv/photoseries.py:48-120 | raspiCamSrv/photoseries.py:125-145 | raspiCamSrv/photoseries.py:150-234 | raspiCamSrv/photoseries.py:239-267 | raspiCamSrv/photoseries.py:272-302 | raspiCamSrv/photoseries.py:307-389 | raspiCamSrv/photoseries.py:394-412 | raspiCamSrv/photoseries.py:417-456 | raspiCamSrv/photoseries.py:461-548 | raspiCamSrv/photoseries.py:553-576 | raspiCamSrv/photoseries.py:581-609 | raspiCamSrv/photoseries.py:614-627 | raspiCamSrv/photoseries.py:632-645 | raspiCamSrv/photoseries.py:763-1003 | raspiCamSrv/photoseries.py:1031-1110 | raspiCamSrv/photoseries.py:1131-1197 — These 16 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 16 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 16 times.
D4 · Code Duplication· Members sharing a duplicated core (11 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (11 members, 50+ identical tokens) raspiCamSrv/trigger.py:73— raspiCamSrv/trigger.py:73-142 | raspiCamSrv/trigger.py:215-260 | raspiCamSrv/trigger.py:265-281 | raspiCamSrv/trigger.py:493-536 | raspiCamSrv/trigger.py:541-561 | raspiCamSrv/trigger.py:738-753 | raspiCamSrv/trigger.py:758-773 | raspiCamSrv/trigger.py:940-1042 | raspiCamSrv/trigger.py:1083-1115 | raspiCamSrv/trigger.py:1263-1380 | raspiCamSrv/trigger.py:1463-1515 — These 11 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 11 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 11 times.
D4 · Code Duplication· Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (8 members, 50+ identical tokens) raspiCamSrv/trigger.py:566— raspiCamSrv/trigger.py:566-577 | raspiCamSrv/trigger.py:582-593 | raspiCamSrv/trigger.py:615-626 | raspiCamSrv/trigger.py:631-642 | raspiCamSrv/trigger.py:647-657 | raspiCamSrv/trigger.py:662-672 | raspiCamSrv/trigger.py:693-703 | raspiCamSrv/trigger.py:708-718 — These 8 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 8 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 8 times.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (7 members, 50+ identical tokens) REDACTED:1390— REDACTED:1390-1407 | REDACTED:1412-1429 | REDACTED:1434-1451 | REDACTED:1478-1496 | REDACTED:1523-1540 | REDACTED:1545-1562 | REDACTED:1567-1584 — These 7 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 7 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 7 times.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (6 members, 50+ identical tokens) raspiCamSrv/trigger.py:598— raspiCamSrv/trigger.py:598-610 | raspiCamSrv/trigger.py:677-688 | raspiCamSrv/trigger.py:807-818 | raspiCamSrv/trigger.py:869-885 | raspiCamSrv/trigger.py:890-910 | raspiCamSrv/trigger.py:915-935 — 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· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (4 members, 50+ identical tokens) raspiCamSrv/camera_pi.py:7385— raspiCamSrv/camera_pi.py:7385-7425 | raspiCamSrv/camera_pi.py:7536-7591 | raspiCamSrv/camera_pi.py:7698-7742 | raspiCamSrv/camera_pi.py:7859-7911 — 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 (95 lines × 3) raspiCamSrv/config.py:892— raspiCamSrv/config.py:892-986 | raspiCamSrv/config.py:1213-1307 | raspiCamSrv/config.py:1740-1834 — 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 (43 lines × 2) REDACTED:234— REDACTED:234-276 | REDACTED:293-335 — 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 (39 lines × 2) raspiCamSrv/photoseries.py:152— raspiCamSrv/photoseries.py:152-190 | raspiCamSrv/photoseries.py:309-347 — 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 (33–34 lines × 5) REDACTED:2013— REDACTED:2013-2045 | REDACTED:2086-2118 | REDACTED:2159-2192 | REDACTED:2262-2294 | REDACTED:2335-2367 — all 5 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 (28 lines × 2) REDACTED:7610— REDACTED:7610-7637 | REDACTED:7858-7885 — 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, `REDACTED:7639` calls `TriggerConfig`, `ServerConfig` and `REDACTED:7888` 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 (27–28 lines × 2) raspiCamSrv/photoseries.py:207— raspiCamSrv/photoseries.py:207-234 | raspiCamSrv/photoseries.py:363-389 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `raspiCamSrv/photoseries.py:361` calls `debug` and `raspiCamSrv/photoseries.py:205` 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 (27 lines × 3) raspiCamSrv/config.py:1450— raspiCamSrv/config.py:1450-1476 | raspiCamSrv/config.py:1679-1705 | raspiCamSrv/config.py:1970-1996 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/config.py:1450` 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 (27 lines × 2) raspiCamSrv/motionDetector.py:237— raspiCamSrv/motionDetector.py:237-263 | raspiCamSrv/motionDetector.py:268-294 — 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) raspiCamSrv/api.py:135— raspiCamSrv/api.py:135-160 | raspiCamSrv/api.py:222-247 — 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 (24 lines × 3) REDACTED:1122— REDACTED:1122-1145 | REDACTED:1227-1250 | REDACTED:1331-1354 — 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 (21–24 lines × 2) REDACTED:182— REDACTED:182-202 | REDACTED:206-229 — 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 (19–24 lines × 2) raspiCamSrv/motionDetector.py:758— raspiCamSrv/motionDetector.py:758-776 | raspiCamSrv/triggerHandler.py:50-73 — 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 (23 lines × 3) raspiCamSrv/motionAlgoIB.py:472— raspiCamSrv/motionAlgoIB.py:472-494 | raspiCamSrv/motionAlgoIB.py:665-687 | raspiCamSrv/motionAlgoIB.py:978-1000 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/motionAlgoIB.py:472` 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 (22–23 lines × 2) REDACTED:571— REDACTED:571-593 | REDACTED:655-676 — 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 (18–22 lines × 4) raspiCamSrv/camera_pi.py:1789— raspiCamSrv/camera_pi.py:1789-1810 | raspiCamSrv/camera_pi.py:1863-1884 | raspiCamSrv/camera_pi.py:2168-2185 | raspiCamSrv/camera_pi.py:2253-2274 — 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. 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 × 3) raspiCamSrv/camera_pi.py:1456— raspiCamSrv/camera_pi.py:1456-1477 | raspiCamSrv/motionDetector.py:43-64 | raspiCamSrv/stereoCam.py:39-60 — 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 (21–22 lines × 2) REDACTED:1192— REDACTED:1192-1212 | raspiCamSrv/webcam.py:575-596 — 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 `raspiCamSrv/webcam.py:575` 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 `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. 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 (21 lines × 4) REDACTED:2055— REDACTED:2055-2075 | REDACTED:2128-2148 | REDACTED:2304-2324 | REDACTED:2377-2397 — 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.
Duplicated block (19–21 lines × 3) raspiCamSrv/config.py:1318— raspiCamSrv/config.py:1318-1338 | raspiCamSrv/config.py:1549-1567 | raspiCamSrv/config.py:1838-1858 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/config.py:1318` 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 (17–20 lines × 2) raspiCamSrv/stereoCam.py:181— raspiCamSrv/stereoCam.py:181-197 | raspiCamSrv/stereoCam.py:224-243 — 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 (18–19 lines × 16) REDACTED:60— REDACTED:60-78 | REDACTED:228-246 | REDACTED:287-305 | REDACTED:412-430 | REDACTED:564-582 | REDACTED:648-666 | REDACTED:692-710 | REDACTED:840-858 | REDACTED:874-892 | REDACTED:1028-1046 | REDACTED:1090-1108 | REDACTED:2403-2421 | REDACTED:2433-2450 | REDACTED:2480-2497 | REDACTED:2507-2524 | REDACTED:2535-2552 — all 16 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 (18 lines × 8) raspiCamSrv/config.py:1084— raspiCamSrv/config.py:1084-1101 | raspiCamSrv/config.py:1161-1178 | raspiCamSrv/config.py:1327-1344 | raspiCamSrv/config.py:1385-1402 | raspiCamSrv/config.py:1556-1573 | raspiCamSrv/config.py:1614-1631 | raspiCamSrv/config.py:1847-1864 | raspiCamSrv/config.py:1905-1922 — all 8 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 `raspiCamSrv/config.py:1084` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `raspiCamSrv/config.py:1083` calls `Camera`, `restartLiveStream` and `raspiCamSrv/config.py:1384` 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 (18 lines × 5) REDACTED:2046— REDACTED:2046-2063 | REDACTED:2119-2136 | REDACTED:2215-2232 | REDACTED:2295-2312 | REDACTED:2368-2385 — all 5 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 (18 lines × 3) raspiCamSrv/triggerHandler.py:1770— raspiCamSrv/triggerHandler.py:1770-1787 | raspiCamSrv/triggerHandler.py:1801-1818 | raspiCamSrv/triggerHandler.py:1832-1849 — 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 (17 lines × 19) raspiCamSrv/config.py:403— raspiCamSrv/config.py:403-419 | raspiCamSrv/config.py:711-727 | raspiCamSrv/config.py:765-781 | raspiCamSrv/config.py:1029-1045 | raspiCamSrv/config.py:1088-1104 | raspiCamSrv/config.py:1165-1181 | raspiCamSrv/config.py:1331-1347 | raspiCamSrv/config.py:1389-1405 | raspiCamSrv/config.py:1463-1479 | raspiCamSrv/config.py:1560-1576 | raspiCamSrv/config.py:1618-1634 | raspiCamSrv/config.py:1692-1708 | raspiCamSrv/config.py:1851-1867 | raspiCamSrv/config.py:1909-1925 | raspiCamSrv/config.py:1983-1999 | raspiCamSrv/config.py:2081-2097 | raspiCamSrv/config.py:2178-2194 | raspiCamSrv/config.py:2262-2278 | raspiCamSrv/config.py:2337-2353 — all 19 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `raspiCamSrv/config.py:401` calls `Camera`, `restartLiveStream` and `raspiCamSrv/config.py:1027` 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 (17 lines × 18) REDACTED:1002— REDACTED:1002-1018 | REDACTED:1116-1132 | REDACTED:1176-1192 | REDACTED:1221-1237 | REDACTED:1280-1296 | REDACTED:1325-1341 | REDACTED:1384-1400 | REDACTED:1437-1453 | REDACTED:1496-1512 | REDACTED:1565-1581 | REDACTED:1723-1739 | REDACTED:1843-1859 | REDACTED:1958-1974 | REDACTED:2009-2025 | REDACTED:2082-2098 | REDACTED:2155-2171 | REDACTED:2258-2274 | REDACTED:2331-2347 — all 18 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 (17 lines × 4) raspiCamSrv/config.py:66— raspiCamSrv/config.py:66-82 | raspiCamSrv/config.py:524-540 | raspiCamSrv/config.py:613-629 | raspiCamSrv/config.py:843-859 — 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 (15–17 lines × 3) raspiCamSrv/camera_pi.py:491— raspiCamSrv/camera_pi.py:491-507 | raspiCamSrv/camera_pi.py:2188-2202 | raspiCamSrv/camera_pi.py:2281-2296 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `raspiCamSrv/camera_pi.py:491` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `raspiCamSrv/camera_pi.py:2185` calls `debug` and `raspiCamSrv/camera_pi.py:2281` 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 (16 lines × 21) raspiCamSrv/config.py:346— raspiCamSrv/config.py:346-361 | raspiCamSrv/config.py:429-444 | raspiCamSrv/config.py:550-565 | raspiCamSrv/config.py:639-654 | raspiCamSrv/config.py:737-752 | raspiCamSrv/config.py:791-806 | raspiCamSrv/config.py:869-884 | raspiCamSrv/config.py:1056-1071 | raspiCamSrv/config.py:1114-1129 | raspiCamSrv/config.py:1191-1206 | raspiCamSrv/config.py:1358-1373 | raspiCamSrv/config.py:1415-1430 | raspiCamSrv/config.py:1587-1602 | raspiCamSrv/config.py:1644-1659 | raspiCamSrv/config.py:1718-1733 | raspiCamSrv/config.py:1878-1893 | raspiCamSrv/config.py:1935-1950 | raspiCamSrv/config.py:2009-2024 | raspiCamSrv/config.py:2107-2122 | raspiCamSrv/config.py:2204-2219 | raspiCamSrv/config.py:2288-2303 — all 21 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–16 lines × 3) raspiCamSrv/photoseriesCfg.py:61— raspiCamSrv/photoseriesCfg.py:61-74 | raspiCamSrv/photoseriesCfg.py:896-909 | raspiCamSrv/photoseriesCfg.py:922-937 — 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–16 lines × 2) REDACTED:2827— REDACTED:2827-2842 | REDACTED:3497-3510 — 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, `REDACTED:2844` calls `setattr` and `REDACTED:3511` 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 (15–16 lines × 2) REDACTED:137— REDACTED:137-151 | raspiCamSrv/webcam.py:295-310 — 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 (15 lines × 17) REDACTED:39— REDACTED:39-53 | REDACTED:61-75 | REDACTED:229-243 | REDACTED:288-302 | REDACTED:413-427 | REDACTED:565-579 | REDACTED:649-663 | REDACTED:693-707 | REDACTED:841-855 | REDACTED:875-889 | REDACTED:1029-1043 | REDACTED:1091-1105 | REDACTED:2404-2418 | REDACTED:2434-2448 | REDACTED:2481-2495 | REDACTED:2508-2522 | REDACTED:2536-2550 — all 17 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 (15 lines × 4) raspiCamSrv/camera_pi.py:7411— raspiCamSrv/camera_pi.py:7411-7425 | raspiCamSrv/camera_pi.py:7569-7583 | raspiCamSrv/camera_pi.py:7728-7742 | raspiCamSrv/camera_pi.py:7888-7902 — 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.
Duplicated block (14–15 lines × 2) raspiCamSrv/camera_pi.py:7497— raspiCamSrv/camera_pi.py:7497-7511 | raspiCamSrv/camera_pi.py:7823-7836 — 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 × 18) raspiCamSrv/config.py:342— raspiCamSrv/config.py:342-355 | raspiCamSrv/config.py:425-438 | raspiCamSrv/config.py:546-559 | raspiCamSrv/config.py:635-648 | raspiCamSrv/config.py:733-746 | raspiCamSrv/config.py:787-800 | raspiCamSrv/config.py:865-878 | raspiCamSrv/config.py:1110-1123 | raspiCamSrv/config.py:1187-1200 | raspiCamSrv/config.py:1411-1424 | raspiCamSrv/config.py:1485-1498 | raspiCamSrv/config.py:1640-1653 | raspiCamSrv/config.py:1714-1727 | raspiCamSrv/config.py:1931-1944 | raspiCamSrv/config.py:2005-2018 | raspiCamSrv/config.py:2103-2116 | raspiCamSrv/config.py:2200-2213 | raspiCamSrv/config.py:2284-2297 — all 18 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 × 7) REDACTED:1390— REDACTED:1390-1403 | REDACTED:1412-1425 | REDACTED:1434-1447 | REDACTED:1479-1492 | REDACTED:1523-1536 | REDACTED:1545-1558 | REDACTED:1567-1580 — all 7 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 × 5) raspiCamSrv/webcam.py:1553— raspiCamSrv/webcam.py:1553-1566 | raspiCamSrv/webcam.py:1656-1669 | raspiCamSrv/webcam.py:1684-1697 | raspiCamSrv/webcam.py:1721-1734 | raspiCamSrv/webcam.py:1889-1902 — all 5 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 (13 lines × 9) REDACTED:350— REDACTED:350-362 | REDACTED:436-448 | REDACTED:481-493 | REDACTED:520-532 | REDACTED:565-577 | REDACTED:613-625 | REDACTED:652-664 | REDACTED:691-703 | REDACTED:1655-1667 — all 9 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:349` calls `debug` and `REDACTED:435` 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–13 lines × 2) raspiCamSrv/triggerHandler.py:371— raspiCamSrv/triggerHandler.py:371-383 | raspiCamSrv/triggerHandler.py:865-876 — 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. 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 (12 lines × 24) raspiCamSrv/webcam.py:89— raspiCamSrv/webcam.py:89-100 | raspiCamSrv/webcam.py:117-128 | raspiCamSrv/webcam.py:145-156 | raspiCamSrv/webcam.py:236-247 | raspiCamSrv/webcam.py:336-347 | raspiCamSrv/webcam.py:418-429 | raspiCamSrv/webcam.py:515-526 | raspiCamSrv/webcam.py:562-573 | raspiCamSrv/webcam.py:608-619 | raspiCamSrv/webcam.py:664-675 | raspiCamSrv/webcam.py:698-709 | raspiCamSrv/webcam.py:737-748 | raspiCamSrv/webcam.py:779-790 | raspiCamSrv/webcam.py:828-839 | raspiCamSrv/webcam.py:861-872 | raspiCamSrv/webcam.py:909-920 | raspiCamSrv/webcam.py:968-979 | raspiCamSrv/webcam.py:1036-1047 | raspiCamSrv/webcam.py:1084-1095 | raspiCamSrv/webcam.py:1122-1133 | raspiCamSrv/webcam.py:1197-1208 | raspiCamSrv/webcam.py:1232-1243 | raspiCamSrv/webcam.py:1929-1940 | raspiCamSrv/webcam.py:1968-1979 — all 24 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 (12 lines × 4) raspiCamSrv/webcam.py:83— raspiCamSrv/webcam.py:83-94 | raspiCamSrv/webcam.py:111-122 | raspiCamSrv/webcam.py:139-150 | raspiCamSrv/webcam.py:184-195 — 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.
Duplicated block (12 lines × 3) raspiCamSrv/motionAlgoIB.py:542— raspiCamSrv/motionAlgoIB.py:542-553 | raspiCamSrv/motionAlgoIB.py:740-751 | raspiCamSrv/motionAlgoIB.py:1047-1058 — 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–12 lines × 3) raspiCamSrv/camera_pi.py:3597— raspiCamSrv/camera_pi.py:3597-3608 | raspiCamSrv/camera_pi.py:3611-3622 | raspiCamSrv/camera_pi.py:3623-3631 — 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. 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 (11 lines × 25) raspiCamSrv/webcam.py:86— raspiCamSrv/webcam.py:86-96 | raspiCamSrv/webcam.py:114-124 | raspiCamSrv/webcam.py:142-152 | raspiCamSrv/webcam.py:187-197 | raspiCamSrv/webcam.py:233-243 | raspiCamSrv/webcam.py:333-343 | raspiCamSrv/webcam.py:415-425 | raspiCamSrv/webcam.py:512-522 | raspiCamSrv/webcam.py:559-569 | raspiCamSrv/webcam.py:605-615 | raspiCamSrv/webcam.py:661-671 | raspiCamSrv/webcam.py:695-705 | raspiCamSrv/webcam.py:734-744 | raspiCamSrv/webcam.py:776-786 | raspiCamSrv/webcam.py:825-835 | raspiCamSrv/webcam.py:858-868 | raspiCamSrv/webcam.py:906-916 | raspiCamSrv/webcam.py:965-975 | raspiCamSrv/webcam.py:1033-1043 | raspiCamSrv/webcam.py:1081-1091 | raspiCamSrv/webcam.py:1119-1129 | raspiCamSrv/webcam.py:1194-1204 | raspiCamSrv/webcam.py:1229-1239 | raspiCamSrv/webcam.py:1926-1936 | raspiCamSrv/webcam.py:1965-1975 — all 25 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 (11 lines × 23) raspiCamSrv/config.py:56— raspiCamSrv/config.py:56-66 | raspiCamSrv/config.py:201-211 | raspiCamSrv/config.py:353-363 | raspiCamSrv/config.py:436-446 | raspiCamSrv/config.py:557-567 | raspiCamSrv/config.py:646-656 | raspiCamSrv/config.py:744-754 | raspiCamSrv/config.py:798-808 | raspiCamSrv/config.py:876-886 | raspiCamSrv/config.py:1063-1073 | raspiCamSrv/config.py:1121-1131 | raspiCamSrv/config.py:1198-1208 | raspiCamSrv/config.py:1365-1375 | raspiCamSrv/config.py:1422-1432 | raspiCamSrv/config.py:1594-1604 | raspiCamSrv/config.py:1651-1661 | raspiCamSrv/config.py:1725-1735 | raspiCamSrv/config.py:1885-1895 | raspiCamSrv/config.py:1942-1952 | raspiCamSrv/config.py:2016-2026 | raspiCamSrv/config.py:2114-2124 | raspiCamSrv/config.py:2211-2221 | raspiCamSrv/config.py:2295-2305 — all 23 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 (11 lines × 16) raspiCamSrv/photoseries.py:48— raspiCamSrv/photoseries.py:48-58 | raspiCamSrv/photoseries.py:125-135 | raspiCamSrv/photoseries.py:150-160 | raspiCamSrv/photoseries.py:239-249 | raspiCamSrv/photoseries.py:272-282 | raspiCamSrv/photoseries.py:307-317 | raspiCamSrv/photoseries.py:394-404 | raspiCamSrv/photoseries.py:417-427 | raspiCamSrv/photoseries.py:461-471 | raspiCamSrv/photoseries.py:553-563 | raspiCamSrv/photoseries.py:581-591 | raspiCamSrv/photoseries.py:614-624 | raspiCamSrv/photoseries.py:632-642 | raspiCamSrv/photoseries.py:763-773 | raspiCamSrv/photoseries.py:1031-1041 | raspiCamSrv/photoseries.py:1131-1141 — all 16 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `raspiCamSrv/photoseries.py:428` calls `debug` and `raspiCamSrv/photoseries.py:405` 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 (11 lines × 11) raspiCamSrv/trigger.py:73— raspiCamSrv/trigger.py:73-83 | raspiCamSrv/trigger.py:215-225 | raspiCamSrv/trigger.py:265-275 | raspiCamSrv/trigger.py:493-503 | raspiCamSrv/trigger.py:541-551 | raspiCamSrv/trigger.py:738-748 | raspiCamSrv/trigger.py:758-768 | raspiCamSrv/trigger.py:940-950 | raspiCamSrv/trigger.py:1083-1093 | raspiCamSrv/trigger.py:1263-1273 | raspiCamSrv/trigger.py:1463-1473 — all 11 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 (11 lines × 8) REDACTED:264— REDACTED:264-274 | REDACTED:401-411 | REDACTED:455-465 | REDACTED:500-510 | REDACTED:539-549 | REDACTED:584-594 | REDACTED:632-642 | REDACTED:671-681 — all 8 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–11 lines × 2) raspiCamSrv/camera_pi.py:5483— raspiCamSrv/camera_pi.py:5483-5493 | raspiCamSrv/camera_pi.py:6042-6050 — 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 (10–11 lines × 2) raspiCamSrv/camera_pi.py:6306— raspiCamSrv/camera_pi.py:6306-6315 | raspiCamSrv/camera_pi.py:6431-6441 — 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 `raspiCamSrv/camera_pi.py:6306` 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 × 29) raspiCamSrv/webcam.py:93— raspiCamSrv/webcam.py:93-102 | raspiCamSrv/webcam.py:121-130 | raspiCamSrv/webcam.py:149-158 | raspiCamSrv/webcam.py:240-249 | raspiCamSrv/webcam.py:340-349 | raspiCamSrv/webcam.py:422-431 | raspiCamSrv/webcam.py:519-528 | raspiCamSrv/webcam.py:566-575 | raspiCamSrv/webcam.py:612-621 | raspiCamSrv/webcam.py:668-677 | raspiCamSrv/webcam.py:702-711 | raspiCamSrv/webcam.py:741-750 | raspiCamSrv/webcam.py:783-792 | raspiCamSrv/webcam.py:832-841 | raspiCamSrv/webcam.py:865-874 | raspiCamSrv/webcam.py:913-922 | raspiCamSrv/webcam.py:972-981 | raspiCamSrv/webcam.py:1040-1049 | raspiCamSrv/webcam.py:1088-1097 | raspiCamSrv/webcam.py:1126-1135 | raspiCamSrv/webcam.py:1201-1210 | raspiCamSrv/webcam.py:1236-1245 | raspiCamSrv/webcam.py:1559-1568 | raspiCamSrv/webcam.py:1662-1671 | raspiCamSrv/webcam.py:1690-1699 | raspiCamSrv/webcam.py:1727-1736 | raspiCamSrv/webcam.py:1895-1904 | raspiCamSrv/webcam.py:1933-1942 | raspiCamSrv/webcam.py:1972-1981 — all 29 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `raspiCamSrv/webcam.py:91` calls `getStereoCameras`, `doInitCalibration` and `raspiCamSrv/webcam.py:1558` 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 (10 lines × 12) raspiCamSrv/config.py:881— raspiCamSrv/config.py:881-890 | raspiCamSrv/config.py:1068-1077 | raspiCamSrv/config.py:1126-1135 | raspiCamSrv/config.py:1203-1212 | raspiCamSrv/config.py:1370-1379 | raspiCamSrv/config.py:1427-1436 | raspiCamSrv/config.py:1501-1510 | raspiCamSrv/config.py:1599-1608 | raspiCamSrv/config.py:1656-1665 | raspiCamSrv/config.py:1730-1739 | raspiCamSrv/config.py:1890-1899 | raspiCamSrv/config.py:1947-1956 — all 12 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 (10 lines × 6) raspiCamSrv/trigger.py:598— raspiCamSrv/trigger.py:598-607 | raspiCamSrv/trigger.py:677-686 | raspiCamSrv/trigger.py:807-816 | raspiCamSrv/trigger.py:869-878 | raspiCamSrv/trigger.py:890-899 | raspiCamSrv/trigger.py:915-924 — all 6 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `raspiCamSrv/trigger.py:609` calls `evStartMidnight` and `raspiCamSrv/trigger.py:688` 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 (8–10 lines × 2) raspiCamSrv/camera_pi.py:5440— raspiCamSrv/camera_pi.py:5440-5447 | raspiCamSrv/camera_pi.py:5990-5999 — 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 × 8) raspiCamSrv/trigger.py:566— raspiCamSrv/trigger.py:566-574 | raspiCamSrv/trigger.py:582-590 | raspiCamSrv/trigger.py:615-623 | raspiCamSrv/trigger.py:631-639 | raspiCamSrv/trigger.py:647-655 | raspiCamSrv/trigger.py:662-670 | raspiCamSrv/trigger.py:693-701 | raspiCamSrv/trigger.py:708-716 — all 8 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `raspiCamSrv/trigger.py:576` calls `evStartMidnight` and `raspiCamSrv/trigger.py:657` 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 (9 lines × 6) raspiCamSrv/webcam.py:41— raspiCamSrv/webcam.py:41-49 | raspiCamSrv/webcam.py:1554-1562 | raspiCamSrv/webcam.py:1657-1665 | raspiCamSrv/webcam.py:1685-1693 | raspiCamSrv/webcam.py:1722-1730 | raspiCamSrv/webcam.py:1890-1898 — all 6 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 (8 lines × 23) raspiCamSrv/config.py:205— raspiCamSrv/config.py:205-212 | raspiCamSrv/config.py:357-364 | raspiCamSrv/config.py:440-447 | raspiCamSrv/config.py:561-568 | raspiCamSrv/config.py:650-657 | raspiCamSrv/config.py:748-755 | raspiCamSrv/config.py:802-809 | raspiCamSrv/config.py:880-887 | raspiCamSrv/config.py:1067-1074 | raspiCamSrv/config.py:1125-1132 | raspiCamSrv/config.py:1202-1209 | raspiCamSrv/config.py:1369-1376 | raspiCamSrv/config.py:1426-1433 | raspiCamSrv/config.py:1500-1507 | raspiCamSrv/config.py:1598-1605 | raspiCamSrv/config.py:1655-1662 | raspiCamSrv/config.py:1729-1736 | raspiCamSrv/config.py:1889-1896 | raspiCamSrv/config.py:1946-1953 | raspiCamSrv/config.py:2020-2027 | raspiCamSrv/config.py:2118-2125 | raspiCamSrv/config.py:2215-2222 | raspiCamSrv/config.py:2299-2306 — all 23 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 (8 lines × 3) raspiCamSrv/motionAlgoIB.py:586— raspiCamSrv/motionAlgoIB.py:586-593 | raspiCamSrv/motionAlgoIB.py:801-808 | raspiCamSrv/motionAlgoIB.py:1109-1116 — 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 (7 lines × 5) REDACTED:8301— REDACTED:8301-8307 | REDACTED:8341-8347 | REDACTED:8353-8359 | REDACTED:8365-8371 | REDACTED:8377-8383 — all 5 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:8299` calls `debug` and `REDACTED:8340` 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 (7 lines × 3) raspiCamSrv/camera_pi.py:3013— raspiCamSrv/camera_pi.py:3013-3019 | raspiCamSrv/camera_pi.py:3515-3521 | raspiCamSrv/camera_pi.py:3537-3543 — 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 (6 lines × 9) REDACTED:298— REDACTED:298-303 | REDACTED:358-363 | REDACTED:444-449 | REDACTED:489-494 | REDACTED:528-533 | REDACTED:573-578 | REDACTED:621-626 | REDACTED:660-665 | REDACTED:699-704 — all 9 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.
Duplicated block (4–6 lines × 3) raspiCamSrv/camera_pi.py:3416— raspiCamSrv/camera_pi.py:3416-3419 | raspiCamSrv/webcam.py:161-166 | raspiCamSrv/webcam.py:207-212 — there are 3 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 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (13 lines × 3) raspiCamSrv/camera_pi.py:1441— raspiCamSrv/camera_pi.py:1441-1453 | raspiCamSrv/motionDetector.py:28-40 | raspiCamSrv/stereoCam.py:24-36 — 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. 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 (11 lines × 4) REDACTED:1362— REDACTED:1362-1372 | raspiCamSrv/images.py:416-426 | raspiCamSrv/photoseries.py:1202-1212 | raspiCamSrv/trigger.py:1520-1530 — 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 4 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.
Outbound HTTP without resilience REDACTED:6019— `requests.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×1
Recursive walk over a caller-supplied document has no depth cap raspiCamSrv/trigger.py:1200— `castType` is public and takes `tpl: object` from its caller, and it calls itself at line 1200 (`castType`) with a piece of `tpl` — and nowhere in `castType` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `castType` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Interpolated log message defeats structured logging raspiCamSrv/sun.py:73— `debug` at line 73 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging raspiCamSrv/sun.py:74— `debug` at line 74 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging raspiCamSrv/sun.py:75— `debug` at line 75 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging raspiCamSrv/sun.py:78— `debug` at line 78 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging raspiCamSrv/sun.py:83— `debug` at line 83 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging raspiCamSrv/sun.py:93— `debug` at line 93 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging raspiCamSrv/sun.py:108— `debug` at line 108 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging raspiCamSrv/sun.py:113— `debug` at line 113 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging raspiCamSrv/sun.py:119— `debug` at line 119 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging raspiCamSrv/sun.py:134— `debug` at line 134 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging raspiCamSrv/sun.py:139— `debug` at line 139 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging raspiCamSrv/sun.py:140— `debug` at line 140 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging raspiCamSrv/sun.py:141— `debug` at line 141 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging REDACTED:6032— `error` at line 6032 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
Interpolated log message defeats structured logging REDACTED:6564— `error` at line 6564 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
Duplicated predicate raspiCamSrv/motionDetector.py:770— `dm >= tc.operationStartMinute and dm <= tc.operationEndMinute` appears character-identically in 2 files — raspiCamSrv/motionDetector.py, raspiCamSrv/triggerHandler.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 raspiCamSrv/__init__.py:191— `sr.isExposureSeries == False and sr.isFocusStackingSeries == False` appears character-identically in 2 files — raspiCamSrv/__init__.py, raspiCamSrv/photoseries.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 raspiCamSrv/api.py:256— `tc.triggeredByMotion or tc.triggeredByEvents` appears character-identically in 2 files — raspiCamSrv/api.py, raspiCamSrv/trigger.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.
C2 · Access Controls· No named authorization policies · ×1
No named authorization policies — Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
C4 · Data Retention· Partial data-retention evidence · ×1
Partial data-retention evidence — A retention mechanism is present, but the data-lifecycle is not yet complete — missing: an expiry limit — a declared maximum age / TTL after which the data is no longer kept, a scheduled purge / cleanup job (a Celery beat task, APScheduler job or management command that deletes rows past their retention — Session.objects.filter(created__lt=cutoff).delete(), purge_expired… / delete_old…).
No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 1 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (34852 LoC, 69 module-visible types across 11 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
No tests found — No test suite could be collected — no discoverable tests to count. If this repository does test, wiring the suite to a framework a runner can collect (pytest or unittest) is what makes it countable here; a pipeline step that invokes a runner is not evidence on its own, because a runner over an empty suite passes. Tests written as plain executables or shell/PowerShell harnesses are not collectible this way and are not scored here.
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.
No src/ separation — Production code isn't grouped under a src/ folder — it all sits under raspiCamSrv/ alongside the root build files, so the conventional src/ boundary between the product and its tooling isn't drawn.
README/code drift docs/Troubelshooting.md:143— docs/Troubelshooting.md names `__init___.py`, but no file or folder `__init___.py` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
No SAST — No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 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.
P4 · Deployment & Rollback· No rollback/health safety · ×1
No rollback/health safety — Deployment is orchestrated by compose, but no service declares a `healthcheck:` and nothing pins a previous image to fall back to — the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse.
Silent fallback default in catch REDACTED:6236— `libcameraInfo` swallows every exception into `return 'Unknown'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Dependency hygiene PARTLY measured — Python dependencies read, no exact pin to grade for currency — This repository's Python dependencies were read: 11 shipped distribution(s) across 1 manifest(s) (0 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, uv.lock, 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.
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.
provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
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 01a1656e-7cdf-7afe-b52f-0e911b76b459 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 31 · Warnings: 639 · Recommendations: 30 · Info: 1 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 22-10-2026 @ 21:05 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.