Public report of SnailyCAD/snaily-cadv4, published 17 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 17 November 2026, 17:56 UTC · Survey ID cd_19690e12abc14b4784b14f3883be7aef

SnailyCAD/snaily-cadv4

Measured 17 November 2026, 17:55 UTC, at code version f6b01f1

Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureNoCollector).

Supply-chain provenance & signing is not measured: Supply-chain provenance is not scored (this pipeline releases no artifact), but its build steps or GitHub Actions workflows have integrity defects, or nothing watches its dependency set for published advisories.

CAI score 36.0out of 100 At risk

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: 85,149 lines of product code in 10 projects, tests not counted · Estimated rebuild effort: about 0.5 person-years · Weakest lens: Production Readiness, 28.2

Findings by how serious they are

138 critical 851 serious 781 minor

8 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 17:55 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

74of 74 dimensions measured by tools.
1620of 1770 findings point to an exact file and line, so you can open each one in the code. The other 150 concern the repository as a whole, such as missing documentation.
74dimensions across 7 lenses, read from 85,149 lines of product code in 10 projects.
Chapters

Executive summary

SnailyCAD/snaily-cadv4 is rated At risk because critical security findings are open, most of them in the packages it uses. Its score is held back in part because it has packages under a licence on your banned list. It scores 36.0 out of 100, which the At risk rating leaves unchanged.

Production Readiness, at 28.2, is the weakest lens and counts most in the score. The best first step for the work it takes is fixing the password or key in the code, worth about 6.6 points. Replacing the 11 packages under a banned licence would lift Production Readiness itself, worth about 7.1 points. Raising Production Readiness to 70 would lift the score to about 43.0.

Eighty-three known security holes in the packages the code depends on can be used by attackers. Eleven packages carry licence risk, and nine pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Updating the vulnerable packages, replacing or clearing the banned-licence packages and pinning each tool to an exact version would close these risks. Setting a waiting period for automatic updates would fix the three automatic dependency updates that take new releases at once, and fixing the weaknesses the scanner points to would deal with the three security weaknesses in the code. The 11 loops of files that import each other need breaking.

The product code is 85,149 lines, about €74,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 for The 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.
Production Readiness 28.2 · counts for 46%Code Health 33.7 · counts for 25%Accessibility 48.2 · counts for 14%Security and Compliance 50.6 · counts for 8%Maturity 51.2 · counts for 4%Architecture 55.1 · counts for 2%Performance 60.0 · counts for 1%

If Production Readiness rose from 28.2 to 70, the lowest score rated Strong, the score would rise from 36.0 to about 43.0.

Code composition: what the lines of code are
Product code 98%Tests 2%
Rebuild cost: about €74,000 · Estimate
Cost to rebuild€24,000 to €120,000, for 408 to 1,294 hours of work, about 0.5 person-years for one engineer
Difficulty of the problemStandard, 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 36. 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.
SizeMedium: 85,149 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
Raises the score by about 6.6 points · Low effort · REDACTED Scanning
2
Resolve the 8 Outdated (npm) finding(s) in Dependency Hygiene — start with REDACTED (8).
Raises the score by about 4.7 points · Low effort · Dependency Hygiene
3
Resolve the 11 Banned license finding(s) in License Compliance — start with REDACTED (11).
Raises the score by about 7.1 points · Medium effort · License Compliance

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 €74,000 to build again, about 0.5 person-years of work. Its weakest lens is Production Readiness, at 28.2 (Weak). 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.
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 4.0 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 10% to 23% on every change. The history of the code shows how much it changes: about 143 lines over the last 90 days, which is about 580 lines a year. At that pace, the extra work comes to an estimated 0.1 to 0.9 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · 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.
If you do one thing first · First action
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 6.6 points for low effort, because it clears the 1 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch @snailycad/api api @snailycad/audit-logger audit-logger @snailycad/api->@snailycad/audit-logger @snailycad/config config @snailycad/api->@snailycad/config @snailycad/permissions permissions @snailycad/api->@snailycad/permissions @snailycad/schemas schemas @snailycad/api->@snailycad/schemas @snailycad/types types @snailycad/api->@snailycad/types @snailycad/utils utils @snailycad/api->@snailycad/utils @snailycad/audit-logger->@snailycad/types @snailycad/client client @snailycad/client->@snailycad/audit-logger @snailycad/client->@snailycad/config @snailycad/client->@snailycad/permissions @snailycad/client->@snailycad/schemas @snailycad/client->@snailycad/types @snailycad/ui ui @snailycad/client->@snailycad/ui @snailycad/client->@snailycad/utils @snailycad/schemas->@snailycad/types @snailycad/types->@snailycad/permissions @snailycad/ui->@snailycad/config @snailycad/ui->@snailycad/types @snailycad/ui->@snailycad/utils @snailycad/utils->@snailycad/types

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.

713 modules, with 456 dependencies between them. Every module uses only modules listed above it, so there are no loops.

The table shows the 40 modules with the most connections; 673 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 apps.api.src.lib.auth.2fa2 apps.api.src.services.socket-service3 apps.client.src.components.form.SettingsFormField4 apps.client.src.components.shared.nav.Nav5 apps.client.src.hooks.useGenerateCallsign6 apps.client.src.state.dispatch.dispatch-state7 apps.client.src.types.map8 packages.types.src9 packages.types.src.api10 packages.types.src.api.admin11 packages.types.src.api.dispatch12 packages.types.src.api.leo13 packages.types.src.api.search14 apps.api.src.controllers.admin.manage.units.manage-units-controller15 apps.api.src.controllers.ems-fd.incidents.ems-fd-incidents-controller16 apps.api.src.lib.auth17 apps.api.src.lib.dispatch18 apps.api.src.lib.dispatch.911-calls19 apps.api.src.lib.leo20 apps.api.src.lib.leo.records21 apps.api.src.middlewares.auth.utils22 apps.api.src.utils23 apps.client.src.components.admin.values24 apps.client.src.components.bleeter.modals25 apps.client.src.components.dispatch.active-calls.modals26 apps.client.src.components.dispatch.map.calls.call-item27 apps.client.src.components.editor.toolbar28 apps.client.src.components.leo.incidents29 apps.client.src.components.shared.table30 apps.client.src.context.AuthContext31 apps.client.src.hooks32 apps.client.src.lib33 apps.client.src.pages34 apps.client.src.pages.dispatch35 apps.client.src.pages.officer36 packages.ui.src.components.fields37 packages.utils.src38 apps.api.src.controllers.dispatch.dispatch-controller39 apps.api.src.controllers.leo.incidents.IncidentController40 apps.api.src.middlewares.is-enabled
1 apps.api.src.lib.auth.2fa
2 apps.api.src.services.socket-service
3 apps.client.src.components.form.SettingsFormField
4 apps.client.src.components.shared.nav.Nav
5 apps.client.src.hooks.useGenerateCallsign
6 apps.client.src.state.dispatch.dispatch-state
7 apps.client.src.types.map
8 packages.types.src
9 packages.types.src.api
10 packages.types.src.api.admin
11 packages.types.src.api.dispatch
12 packages.types.src.api.leo
13 packages.types.src.api.search
14 apps.api.src.controllers.admin.manage.units.manage-units-controller115
15 apps.api.src.controllers.ems-fd.incidents.ems-fd-incidents-controller11
16 apps.api.src.lib.auth2
17 apps.api.src.lib.dispatch11
18 apps.api.src.lib.dispatch.911-calls3
19 apps.api.src.lib.leo31
20 apps.api.src.lib.leo.records3
21 apps.api.src.middlewares.auth.utils1
22 apps.api.src.utils1
23 apps.client.src.components.admin.values1
24 apps.client.src.components.bleeter.modals1
25 apps.client.src.components.dispatch.active-calls.modals5
26 apps.client.src.components.dispatch.map.calls.call-item1
27 apps.client.src.components.editor.toolbar2
28 apps.client.src.components.leo.incidents2
29 apps.client.src.components.shared.table4
30 apps.client.src.context.AuthContext1
31 apps.client.src.hooks11
32 apps.client.src.lib3
33 apps.client.src.pages41
34 apps.client.src.pages.dispatch111
35 apps.client.src.pages.officer9111
36 packages.ui.src.components.fields3
37 packages.utils.src11
38 apps.api.src.controllers.dispatch.dispatch-controller141
39 apps.api.src.controllers.leo.incidents.IncidentController111
40 apps.api.src.middlewares.is-enabled1
Uses a module listed above itPart of a loopThe module itself
1 apps.api.src.lib.auth.2fa2 apps.api.src.services.socket-service3 apps.client.src.components.form.SettingsFormField4 apps.client.src.components.shared.nav.Nav5 apps.client.src.hooks.useGenerateCallsign6 apps.client.src.state.dispatch.dispatch-state7 apps.client.src.types.map8 packages.types.src9 packages.types.src.api10 packages.types.src.api.admin11 packages.types.src.api.dispatch12 packages.types.src.api.leo13 packages.types.src.api.search14 apps.api.src.controllers.admin.manage.units.manage-units-controller15 apps.api.src.controllers.ems-fd.incidents.ems-fd-incidents-controller16 apps.api.src.lib.auth17 apps.api.src.lib.dispatch18 apps.api.src.lib.dispatch.911-calls19 apps.api.src.lib.leo20 apps.api.src.lib.leo.records21 apps.api.src.middlewares.auth.utils22 apps.api.src.utils23 apps.client.src.components.admin.values24 apps.client.src.components.bleeter.modals25 apps.client.src.components.dispatch.active-calls.modals26 apps.client.src.components.dispatch.map.calls.call-item27 apps.client.src.components.editor.toolbar28 apps.client.src.components.leo.incidents29 apps.client.src.components.shared.table30 apps.client.src.context.AuthContext31 apps.client.src.hooks32 apps.client.src.lib33 apps.client.src.pages34 apps.client.src.pages.dispatch35 apps.client.src.pages.officer36 packages.ui.src.components.fields37 packages.utils.src38 apps.api.src.controllers.dispatch.dispatch-controller39 apps.api.src.controllers.leo.incidents.IncidentController40 apps.api.src.middlewares.is-enabledapps.api.src.lib.auth.2fa1apps.api.src.services.socket-service2apps.client.src.components.form.SettingsFormField3apps.client.src.components.shared.nav.Nav4apps.client.src.hooks.useGenerateCallsign5apps.client.src.state.dispatch.dispatch-state6apps.client.src.types.map7packages.types.src8packages.types.src.api9packages.types.src.api.admin10packages.types.src.api.dispatch11packages.types.src.api.leo12packages.types.src.api.search13apps.api.src.controllers.admin.manage.units.manage-units-controller14apps.api.src.controllers.ems-fd.incidents.ems-fd-incidents-controller15apps.api.src.lib.auth16apps.api.src.lib.dispatch17apps.api.src.lib.dispatch.911-calls18apps.api.src.lib.leo19apps.api.src.lib.leo.records20apps.api.src.middlewares.auth.utils21apps.api.src.utils22apps.client.src.components.admin.values23apps.client.src.components.bleeter.modals24apps.client.src.components.dispatch.active-calls.modals25apps.client.src.components.dispatch.map.calls.call-item26apps.client.src.components.editor.toolbar27apps.client.src.components.leo.incidents28apps.client.src.components.shared.table29apps.client.src.context.AuthContext30apps.client.src.hooks31apps.client.src.lib32apps.client.src.pages33apps.client.src.pages.dispatch34apps.client.src.pages.officer35packages.ui.src.components.fields36packages.utils.src37apps.api.src.controllers.dispatch.dispatch-controller38apps.api.src.controllers.leo.incidents.IncidentController39apps.api.src.middlewares.is-enabled4011511211331311115122411134111191113111411111+673 more modules (most-connected shown)

At a glance — Code Health · 33.7 · Weak · gated by D2, D3, R10, R7 ·

At a glance — Architecture · 55.1 · Adequate · gated by R9 ·

At a glance — Maturity · 51.2 · Adequate · gated by D34, M2 ·

At a glance — Readiness · 28.2 · Weak · gated by D14, R4, R8, P3 ·

At a glance — Security · 50.6 · Adequate · gated by D29, C1 ·

At a glance — Accessibility · 48.2 · Weak · gated by AC4 ·

At a glance — Performance · 60.0 · Adequate ·

Security & Compliance — OWASP Top-10 mapping

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 categoryFindingsSeverity
A05:2025 — Injection192High / Critical
A03:2025 — Software Supply Chain Failures142High / Critical
A07:2025 — Authentication Failures4High / Critical
A02:2025 — Security Misconfiguration4High / Critical

Roadmap

Top priorities: Resolve the 11 Banned license finding(s) in License Compliance — start with REDACTED (11); Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED; Resolve the 12 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (12).

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.+6.6 ptsLowREDACTED Scanning
Resolve the 8 Outdated (npm) finding(s) in Dependency Hygiene — start with REDACTED (8).+4.7 ptsLowDependency Hygiene
Resolve the 11 Banned license finding(s) in License Compliance — start with REDACTED (11).+7.1 ptsMediumLicense Compliance
Resolve the 12 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (12).+6.4 ptsMediumDependency Hygiene
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.+3.7 ptsMediumDependency Hygiene
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.+3.1 ptsMediumDead Code
Add tests that import the unreached modules (directly or through their public entry).+2.9 ptsMediumTest Coverage
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.+2.8 ptsMediumCode Duplication

File quality

Per-file score 0–10 — a quality signature. Of 250 files carrying findings, judged against the Production bar: 2% slop · 64% mixed · 34% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopLicense Compliance: Banned license: @img/sharp-libvips-darwin-arm64
REDACTED0.1SlopDependency Vulnerabilities: Critical vulnerability: REDACTED
REDACTED1.0SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.1MixedIaC & Container Security: High IaC: REDACTED
REDACTED4.1MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.3MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): Medium: REDACTED

How the grades work

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 — 138

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 — 851

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 — 781

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 8

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 74 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.

What we checked — 74 dimensions across the health lenses
D1D2D3D5D6D10D11D12D13D14D15D17D19D20D21D23D24D26D28D29D30D31D34D35D37D43D44AC1AC2AC3AC4AC5AC6AX10AX3AX4AX6C1C3C5GD1IC1M1M2M3M4P1P10P2P3P4P6P8PF3R1R10R2R3R4R6R7R8R9X1X12X16X2X21X24X25X29X3X30X5

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
  1. 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, 1620 of 1770 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.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. 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.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic

Every finding is locatable in findings.md. Run 01a1eaa6-997b-7147-a0e0-6235f8a66284.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

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.

  • 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 (29 contributor(s) across 3566 commit(s) sampled, automation and bot accounts excluded). One of them holds 86% of the history; the other 28 hold 0.5% 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.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: it declares a published package (REDACTED), but no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict. For npm the surface is what a published REDACTED's entry points (exports, main, module, types) export, followed through the source; an entry that names build output the tree does not commit (dist/, build/) is not followed back to source, because only a tsconfig outDir/rootDir pair states that mapping and a bundler's input lives in executable configuration this engine does not evaluate.
  • D23 Boundary Type-Coupling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind measured 0/40 valid on a seeded held-out sample of its rows on 98 C# repositories (docs/plans/deterministic-engine/adjudication/P5c-D23-units.md, "Version 1 ON MAIN"): the noise rows were dependencies on layer folders, shared cores and grouping folders read as contexts. By the pre-registered fallback (PREREGISTRATION v37) it publishes no row until version 4 passes its gate. The candidates are counted here, not reported as findings, and the score does not include them.
  • D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `REDACTED`, `REDACTED`, `REDACTED`, `REDACTED`, `apps/api/src/controllers/leo/create-where-obj.ts`, … (+32 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AX1 Captive dependencies — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository's container is Ts.ED DI, whose lifetimes are not modelled 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.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (REDACTED). compose up failed (exit 1 — a container did not start, exited, or never became healthy) — time="2026-11-17T17:56:20Z" level=warning msg="The \"POSTGRES_PASSWORD\" variable is not set. Defaulting to a blank string." time="2026-11-17T17:56:20Z" level=warning msg="The \"DB_PORT\" variable is not set. Defaulting to a blank string." container snaily-cad-postgres exited (1); runtime evidence skipped.
  • R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 462 further occurrence(s) are not listed individually; the score already reflects all 502.
  • R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 73 further occurrence(s) are not listed individually; the score already reflects all 113.
  • R4 Test Coverage — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 605 further occurrence(s) are not listed individually; the score already reflects all 645.
  • R7 Dead Code — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 122 further occurrence(s) are not listed individually; the score already reflects all 162.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 768 JavaScript/TypeScript file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled certificate validation, obsolete TLS versions, plaintext password storage and session cookies set without HttpOnly, Secure or SameSite, and none was found. The server controls this dimension also scores were not assessed, so no score is given.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 3 further occurrence(s) are not listed individually; the score already reflects all 43.
  • X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala, Rust, Go, Swift, Erlang, F# and Visual Basic source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP log through no library that carries a message's values as fields (pino, winston, bunyan, tslog, LogTape, roarr; Python's logging, structlog; PHP's PSR-3 loggers), so its log calls cannot be judged, 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: 14 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • 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.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED 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 publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D23 Boundary Type-Coupling: Boundary leakage is detected from type references across detected contexts — leaks that flow through primitives, serialization or shared infrastructure may not surface as a typed reference.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • 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.
  • 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.
  • C3 Audit Trail: This control is scored from in-repo evidence only — a working control configured outside the repository leaves no signal a static scan can credit.
  • C5 Data-Subject Rights: This control is scored from in-repo evidence only — absence of evidence here means the scan found no in-repo trace, not that the control does not exist.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • 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.

Dimensions

D1 · Cyclomatic Complexity4.8 / 10Weak✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 4.8 / 10 · rule-coverage 100% · ceiling Prevented

80 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ManageValueModal.createInitialValues at 68. A further 1 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being withShortcuts.withShortcuts at 23 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: apps/client/src/lib/editor/withShortcuts.ts (withShortcuts.withShortcuts at 23). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

zod-error-map.getErrorMap.errorMap (cyclomatic 46) · ×2apps/api/src/utils/zod-error-map.ts:17
ManageValueModal.createInitialValues (cyclomatic 68)apps/client/src/components/admin/values/ManageValueModal.tsx:92
ManageLicensesFormFields.ManageLicensesFormFields (cyclomatic 55)apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx:75
NameSearchModal.NameSearchModal (cyclomatic 54)apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx:66
StatusController.updateUnitStatus (cyclomatic 49)apps/api/src/controllers/dispatch/status-controller.ts:52

+ 74 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 1 body over 60 down to 60 or less in Cyclomatic Complexity — start with ManageValueModal.createInitialValues (cyclomatic 68). — Refactoring it lifts Cyclomatic Complexity from 4.8 to about 5.1/10.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity3.1 / 10Weak✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 3.1 / 10 · rule-coverage 100% · ceiling Prevented

96 method(s) exceeded the cognitive complexity threshold of 15; the worst was ManageLicensesFormFields.ManageLicensesFormFields at 106.

zod-error-map.getErrorMap.errorMap (cognitive 81) · ×2apps/api/src/utils/zod-error-map.ts:17
ManageLicensesFormFields.ManageLicensesFormFields (cognitive 106)apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx:75
NameSearchModal.NameSearchModal (cognitive 79)apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx:66
StatusController.updateUnitStatus (cognitive 64)apps/api/src/controllers/dispatch/status-controller.ts:52
ManageValueModal.createInitialValues (cognitive 63)apps/client/src/components/admin/values/ManageValueModal.tsx:92

+ 90 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 6 bodies over 60 down to 60 or less in Cognitive Complexity — start with ManageLicensesFormFields.ManageLicensesFormFields (cognitive 106), zod-error-map.getErrorMap.errorMap (cognitive 81), zod-error-map.getErrorMap.errorMap (cognitive 81). — 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 6 together lifts Cognitive Complexity from 3.1 to about 4.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes2.8 / 10Weak✓ 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.

Maturity: Documented → Verified → Prevented · effective 2.8 / 10 · rule-coverage 100% · ceiling Prevented

133 god class(es) detected.

FunctionTooLong: ManageLicensesFormFields.ManageLicensesFormFields · ×123apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx:75
ClassTooLong: AdminManageUnitsController · ×7REDACTED:66
FileTooLong: REDACTED · ×3REDACTED

What to do

  1. Resolve the 123 FunctionTooLong finding(s) in God Classes — start with index.tsx (4), zod-error-map.ts (4), [id].tsx (2). — One of this dimension's main actionable groups (123 warning-level).
  2. Resolve the 7 ClassTooLong finding(s) in God Classes — start with REDACTED, SearchActionsController.ts, REDACTED. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 3 FileTooLong finding(s) in God Classes — start with REDACTED, REDACTED, SearchActionsController.ts. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D5 · Coupling8.2 / 10Strong✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 8.2 / 10 · rule-coverage 100% · ceiling Prevented

9 production modules (npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 2 module(s) off the main sequence, with abstractness counted on 6 of the 9 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: @snailycad/permissions · ×2

What to do

  1. Resolve the 2 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (2 warning-level).

Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.

D6 · Cohesion (LCOM4)4.0 / 10Weak✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 4.0 / 10 · rule-coverage 100% · ceiling Verified

12 of 24 classes have LCOM4 above 3.

Low cohesion: EmsFdController (LCOM4 14) · ×12REDACTED:51

What to do

  1. Resolve the 12 Low cohesion finding(s) in Cohesion (LCOM4) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (12 warning-level).

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 143 tests.

✓ On the Gold path — maintain.

Detailed fixes: d10_recommendation.md.

D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the tests pass reliably, with no flakiness.

Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 flaky across 1 measured tier(s). JavaScript/TypeScript (vitest via `pnpm install --frozen-lockfile --ignore-scripts` in apps/api/ (18 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in apps/client/ (11 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/config/ (5 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/permissions/ (17 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/utils/ (18 tests)): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

D12 · Dependency Hygiene5.0 / 10Adequate✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

Maturity: Documented → Verified → Prevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Verified

144 outdated direct production npm dependency(ies) of 170 graded, 0 pinning defect(s), across 10 REDACTED (10 of them the product) and 1 committed lockfile(s). Development dependencies are deliberately not graded for currency: that grade is about what SHIPS. 8 direct dependency(ies) — production, development or optional — are marked DEPRECATED by their publisher (the registry's per-version mark, or the lockfile's copy of it when the registry could not be asked); deprecated transitive packages are listed but not charged. Whether any is UNMAINTAINED is not graded — the registry publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, and the frontend dependency lens (R8) answers it in this same run. Known CVEs in this dependency graph are D30's question, read from the manifest there.

Deprecated: glob · ×8REDACTED:78
Deprecated: @babel/plugin-proposal-class-properties · ×12REDACTED:1135
Outdated (npm): @sentry/browser · ×8REDACTED:31
Outdated (npm): @discordjs/rest · ×136

What to do

  1. Resolve the 12 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (12). — One of this dimension's main actionable groups (12 recommendation-level).
  2. Resolve the 8 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (8). — One of this dimension's main actionable groups (8 warning-level).
  3. Resolve the 8 Outdated (npm) finding(s) in Dependency Hygiene — start with REDACTED (8). — One of this dimension's main actionable groups (8 recommendation-level).

Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · REDACTED Scanning5.0 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Prevented

1 secret(s) detected.

REDACTED

What to do

  1. Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.

D14 · License Compliance0.0 / 10Critical✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Verified

11 of 1313 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 1313 package(s) this repository's committed lockfile installs for a consumer — its 170 production, optional and peer dependency(ies), across 10 product REDACTED manifest(s), and everything those install in turn. Its 79 `devDependencies` declaration(s), and every package only they reach, are excluded: a consumer installs none of them. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. 4 of them publish no licence this pass can read on registry.npmjs.org — an absent field, `UNLICENSED`, or a `SEE LICENSE IN <file>` pointer into a tarball this pass does not download; that is missing data, not a violation, and none of them is charged. Third-party code that ships WITHOUT a manifest entry was read too: 0 component(s) whose licence travels in the tree (vendored or copied-in directories, licence comments preserved in committed bundles, compiled wasm modules) and 0 bundled package(s) named only by a bundle's module path, graded on the registry; 0 use a banned licence. 5 vendored, copied-in or compiled component(s) state no licence this pass can read — missing data, not charged. This repository publishes itself under MIT, which is its own choice and is not judged here.

Banned license: @img/sharp-libvips-darwin-arm64 · ×11REDACTED:2424

What to do

  1. Resolve the 11 Banned license finding(s) in License Compliance — start with REDACTED (11). — One of this dimension's main actionable groups (11 issue-level).

Detailed fixes: d14_recommendation.md · top locations in Appendix A, every location in findings.md.

D15 · Churn × Complexity Hotspots10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No churn × complexity hotspots in the window.

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.md.

D17 · Explicit Debt10.0 / 10Stronggated by 12 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

12 deducted task-comment markers across 84781 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 · ×12packages/ui/src/components/dropdown.tsx:46

What to do

  1. Resolve the 12 TodoComment finding(s) in Explicit Debt — start with dropdown.tsx (2), api.ts, table-pagination.tsx. — One of this dimension's main actionable groups (12 warning-level).

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D19 · Documentation Quality5.7 / 10Adequate✓ Tool-verified

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 5.7 / 10 · rule-coverage 100% · ceiling Documented

1 of 2 documentation facets pass in full; short on: F2 example. 10 document(s) read across 10 unit(s).

Documentation: no build, run or usage example · ×6packages/audit-logger/README.md:1

What to do

  1. Resolve the 6 Documentation finding(s) in Documentation Quality — start with README.md (6). — One of this dimension's main actionable groups (6 recommendation-level).

Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs foundREDACTED:6

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D21 · Naming Consistency1.7 / 10Critical✓ Tool-verified

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.

Maturity: Documented → Verified → Prevented · effective 1.7 / 10 · rule-coverage 100% · ceiling Verified

2 naming inconsistencies among 24 declarations measured against a convention their peers follow.

`EmsFDDashboard` spells `FD` where 22 names in the project spell it `Fd`apps/client/src/pages/ems-fd/index.tsx:81
`suspendedEmsFDDeputies` spells `FD` where 22 names in the project spell it `Fd`packages/types/src/api/admin.ts:23

What to do

  1. Resolve the 1 `EmsFDDashboard` spells `FD` where 22 names in the project spell it `Fd` finding(s) in Naming Consistency — start with index.tsx. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 `suspendedEmsFDDeputies` spells `FD` where 22 names in the project spell… finding(s) in Naming Consistency — start with admin.ts. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.

D23 · Boundary Type-Coupling10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether domain types (IDs, enums, value objects) leak across bounded-context boundaries.

Method: Cross-context domain-type leakage via Roslyn structural classification (strongly-typed IDs / value objects) over every public surface. Exhaustive, deterministic, type-level aggregate-boundary check.

Coverage: Bounded contexts derived from NAMESPACE prefix (or graph-inferred where available); cross-boundary domain-type leakage then checked exhaustively over every public member of every type.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

51 domain type(s) cross context boundaries across 8 contexts; they are measured and withheld (not published, not scored). Contexts: api, audit-logger, client, config, permissions, types, ui, utils.

✓ On the Gold path — maintain.

Detailed fixes: d23_recommendation.md.

D24 · Comment Value8.9 8.5 / 10Strong✓ Tool-verified

What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).

Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 8.5 / 10 · rule-coverage 96% · ceiling Documented

1 of 88 judged comments only repeat the code they sit on (1.1 %). 6 comment(s) in another language or script were not judged.

redundant commentapps/client/src/components/dispatch/map/units/player-marker.tsx:37
doc comments repeat the names · ×4apps/client/src/components/shared/Title.tsx:11

What to do

  1. Resolve the 1 redundant comment finding(s) in Comment Value — start with player-marker.tsx. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.

D26 · Project Cohesion6.0 / 10Adequate✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic.

Maturity: Documented → Verified → Prevented · effective 6.0 / 10 · rule-coverage 100% · ceiling Documented

2 of 10 build units (npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion · ×2REDACTED:1

What to do

  1. Resolve the 2 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with REDACTED (2). — One of this dimension's main actionable groups (2 recommendation-level).

Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.

D28 · Secrets (history)8.0 / 10Adequategated by 2 critical findings✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: REDACTED 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.

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Documented

2 finding(s): 0 critical, 2 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.

D29 · Static Analysis (SAST)0.0 / 10Critical✓ Tool-verified

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).

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

192 finding(s): 0 critical, 16 high, 176 medium, 0 low. 9 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 37 file(s) — `REDACTED` (line 28), `REDACTED` (line 46), `REDACTED` (line 679), `REDACTED` (line 369, line 430), `apps/api/src/controllers/leo/create-where-obj.ts` (line 80), … (+32 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

+ 5 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. No action in Static Analysis (SAST) — all 9 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (9 issue-level, 0 of them charged here).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities0.0 / 10Critical✓ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

142 finding(s): 12 critical, 71 high, 40 medium, 19 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 2 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 70 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (65), REDACTED (5). — One of this dimension's main actionable groups (70 issue-level).
  2. Resolve the 10 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (10). — One of this dimension's main actionable groups (10 issue-level).
  3. Resolve the 2 Critical vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.

D31 · IaC & Container Security9.1 / 10Adequategated by 2 critical findings✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 9.1 / 10 · rule-coverage 100% · ceiling Documented

4 finding(s): 0 critical, 2 high, 2 medium, 0 low.

REDACTED
REDACTED

What to do

  1. Resolve the 2 High IaC finding(s) in IaC & Container Security — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
  2. 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).

Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness0.0 / 10Critical✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

461 of 461 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is REDACTED. Counted over 461 of the 797 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×458REDACTED:1
Most significant orphaned file · ×3apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx:1
Dormant codebase

What to do

  1. Resolve the 458 Orphaned file finding(s) in Knowledge Freshness — start with index.tsx (15), [id].tsx (5), utils.ts (4). — One of this dimension's main actionable groups (458 recommendation-level).
  2. Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with ManageLicensesFormFields.tsx, manage-record-modal.tsx, REDACTED. — One of this dimension's main actionable groups (3 recommendation-level).
  3. Resolve the 1 Dormant codebase finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling9.2 / 10Adequategated by 3 critical findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.2 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: REDACTED↔REDACTED 92%; sentry.client.config.ts↔sentry.server.config.ts 91%; vehicles-card.tsx↔weapons-card.tsx 89%

Boundary-crossing change coupling: ManageValueModal.tsx ↔ values.tsx · ×3apps/client/src/components/admin/values/ManageValueModal.tsx:1
Change coupling: REDACTED ↔ REDACTED · ×23REDACTED:1
Change coupling clique: manage-medical-records-modal.tsx, create-medical-record-modal.tsx, search-medical-records-modal.tsx · ×2apps/client/src/components/citizen/medical-records/manage-medical-records-modal.tsx
Change-coupling hub: REDACTED → REDACTED, REDACTED, REDACTEDREDACTED

What to do

  1. Resolve the 3 Boundary-crossing change coupling finding(s) in Change Coupling — start with ManageValueModal.tsx, active-map-units.tsx, pending-citizen-logs-tab.tsx. — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 23 Change coupling finding(s) in Change Coupling — start with REDACTED, sentry.client.config.ts, vehicles-card.tsx. — One of this dimension's main actionable groups (23 warning-level).
  3. Resolve the 2 Change coupling clique finding(s) in Change Coupling — start with manage-medical-records-modal.tsx, index.tsx. — One of this dimension's main actionable groups (2 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (.github/SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 0 platform declaration(s) and 8 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.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged

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.

AC2 · Forms & labels4.1 / 10Weak✓ 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 control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. — apps/client/src/components/account/settings/change-password-area.tsx:51
  • This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×29) — apps/client/src/components/admin/manage/cad-settings/discord-webhooks/WebhookSettingsField.tsx:45, apps/client/src/components/admin/manage/custom-roles/manage-custom-roles-modal.tsx:168, apps/client/src/components/admin/manage/units/tabs/manage-unit-tab/manage-unit-tab.tsx:138, …
  • An element made editable (contenteditable, or role="textbox"/"searchbox" with a tab stop or key handling) is a text-entry control, and it has no aria-label, no aria-labelledby and no title, so assistive tech announces an unnamed edit field. Point aria-labelledby at its visible caption, or add an aria-label. — apps/client/src/components/editor/elements/checklist-item.tsx:27
  • This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. — apps/client/src/components/leo/modals/manage-record/table-item-form.tsx:269

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.
AC3 · Page structure7.2 / 10Strong✓ 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) — apps/api/src/templates/citizen-criminal-record.ejs:2, apps/api/src/templates/record.ejs:2
  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. (×4) — apps/client/src/components/account/user-connections-tab.tsx:79, apps/client/src/components/auth/api-verification.tsx:56, apps/client/src/components/auth/api-verification.tsx:145, …

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.
AC4 · Keyboard semantics1.0 / 10Critical✓ Tool-verified

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. (×3) — apps/client/src/components/account/appearance-tab.tsx:152, apps/client/src/components/account/appearance-tab.tsx:163, apps/client/src/components/shared/table/table-header.tsx:35
  • This <li> announces itself as a role="button" and binds a click, but nothing can put focus on it: no tabIndex={0} in any spelling, no key handler, and nothing in this file moves focus or sets aria-activedescendant. The role tells assistive tech what the control IS; it does not make the control reachable, so a keyboard user cannot operate it at all (WCAG 2.1.1). Give it tabIndex={0}="0" and an Enter/Space key handler, or make it a native <button>. If a parent widget owns the keyboard model, that parent must move focus onto the active role="button" or point aria-activedescendant at it. (×2) — apps/client/src/pages/bleeter/@/[handle].tsx:145, apps/client/src/pages/bleeter/@/[handle].tsx:155

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

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.

AC6 · Visual & motion safety5.7 / 10Adequate✓ Tool-verified

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.

  • <span> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). — apps/client/src/components/editor/elements/checklist-item.tsx:27
  • <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). — packages/ui/src/components/inputs/input.tsx:9
  • <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). — packages/ui/src/components/inputs/textarea.tsx:10
  • <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — packages/ui/src/components/loader.tsx:12
  • `.dropdown-fade` moves (`animation: dropdownFade 100ms ease-out forwards`) 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. — apps/client/src/styles/globals.css:132

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.
AX10 · Code composition7.0 / 10Adequate✓ Tool-verified

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.

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

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.

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

C1 · Data Protection3.5 / 10Weak✓ Tool-verified

Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.

Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.

What to do

  • Strengthen data-at-rest protection: vault your keys (AWS KMS / Secrets Manager, Azure Key Vault, GCP KMS / REDACTED Manager, HashiCorp Vault) and encrypt the most sensitive columns (typeorm-encrypted, prisma-field-encryption, mongoose-field-encryption or MongoDB CSFLE) — partial coverage still leaves gaps.
  • Enforce HTTPS (serve through https.createServer / NestJS httpsOptions, or redirect plain HTTP with express-sslify behind your TLS terminator) so data in transit is always encrypted.
C3 · Audit Trail7.5 / 10Strong✓ Tool-verified

Other · Security — Whether changes to sensitive data are recorded (who, what, when) for compliance + incident response.

Method: Roslyn scan: audit-trail mechanism graded (SaveChanges interceptor/immutable AuditLog/[Audited] strong; bare IAuditable/AddAuditing weak). Deterministic.

  • An audit mechanism is present, but the trail is not yet complete — missing: an ORM write hook every change flows through (a TypeORM/MikroORM subscriber, a Sequelize or Mongoose hook, Prisma middleware or a query extension, or an event-store append), per-model coverage (@Audited, or a change-history plugin such as mongoose-history or sequelize-paper-trail applied to each model).

What to do

  • Back the audit convention with a structural mechanism: an ORM write hook (a TypeORM/MikroORM subscriber, a Sequelize or Mongoose hook, Prisma middleware) writing every sensitive change to an audit-log table, and apply it to each model that needs a who-changed-what trail.
C5 · Data-Subject Rights4.0 / 10Weak✓ Tool-verified

Other · Security — Whether GDPR data-subject requests are supported in code — erasure, export/portability, consent.

Method: Roslyn scan: GDPR data-subject-rights corroboration (erasure/export/consent vocabulary co-occurring with subject-id store crossing or explicit GDPR pattern). Deterministic, gated by PII.

  • Corroborated rights: erasure ✓ · export ✗ · consent ✗. Each tick means this scan found code in the repository implementing that right — a deletion/anonymisation path for erasure, a data-export or portability path for export, and consent state recorded alongside the personal data it authorises. A ✗ therefore means no such code was recognised HERE, not that the right is unsupported: a capability provided by a platform, a manual runbook, or code spelled in a way this scan does not match is not visible to it. Confirm before treating a cross as a gap; where it is one, the right has to be fulfilled manually.

What to do

  • Implement data export/portability for a data subject (a machine-readable export of their personal data).
  • Track GDPR consent (lawful basis) alongside the personal data it authorises.
GD1 · Unfinished & placeholder code10.0 / 10Exemplary✓ Tool-verified

Other · Code Health — Unreviewed-generation residue in this repository's JavaScript/TypeScript: functions whose whole body still throws a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings and JSX of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

  • A placeholder string ("Lorem ipsum dolor sit.") is still in shipped code — typical of generated boilerplate that was never filled in. — apps/client/src/components/admin/values/manage-modal/status-value-fields.tsx:189

What to do

  • Finish or delete the functions that still throw "not implemented", and replace placeholder text before shipping.
IC1 · Incompleteness & stubs8.2 / 10Strong✓ Tool-verified

Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's JavaScript/TypeScript: functions that only throw a "not implemented" error, functions that take inputs and return a constant or do nothing, async functions that never await, dead `if (false)` branches, and skeleton classes most of whose methods are holes.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

  • `emitUpdateUnitStatus` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — apps/api/src/services/socket-service.ts:125
  • The guard above `return true;` also returns `true`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — apps/client/src/context/ValuesContext.tsx:74
  • Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition. — packages/ui/src/components/fields/async-list-search-field/actions.tsx:51

What to do

  • Remove the dead code that looks live: delete dead if(false) branches, which read as logic that runs, and either do the real async work or drop the async keyword from fake-async functions, which promise work they never wait for.
M1 · Documentation (README)8.0 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

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.
M2 · Architecture documentation0.0 / 10Critical✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
  • No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
  • Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P2 · Observability5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • Only 1/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `apps/client`, `packages/ui`.
  • `apps/api/src/utils/check-for-updates.ts` reports through `console.*` at line 22 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/utils/check-for-updates.ts:22
  • `apps/api/src/utils/check-for-updates.ts` reports through `console.*` at line 40 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/utils/check-for-updates.ts:40
  • `apps/api/src/utils/validate-environment-variables.ts` reports through `console.*` at line 10 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/utils/validate-environment-variables.ts:10
  • `apps/api/src/utils/validate-requirements.ts` reports through `console.*` at line 35 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/utils/validate-requirements.ts:35
  • `apps/api/src/middlewares/handle-inactivity.ts` reports through `console.*` at line 116 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/middlewares/handle-inactivity.ts:116
  • `apps/api/src/middlewares/handle-inactivity.ts` reports through `console.*` at line 126 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/middlewares/handle-inactivity.ts:126
  • `apps/api/src/middlewares/handle-inactivity.ts` reports through `console.*` at line 171 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/middlewares/handle-inactivity.ts:171
  • `apps/api/src/middlewares/handle-inactivity.ts` reports through `console.*` at line 184 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/middlewares/handle-inactivity.ts:184
  • `apps/api/src/middlewares/handle-inactivity.ts` reports through `console.*` at line 196 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/middlewares/handle-inactivity.ts:196
  • `apps/api/src/middlewares/handle-inactivity.ts` reports through `console.*` at line 197 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/middlewares/handle-inactivity.ts:197
  • `apps/api/src/lib/leo/send-panic-button-webhook.ts` reports through `console.*` at line 53 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/lib/leo/send-panic-button-webhook.ts:53
  • `apps/api/src/lib/leo/setInactiveUnitsOffDuty.ts` reports through `console.*` at line 64 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/lib/leo/setInactiveUnitsOffDuty.ts:64
  • `apps/api/src/lib/images/generate-image-blur-data.ts` reports through `console.*` at line 52 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/lib/images/generate-image-blur-data.ts:52
  • `apps/api/src/lib/dispatch/911-calls/handle-end-911-call.ts` reports through `console.*` at line 49 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/lib/dispatch/911-calls/handle-end-911-call.ts:49
  • `apps/api/src/lib/discord/register-metadata.ts` reports through `console.*` at line 37 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/lib/discord/register-metadata.ts:37
  • `apps/api/src/lib/discord/webhooks.ts` reports through `console.*` at line 47 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/lib/discord/webhooks.ts:47
  • `apps/api/src/lib/discord/webhooks.ts` reports through `console.*` at line 72 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/lib/discord/webhooks.ts:72
  • `apps/api/src/lib/data/prisma.ts` reports through `console.*` at line 15 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/lib/data/prisma.ts:15
  • `apps/api/src/lib/data/prisma.ts` reports through `console.*` at line 17 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/lib/data/prisma.ts:17
  • `REDACTED` reports through `console.*` at line 312 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:312
  • `REDACTED` reports through `console.*` at line 407 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:407
  • `REDACTED` reports through `console.*` at line 657 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:657
  • `apps/api/src/controllers/leo/search/SearchActionsController.ts` reports through `console.*` at line 589 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/controllers/leo/search/SearchActionsController.ts:589
  • `REDACTED` reports through `console.*` at line 136 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:136
  • `apps/api/src/controllers/dispatch/status-controller.ts` reports through `console.*` at line 374 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/api/src/controllers/dispatch/status-controller.ts:374
  • `REDACTED` reports through `console.*` at line 254 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:254
  • `REDACTED` reports through `console.*` at line 171 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:171
  • `REDACTED` reports through `console.*` at line 141 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:141
  • `REDACTED` reports through `console.*` at line 653 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:653

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
  • Add a health-check endpoint (@godaddy/terminus or a /health route) so orchestrators and load balancers can probe liveness/readiness.
P3 · Security & performance tooling3.0 / 10Weak✓ Tool-verified

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 CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 3 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. — REDACTED:7
  • `REDACTED` schedules updates, but no `package-ecosystem` entry covers `npm`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list. — REDACTED:3

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
  • Dependabot is configured but does not watch `npm` — add that `package-ecosystem` entry to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

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.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

  • No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
P8 · Schema migrations10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.

Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.

PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

  • `existsSync` in `handleUploadFavicon` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:122
  • `genSaltSync` in `giveUserTempPassword` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:417
  • `hashSync` in `giveUserTempPassword` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:423
  • `compareSync` in `enable2FA` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:52
  • `compareSync` in `disable2FA` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:96
  • `compareSync` in `login` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — apps/api/src/controllers/auth/auth-controller.ts:84
  • `genSaltSync` in `register` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — apps/api/src/controllers/auth/auth-controller.ts:160
  • `hashSync` in `register` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — apps/api/src/controllers/auth/auth-controller.ts:162
  • `compareSync` in `updatePassword` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:270
  • `genSaltSync` in `updatePassword` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:280
  • `hashSync` in `updatePassword` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:286

What to do

  • TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
R1 · Type Safety9.9 / 10Exemplary✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

R10 · Code Duplication0.4 / 10Critical✓ Tool-verified

React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.

  • 143 duplicated blocks under apps/client/src/components/ have copies in at least two of the sibling directories account, active-bolos, admin, bleeter, business, citizen (+6 more sibling(s) not listed) — 95 of them are reported below, and 48 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 143 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 143 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 143 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/client/src/components/dispatch/modals/address-search-modal.tsx:28
  • 111 duplicated blocks under apps/api/src/controllers/ have copies in at least two of the sibling directories admin, auth, bleeter, business, calls, citizen (+5 more sibling(s) not listed) — 54 of them are reported below, and 57 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 111 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 111 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 111 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — REDACTED:37
  • 72 duplicated blocks under apps/client/src/ have copies in at least two of the sibling directories components, hooks, pages — 40 of them are reported below, and 32 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 72 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 72 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 72 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/client/src/components/leo/modals/NameSearchModal/sections/basic-information.tsx:30
  • 33 duplicated blocks under apps/client/src/pages/ have copies in at least two of the sibling directories admin, bleeter, business, citizen, dispatch, ems-fd (+3 more sibling(s) not listed) — 19 of them are reported below, and 14 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 33 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 33 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 33 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/client/src/pages/ems-fd/my-deputies.tsx:37
  • 9 duplicated blocks under apps/client/src/components/citizen/ have copies in at least two of the sibling directories licenses, medical-records, pets, tow, vehicles, weapons — 7 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 9 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 9 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 9 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/client/src/components/citizen/vehicles/vehicles-card.tsx:89
  • 8 duplicated blocks under apps/client/src/components/admin/ have copies in at least two of the sibling directories import, manage, values — 7 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 8 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 8 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 8 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/client/src/components/admin/manage/cad-settings/general/import-blacklisted-words-modal.tsx:16
  • 7 duplicated blocks under apps/client/src/components/admin/manage/cad-settings/ have copies in at least two of the sibling directories discord-webhooks, general, misc-features, webhooks — 5 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/client/src/components/admin/manage/cad-settings/discord-webhooks/discord-webhooks-tab.tsx:85
  • 6 duplicated blocks under apps/api/src/ have copies in at least two of the sibling directories controllers, lib, middlewares, migrations, utils — 4 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/api/src/controllers/leo/my-officers/upsert-officer.ts:143
  • 6 duplicated blocks under apps/client/src/components/dispatch/ have copies in at least two of the sibling directories active-calls, active-incidents, active-units, events — 5 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/client/src/components/dispatch/active-calls/columns/assigned-units-column.tsx:41
  • 6 duplicated blocks under apps/client/src/components/leo/ have copies in at least two of the sibling directories call-history, exams, incidents, jail, modals — 2 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/client/src/components/leo/incidents/manage-incident-modal.tsx:324
  • 5 duplicated blocks under apps/client/src/components/admin/manage/ have copies in at least two of the sibling directories cad-settings, citizens, custom-fields, custom-roles, units, users — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/client/src/components/admin/manage/cad-settings/default-permissions-tab.tsx:94
  • 5 of the duplicated blocks reported below have copies in at least two of the sibling directories CustomFieldSearch, NameSearchModal, VehicleSearch, business-search-modal, manage-record, weapon-search under apps/client/src/components/leo/modals/. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — apps/client/src/components/leo/modals/business-search-modal/business-search-modal.tsx:99
  • REDACTED:37 · REDACTED:35 — the two spans are one implementation copied and then locally edited — 1310 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:37
  • apps/client/src/components/dispatch/active-units/deputies/active-deputies.tsx:47 · apps/client/src/components/dispatch/active-units/officers/active-officers.tsx:66 — the two spans are one implementation copied and then locally edited — 762 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/client/src/components/dispatch/active-units/deputies/active-deputies.tsx:47
  • apps/client/src/components/admin/manage/cad-settings/misc-features/license-number-tab.tsx:14 · apps/client/src/components/admin/manage/cad-settings/misc-features/max-license-points-tab.tsx:14 — the two spans are one implementation copied and then locally edited — 646 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/client/src/components/admin/manage/cad-settings/misc-features/license-number-tab.tsx:14
  • apps/api/src/utils/zod-error-map.ts:3 · apps/client/src/lib/validation/zod-error-map.ts:3 — these 2 files are line-for-line copies of one another — 126 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/api/src/utils/zod-error-map.ts:3
  • apps/client/src/pages/admin/manage/custom-fields.tsx:23 · apps/client/src/pages/admin/manage/custom-roles.tsx:31 — the two spans are one implementation copied and then locally edited — 739 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/client/src/pages/admin/manage/custom-fields.tsx:23
  • apps/client/src/components/dispatch/active-units/deputies/deputy-column.tsx:66 · apps/client/src/components/dispatch/active-units/officers/columns/officer-column.tsx:65 — the two spans are one implementation copied and then locally edited — 696 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/client/src/components/dispatch/active-units/deputies/deputy-column.tsx:66
  • apps/client/src/pages/ems-fd/my-deputies.tsx:37 · apps/client/src/pages/officer/my-officers.tsx:42 — the two spans are one implementation copied and then locally edited — 833 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/client/src/pages/ems-fd/my-deputies.tsx:37
  • apps/client/src/components/dispatch/modals/address-search-modal.tsx:28 · apps/client/src/components/leo/modals/business-search-modal/business-search-modal.tsx:40 — the two spans are one implementation copied and then locally edited — 579 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/client/src/components/dispatch/modals/address-search-modal.tsx:28
  • REDACTED:40 · REDACTED:65 — the two spans are one implementation copied and then locally edited — 613 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:40
  • REDACTED:36 · REDACTED:151 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:36
  • apps/api/src/lib/dispatch/911-calls/assign-units-to-911-call.ts:30 · apps/api/src/lib/incidents/handle-involved-units.ts:28 — the two spans are one implementation copied and then locally edited — 500 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/api/src/lib/dispatch/911-calls/assign-units-to-911-call.ts:30
  • apps/api/src/controllers/citizen/MedicalRecordController.ts:19 · apps/api/src/controllers/citizen/weapon-controller.ts:72 — the two spans are one implementation copied and then locally edited — 566 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/api/src/controllers/citizen/MedicalRecordController.ts:19
  • REDACTED:24 · REDACTED:20 — the two spans are one implementation copied and then locally edited — 564 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:24
  • apps/client/src/components/ems-fd/modals/deputy/select-deputy-modal.tsx:33 · apps/client/src/components/leo/modals/select-officer-modal.tsx:48 — the two spans are one implementation copied and then locally edited — 538 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/client/src/components/ems-fd/modals/deputy/select-deputy-modal.tsx:33
  • apps/client/src/components/ems-fd/modals/search-medical-records/search-medical-records-modal.tsx:127 · apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx:195 — the two spans are one implementation copied and then locally edited — 519 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/client/src/components/ems-fd/modals/search-medical-records/search-medical-records-modal.tsx:127
  • apps/client/src/pages/officer/bureau-of-firearms.tsx:16 · apps/client/src/pages/officer/dmv.tsx:16 — the two spans are one implementation copied and then locally edited — 599 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/client/src/pages/officer/bureau-of-firearms.tsx:16
  • apps/client/src/components/courthouse/court-entries/court-entries-tab.tsx:14 · apps/client/src/components/courthouse/courthouse-posts/courthouse-posts-tab.tsx:15 — the two spans are one implementation copied and then locally edited — 551 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/client/src/components/courthouse/court-entries/court-entries-tab.tsx:14
  • apps/api/src/lib/get-active-ems-fd-deputy.ts:15 · apps/api/src/lib/leo/activeOfficer.ts:15 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — apps/api/src/lib/get-active-ems-fd-deputy.ts:15
  • apps/client/src/pages/law-book.tsx:17 · apps/client/src/pages/officer/penal-codes.tsx:18 — the two spans are one implementation copied and then locally edited — 554 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/client/src/pages/law-book.tsx:17
  • apps/client/src/components/admin/manage/courthouse/expungement-requests-tab.tsx:15 · apps/client/src/components/admin/manage/courthouse/name-change-requests-tab.tsx:14 — the two spans are one implementation copied and then locally edited — 518 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/client/src/components/admin/manage/courthouse/expungement-requests-tab.tsx:15
  • apps/client/src/pages/auth/account-password.tsx:1 · apps/client/src/pages/auth/temp-password.tsx:1 — these 2 files are line-for-line copies of one another — 79 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — apps/client/src/pages/auth/account-password.tsx:1
  • apps/client/src/components/admin/manage/units/tabs/all-units-tab.tsx:43 · apps/client/src/components/admin/manage/units/tabs/callsigns-tab/callsigns-tab.tsx:20 — the two spans are one implementation copied and then locally edited — 456 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/client/src/components/admin/manage/units/tabs/all-units-tab.tsx:43
  • apps/client/src/components/ems-fd/ModalButtons.tsx:81 · apps/client/src/components/leo/ModalButtons.tsx:75 — the two spans are one implementation copied and then locally edited — 394 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/client/src/components/ems-fd/ModalButtons.tsx:81
  • apps/client/src/components/dispatch/active-calls/modals/add-unit-to-call-modal.tsx:155 · apps/client/src/components/leo/incidents/involved-units/add-involved-unit.tsx:86 — the two spans are one implementation copied and then locally edited — 404 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/client/src/components/dispatch/active-calls/modals/add-unit-to-call-modal.tsx:155
  • apps/client/src/components/leo/modals/NameSearchModal/ManageCitizenFlagsModal.tsx:13 · apps/client/src/components/leo/modals/NameSearchModal/manage-citizen-address-flags-modal.tsx:13 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — apps/client/src/components/leo/modals/NameSearchModal/ManageCitizenFlagsModal.tsx:13
  • apps/client/src/components/citizen/vehicles/vehicles-card.tsx:89 · apps/client/src/components/citizen/weapons/weapons-card.tsx:77 — the two spans are one implementation copied and then locally edited — 469 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/client/src/components/citizen/vehicles/vehicles-card.tsx:89
  • apps/client/src/components/courthouse/court-entries/manage-court-entry-modal.tsx:31 · apps/client/src/components/courthouse/courthouse-posts/manage-courthouse-post-modal.tsx:22 — the two spans are one implementation copied and then locally edited — 377 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/client/src/components/courthouse/court-entries/manage-court-entry-modal.tsx:31
  • apps/client/src/components/admin/manage/cad-settings/discord-webhooks/discord-webhooks-tab.tsx:85 · apps/client/src/components/admin/manage/cad-settings/webhooks/raw-webhooks-tab.tsx:77 — the two spans are one implementation copied and then locally edited — 272 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — apps/client/src/components/admin/manage/cad-settings/discord-webhooks/discord-webhooks-tab.tsx:85

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R2 · Cyclomatic Complexity6.0 / 10Adequate✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • createInitialValues has cyclomatic complexity 81 and cognitive complexity 76; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/admin/values/ManageValueModal.tsx:92
  • ManageLicensesFormFields has cyclomatic complexity 55 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx:75
  • upsertRecord has cyclomatic complexity 47 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/api/src/lib/leo/records/upsert-record.ts:30
  • errorMap has cyclomatic complexity 46 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — apps/api/src/utils/zod-error-map.ts:17, apps/client/src/lib/validation/zod-error-map.ts:22
  • (top-level) has cyclomatic complexity 45 and cognitive complexity 47; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1
  • TableItemForm has cyclomatic complexity 35 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/leo/modals/manage-record/table-item-form.tsx:81
  • get has cyclomatic complexity 31 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/lib/admin/values/values.tsx:43
  • createInitialRecordValues has cyclomatic complexity 30 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx:102
  • ManageCitizenForm has cyclomatic complexity 28 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/citizen/ManageCitizenForm.tsx:54
  • (anonymous) has cyclomatic complexity 28 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx:176
  • validateRecordData has cyclomatic complexity 28 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/api/src/lib/leo/records/validate-record-data.ts:29
  • PlayerMarker has cyclomatic complexity 27 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/dispatch/map/units/player-marker.tsx:28
  • (top-level) has cyclomatic complexity 26 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1
  • createDefaultLicensesValues has cyclomatic complexity 26 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx:17
  • (anonymous) has cyclomatic complexity 26 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/ems-fd/modals/search-medical-records/search-medical-records-modal.tsx:109
  • ManageIncidentModal has cyclomatic complexity 26 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/leo/incidents/manage-incident-modal.tsx:74
  • execute has cyclomatic complexity 25 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/lib/useFetch.tsx:57
  • upsertOfficer has cyclomatic complexity 25 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/api/src/controllers/leo/my-officers/upsert-officer.ts:50
  • (top-level) has cyclomatic complexity 24 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1
  • RegisterVehicleModal has cyclomatic complexity 23 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/citizen/vehicles/modals/register-vehicle-modal.tsx:52
  • (anonymous) has cyclomatic complexity 21 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/dispatch/active-calls/modals/manage-911-call-form.tsx:128
  • (anonymous) has cyclomatic complexity 20 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/dispatch/active-units/officers/active-officers.tsx:132
  • (anonymous) has cyclomatic complexity 20 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/leo/modals/VehicleSearchModal.tsx:146
  • OfficerColumn has cyclomatic complexity 20 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/dispatch/active-units/officers/columns/officer-column.tsx:41
  • citizenObjectFromData has cyclomatic complexity 19 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/api/src/lib/citizen/citizen-create-data-obj.ts:16
  • CitizenId has cyclomatic complexity 19 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/pages/citizen/[id]/index.tsx:48
  • DeputyColumn has cyclomatic complexity 19 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/dispatch/active-units/deputies/deputy-column.tsx:42
  • getSessionUser has cyclomatic complexity 18 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/api/src/lib/auth/getSessionUser.ts:65
  • (anonymous) has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/admin/values/ManageValueModal.tsx:312
  • ManagePenalCode has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/admin/values/penal-codes/manage-penal-code-modal.tsx:25
  • ManageCitizens has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/pages/admin/manage/users/[id].tsx:65
  • ModalButtons has cyclomatic complexity 18 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/leo/ModalButtons.tsx:49
  • (anonymous) has cyclomatic complexity 17 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:91
  • (anonymous) has cyclomatic complexity 17 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — REDACTED:119, apps/client/src/components/dispatch/active-units/deputies/active-deputies.tsx:109
  • Nav has cyclomatic complexity 17 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/shared/nav/Nav.tsx:27
  • upsertEmsFdDeputy has cyclomatic complexity 16 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/api/src/lib/ems-fd/upsert-ems-fd-deputy.ts:37
  • (anonymous) has cyclomatic complexity 16 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/client/src/components/leo/incidents/manage-incident-modal.tsx:199
  • createSearchWhereObject has cyclomatic complexity 15 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/api/src/lib/values/create-where-object.ts:12
R3 · Large Files9.0 / 10Strong✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

  • REDACTED has 900 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 654 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • apps/api/src/controllers/leo/search/SearchActionsController.ts has 646 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/api/src/controllers/leo/search/SearchActionsController.ts:1
  • REDACTED has 632 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 604 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 599 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 597 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 579 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx has 533 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx:1
  • REDACTED has 509 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx has 507 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx:1
  • REDACTED has 503 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 499 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 469 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • apps/client/src/components/admin/values/ManageValueModal.tsx has 425 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/client/src/components/admin/values/ManageValueModal.tsx:1
  • apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx has 413 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx:1
  • apps/client/src/pages/admin/values/[path].tsx has 402 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/client/src/pages/admin/values/[path].tsx:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage1.3 / 10Critical✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — REDACTED:1, REDACTED:1, apps/api/src/controllers/leo/search/SearchActionsController.ts:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each REDACTED script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: REDACTED scanned for test/lint/typecheck script wiring. Deterministic presence check.

R7 · Dead Code0.0 / 10Critical✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • 13 file(s) (~3107 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: packages/types/src/api.ts imports './prisma/index', which is not in the scanned tree. That is usually a generated or build-output module, so reachability cannot see past it and no dead-code claim is made about this package. Nothing is necessarily wrong here. — packages/types
  • Unreachable from the 98 application, 14 tooling and 45 test entry point(s) detected in this repo. Gate removals on `pnpm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 4 in-repo import(s) from 4 other file(s) do name it (REDACTED, REDACTED, REDACTED and 1 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — REDACTED
  • no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — REDACTED
  • no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×22) — apps/api/src/controllers/leo/search/SearchActionsController.ts, REDACTED, REDACTED, …
  • no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/api/src/controllers/auth/auth-controller.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — REDACTED
  • no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — REDACTED
  • no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/api/src/lib/values/create-where-object.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — REDACTED
  • no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 16 in-repo import(s) from 16 other file(s) do name it (REDACTED, REDACTED, REDACTED and 13 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — REDACTED
  • no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — REDACTED
  • no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 5 in-repo import(s) from 5 other file(s) do name it (REDACTED, REDACTED, REDACTED and 2 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — REDACTED
  • no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 5 in-repo import(s) from 5 other file(s) do name it (REDACTED, REDACTED, apps/api/src/controllers/leo/incidents/0IncidentEventsController.ts and 2 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — REDACTED
  • no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (REDACTED, apps/api/src/controllers/leo/search/SearchActionsController.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — REDACTED
  • no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (REDACTED, REDACTED, REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — apps/api/src/controllers/leo/my-officers/upsert-officer.ts
  • no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — REDACTED
  • no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (REDACTED, apps/api/src/lib/leo/records/create-citizen-violations.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — apps/api/src/lib/leo/records/upsert-record.ts
  • no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (REDACTED, REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — apps/api/src/controllers/auth/auth-controller.ts
  • no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (REDACTED, apps/api/src/controllers/leo/my-officers/upsert-officer.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — REDACTED
  • no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (REDACTED, apps/api/src/lib/dispatch/911-calls/utils/create-assigned-text.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — apps/api/src/lib/dispatch/911-calls/assign-units-to-911-call.ts

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene0.0 / 10Critical✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

  • Imported but not declared in any reachable REDACTED — installs work only by hoisting accident. — apps/client/src/components/modal/CropImageModal.tsx:3
  • Declared in the root REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2) — REDACTED:36, REDACTED:26
  • Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×4) — REDACTED:50, REDACTED:35, REDACTED:36, …
  • Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — REDACTED:26
  • Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — REDACTED:34
  • Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×5) — REDACTED:78, REDACTED:101, REDACTED:36, …
  • Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — REDACTED:107
  • Every import is type-only — move it to devDependencies. (×7) — apps/client/src/components/form/inputs/value-select-field.tsx:6, packages/ui/src/components/fields/async-list-search-field.tsx:5, packages/ui/src/hooks/select/useMultiSelectState.ts:5, …

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports0.0 / 10Critical✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

  • REDACTED → REDACTED → apps/api/src/controllers/leo/my-officers/upsert-officer.ts → REDACTED — REDACTED:23
  • REDACTED → apps/api/src/lib/values/create-where-object.ts → REDACTED — REDACTED:32
  • REDACTED → REDACTED → REDACTED — REDACTED:35
  • apps/api/src/lib/auth/getSessionUser.ts → apps/api/src/lib/auth/getUserFromUserAPIToken.ts → apps/api/src/lib/auth/getSessionUser.ts (one verified cycle inside a mutually-dependent group of 3 files) — apps/api/src/lib/auth/getSessionUser.ts:11
  • apps/api/src/lib/data/prisma.ts → apps/api/src/migrations/set-default-cad-features.ts → apps/api/src/lib/data/prisma.ts — apps/api/src/lib/data/prisma.ts:2
  • apps/api/src/middlewares/auth/is-auth.ts → apps/api/src/middlewares/is-enabled.ts → apps/api/src/middlewares/auth/is-auth.ts — apps/api/src/middlewares/auth/is-auth.ts:12
  • apps/client/src/components/leo/manage-officer/manage-officer-fields.tsx → apps/client/src/components/leo/modals/ManageOfficerModal.tsx → apps/client/src/components/leo/manage-officer/manage-officer-fields.tsx — apps/client/src/components/leo/manage-officer/manage-officer-fields.tsx:14
  • apps/client/src/components/leo/modals/VehicleSearch/ManageVehicleFlagsModal.tsx → apps/client/src/components/leo/modals/VehicleSearchModal.tsx → apps/client/src/components/leo/modals/VehicleSearch/ManageVehicleFlagsModal.tsx (one verified cycle inside a mutually-dependent group of 5 files) — apps/client/src/components/leo/modals/VehicleSearch/ManageVehicleFlagsModal.tsx:13
  • apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx → apps/client/src/components/leo/modals/manage-record/tabs/drafts-tab/drafts-tab.tsx → apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx (one verified cycle inside a mutually-dependent group of 6 files) — apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx:43
  • apps/client/src/components/shared/Table.tsx → apps/client/src/components/shared/table/table.tsx → apps/client/src/lib/table/create-table-dnd-column.tsx → apps/client/src/components/shared/Table.tsx — apps/client/src/components/shared/Table.tsx:1
  • packages/ui/src/components/fields/async-list-search-field.tsx → packages/ui/src/components/index.tsx → packages/ui/src/components/fields/async-list-search-field.tsx — packages/ui/src/components/fields/async-list-search-field.tsx:21

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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.

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

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.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. 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 `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X2 · Cancellation propagation4.5 / 10Weak✓ Tool-verified

Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 1/12 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `getLatestReleaseVersion` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/utils/src/version.ts:50
  • `handleRequest` awaits `axios(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios(url, { signal })`. — apps/client/src/lib/fetch.ts:17
  • `fetchImageData` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/client/src/components/form/inputs/ImageSelectInput.tsx:50
  • `generateBlips` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — apps/client/src/components/dispatch/map/render-map-blips.tsx:33
  • `fetchLatestVersion` awaits `request(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `request(url, { signal })`. — apps/api/src/utils/check-for-updates.ts:5
  • `fetchImageURLData` awaits `request(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `request(url, { signal })`. — apps/api/src/lib/images/generate-image-blur-data.ts:44
  • `sendRawWebhook` awaits `request(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `request(url, { signal })`. — apps/api/src/lib/discord/webhooks.ts:56
  • `validateGoogleCaptcha` awaits `request(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `request(url, { signal })`. — apps/api/src/lib/auth/validate-google-captcha.ts:14
  • `getDiscordData` awaits `request(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `request(url, { signal })`. — REDACTED:222
  • `getSteamData` awaits `request(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `request(url, { signal })`. — REDACTED:186
  • `getChangelog` awaits `request(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `request(url, { signal })`. — REDACTED:112

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

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.

X24 · Document value interpolated into markup unescaped3.5 / 10Weak✓ Tool-verified

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.

  • `blipCss` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — apps/client/src/components/dispatch/map/render-map-blips.tsx:122

What to do

  • Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

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.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling6.7 / 10Adequate✓ Tool-verified

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.

  • 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. (×2) — apps/api/src/lib/leo/records/create-citizen-violations.ts:23, apps/api/src/lib/discord/register-metadata.ts:38
  • `catch` 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, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. (×3) — apps/api/src/lib/discord/auth.ts:33, REDACTED:39, REDACTED:51

What to do

  • Swallowed exception (empty catch)
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.

X5 · Nullable reference types9.7 / 10Exemplary✓ Tool-verified

Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • ~0.7 `!` null assertions per 1k TypeScript source lines — 64 assertion(s) across the 96650 source line(s) of the 767 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: REDACTED (3), REDACTED (3), apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx (3). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.

What to do

  • The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).

WCAG coverage — what static analysis assessed

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).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

Not statically assessed — these 40 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health33.7Weak — gated by D2, D3, R10, R7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture55.1Adequate — gated by R9Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity51.2Adequate — gated by D34, M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness28.2Weak — gated by D14, R4, R8, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security50.6Adequate — gated by D29, C1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility48.2Weak — gated by AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60.0AdequateStrongest area.
Unscored — 3 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.

  • D36 Supply-chain Provenance & Signing — 3 observation(s) recorded · The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 39 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 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.

  • C4 Data Retention — Repo shows no data-retention / TTL / cleanup mechanism for personal data — absence of evidence is not evidence of a working control. Define retention periods and a purge/cleanup job (or TTL) in code, or document where retention is enforced, so this dimension can be scored.
  • 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 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
  • AX2 Stateful singletons — Not applicable: TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • 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 1 — a container did not start, exited, or never became healthy) — time="2026-11-17T17:56:20Z" level=warning msg="The \"POSTGRES_PASSWORD\" variable is not set. Defaulting to a blank string." time="2026-11-17T17:56:20Z" level=warning msg="The \"DB_PORT\" variable is not set. Defaulting to a blank string." container snaily-cad-postgres exited (1); 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.
  • C2 Access Controls — No access-control surface detected in the analyzed source — this repository stands up no server (no Express, Fastify, Koa, Hono, NestJS or similar app, no Next.js/SvelteKit/Nuxt server route, no edge function), creates no Supabase tables and talks to no hosted backend. Access control is therefore N/A here — a browser application or library is authorized by the server it calls, not by itself; a client-side route guard hides a page and authorizes nothing. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • 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.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 reads resolved call sites in the languages it reads only — this repository's production source is .tsx, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — 37 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D4 Code Duplication — This repository's production source (.ts, .tsx) is not read by D4's token comparison, which compares .NET source: duplication in it is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream. Not scored here — read the R10 card for this repository's duplication.
  • 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.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — apps/api/ runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (1 domain event(s); its domain events are published by services or handlers — no domain entity raises one)
  • 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
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript source, so there is no service whose uptime a failing dependency could take down
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a REDACTED, 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 scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • R5 Dependency Freshness — uses a pnpm lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
  • S1 Web-Security Posture — Not assessed: 768 JavaScript/TypeScript file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled TLS certificate validation, obsolete TLS versions, passwords stored or checked as plaintext and session cookies set without HttpOnly, Secure or SameSite, and none was found. That half of the dimension is clean, but it is not scored on its own: a C# repository with the same clean reading is scored on its server controls as well, or is N/A for having no web surface, and neither can be decided here. Of the server controls, two are read where the source shows them: every session or sign-in cookie the code sets is read for HttpOnly, Secure and SameSite at the line that sets it (a raw `Set-Cookie` header, Express, Fastify, Hono, Koa, Next.js, `cookie.serialize`, express-session and cookie-session), and every Node listener for HTTPS enforcement. HSTS, security response headers and input validation are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
  • X27 Collection changed while being enumerated — Not applicable: this check looks for a loop whose body adds to or removes from the very collection the loop is walking, invalidating the enumerator it holds, and in this repository's languages that cannot happen. JavaScript and TypeScript have no iterator that a change can invalidate: an `Array` is walked by index against its live length, and a `Map` or `Set` by the ECMAScript specification's live entry list, so a body that adds to, removes from or empties what it walks raises nothing — every loop form (`for…of`, `for…in`, `forEach`, `map`, `filter`, `reduce`, `entries()`) on every built-in collection (`Array`, `Map`, `Set`, plain objects, `URLSearchParams`, `Headers`, `FormData`) runs to completion. Such a loop can still skip an element or never end, which is a different defect and not the one this check asks about. Not a gap in the analyzer and not a finding about your code.
  • X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — 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 — 138 finding(s)
D30 · Dependency Vulnerabilities · High CVE · ×70
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 45 more in this group — see findings.md.
D14 · License Compliance · Banned license · ×11
  • Banned license: @img/sharp-libvips-darwin-arm64 REDACTED:2424 — `@img/sharp-libvips-darwin-arm64` 1.0.2 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-darwin-x64 REDACTED:2430 — `@img/sharp-libvips-darwin-x64` 1.0.2 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linux-arm REDACTED:2442 — `@img/sharp-libvips-linux-arm` 1.0.2 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linux-arm64 REDACTED:2436 — `@img/sharp-libvips-linux-arm64` 1.0.2 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linux-s390x REDACTED:2448 — `@img/sharp-libvips-linux-s390x` 1.0.2 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linux-x64 REDACTED:2454 — `@img/sharp-libvips-linux-x64` 1.0.2 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linuxmusl-arm64 REDACTED:2460 — `@img/sharp-libvips-linuxmusl-arm64` 1.0.2 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linuxmusl-x64 REDACTED:2466 — `@img/sharp-libvips-linuxmusl-x64` 1.0.2 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-wasm32 REDACTED:2508 — `@img/sharp-wasm32` 0.33.4 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later AND MIT`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-win32-ia32 REDACTED:2513 — `@img/sharp-win32-ia32` 0.33.4 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-win32-x64 REDACTED:2519 — `@img/sharp-win32-x64` 0.33.4 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
D30 · Dependency Vulnerabilities · Critical CVE · ×10
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
R9 · Circular Imports · Import cycle (2 files) · ×9
  • Import cycle (2 files) REDACTED:32 — REDACTED → apps/api/src/lib/values/create-where-object.ts → REDACTED
  • Import cycle (2 files) REDACTED:35 — REDACTED → REDACTED → REDACTED
  • Import cycle (2 files) apps/api/src/lib/auth/getSessionUser.ts:11 — apps/api/src/lib/auth/getSessionUser.ts → apps/api/src/lib/auth/getUserFromUserAPIToken.ts → apps/api/src/lib/auth/getSessionUser.ts (one verified cycle inside a mutually-dependent group of 3 files)
  • Import cycle (2 files) apps/api/src/lib/data/prisma.ts:2 — apps/api/src/lib/data/prisma.ts → apps/api/src/migrations/set-default-cad-features.ts → apps/api/src/lib/data/prisma.ts
  • Import cycle (2 files) apps/api/src/middlewares/auth/is-auth.ts:12 — apps/api/src/middlewares/auth/is-auth.ts → apps/api/src/middlewares/is-enabled.ts → apps/api/src/middlewares/auth/is-auth.ts
  • Import cycle (2 files) apps/client/src/components/leo/manage-officer/manage-officer-fields.tsx:14 — apps/client/src/components/leo/manage-officer/manage-officer-fields.tsx → apps/client/src/components/leo/modals/ManageOfficerModal.tsx → apps/client/src/components/leo/manage-officer/manage-officer-fields.tsx
  • Import cycle (2 files) apps/client/src/components/leo/modals/VehicleSearch/ManageVehicleFlagsModal.tsx:13 — apps/client/src/components/leo/modals/VehicleSearch/ManageVehicleFlagsModal.tsx → apps/client/src/components/leo/modals/VehicleSearchModal.tsx → apps/client/src/components/leo/modals/VehicleSearch/ManageVehicleFlagsModal.tsx (one verified cycle inside a mutually-dependent group of 5 files)
  • Import cycle (2 files) apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx:43 — apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx → apps/client/src/components/leo/modals/manage-record/tabs/drafts-tab/drafts-tab.tsx → apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx (one verified cycle inside a mutually-dependent group of 6 files)
  • Import cycle (2 files) packages/ui/src/components/fields/async-list-search-field.tsx:21 — packages/ui/src/components/fields/async-list-search-field.tsx → packages/ui/src/components/index.tsx → packages/ui/src/components/fields/async-list-search-field.tsx
D35 · Change Coupling · Boundary-crossing change coupling · ×3
  • Boundary-crossing change coupling: ManageValueModal.tsx ↔ values.tsx apps/client/src/components/admin/values/ManageValueModal.tsx:1 — `apps/client/src/components/admin/values/ManageValueModal.tsx` (context components) and `apps/client/src/lib/admin/values/values.tsx` (context admin) sit in DIFFERENT parts of the tree yet change together 61% of the time (17 of the 28 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 17 shared commits counted here, the most recent 3 are `ea8a1c7e` feat: call 911 disposition code (#1858); `78f15278` feat: vehicle model images (#1751); `f75d9203` feat: cleanup license categories page — run `git show` on any of them.
  • Boundary-crossing change coupling: active-map-units.tsx ↔ map.ts apps/client/src/components/dispatch/map/units/active-map-units.tsx:1 — `apps/client/src/components/dispatch/map/units/active-map-units.tsx` (context components) and `apps/client/src/types/map.ts` (context types) sit in DIFFERENT parts of the tree yet change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `7810b936` feat: London Studios SmartSigne integration (#1760); `4db91f74` fix: show combined units on live map list; `5a542df0` feat: panic button on live map (#1637) — run `git show` on any of them.
  • Boundary-crossing change coupling: pending-citizen-logs-tab.tsx ↔ [citizenId].tsx apps/client/src/components/leo/citizen-logs/pending-citizen-logs-tab.tsx:1 — `apps/client/src/components/leo/citizen-logs/pending-citizen-logs-tab.tsx` (context components) and `apps/client/src/pages/officer/supervisor/citizen-logs/[citizenId].tsx` (context pages) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `96529917` feat: show stats for record (closes #1835) (at that commit the file was still `apps/client/src/components/leo/citizen-logs/arrest-reports-tab.tsx`); `3410d58d` feat: Business Records (#1550) (at that commit the file was still `apps/client/src/components/leo/citizen-logs/arrest-reports-tab.tsx`); `dcc48520` chore: add fallback for <Status> component (at that commit the file was still `apps/client/src/components/leo/citizen-logs/arrest-reports-tab.tsx`) — run `git show` on any of them.
AC4 · Keyboard semantics · Click handler on a non-interactive <li> · ×2
  • Click handler on a non-interactive <li> apps/client/src/components/account/appearance-tab.tsx:152 — 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 <li> apps/client/src/components/account/appearance-tab.tsx:163 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC4 · Keyboard semantics · Clickable role="button" that no keyboard user can reach · ×2
  • Clickable role="button" that no keyboard user can reach apps/client/src/pages/bleeter/@/[handle].tsx:145 — This <li> announces itself as a role="button" and binds a click, but nothing can put focus on it: no tabIndex={0} in any spelling, no key handler, and nothing in this file moves focus or sets aria-activedescendant. The role tells assistive tech what the control IS; it does not make the control reachable, so a keyboard user cannot operate it at all (WCAG 2.1.1). Give it tabIndex={0}="0" and an Enter/Space key handler, or make it a native <button>. If a parent widget owns the keyboard model, that parent must move focus onto the active role="button" or point aria-activedescendant at it.
  • Clickable role="button" that no keyboard user can reach apps/client/src/pages/bleeter/@/[handle].tsx:155 — This <li> announces itself as a role="button" and binds a click, but nothing can put focus on it: no tabIndex={0} in any spelling, no key handler, and nothing in this file moves focus or sets aria-activedescendant. The role tells assistive tech what the control IS; it does not make the control reachable, so a keyboard user cannot operate it at all (WCAG 2.1.1). Give it tabIndex={0}="0" and an Enter/Space key handler, or make it a native <button>. If a parent widget owns the keyboard model, that parent must move focus onto the active role="button" or point aria-activedescendant at it.
D28 · Secrets (history) · REDACTED · ×2
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Critical vulnerability · ×2
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×2
  • REDACTED
  • REDACTED
R9 · Circular Imports · Import cycle (3 files) · ×2
  • Import cycle (3 files) REDACTED:23 — REDACTED → REDACTED → apps/api/src/controllers/leo/my-officers/upsert-officer.ts → REDACTED
  • Import cycle (3 files) apps/client/src/components/shared/Table.tsx:1 — apps/client/src/components/shared/Table.tsx → apps/client/src/components/shared/table/table.tsx → apps/client/src/lib/table/create-table-dnd-column.tsx → apps/client/src/components/shared/Table.tsx
AC2 · Forms & labels · <input> without a programmatic label · ×1
  • <input> without a programmatic label apps/client/src/components/account/settings/change-password-area.tsx:51 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels · Editable <span> without an accessible name · ×1
  • Editable <span> without an accessible name apps/client/src/components/editor/elements/checklist-item.tsx:27 — An element made editable (contenteditable, or role="textbox"/"searchbox" with a tab stop or key handling) is a text-entry control, and it has no aria-label, no aria-labelledby and no title, so assistive tech announces an unnamed edit field. Point aria-labelledby at its visible caption, or add an aria-label.
AC2 · Forms & labels · <label> that labels no control · ×1
  • <label> that labels no control apps/client/src/components/leo/modals/manage-record/table-item-form.tsx:269 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC4 · Keyboard semantics · Click handler on a non-interactive <th> · ×1
  • Click handler on a non-interactive <th> apps/client/src/components/shared/table/table-header.tsx:35 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
D13 · REDACTED Scanning · Leaked secret · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · High vulnerability · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import 'cropperjs' · ×1
  • Unlisted import 'cropperjs' apps/client/src/components/modal/CropImageModal.tsx:3 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
Serious — 851 finding(s)
D29 · Static Analysis (SAST) · REDACTED · ×175
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 150 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×123
  • FunctionTooLong: ManageLicensesFormFields.ManageLicensesFormFields apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx:75 — FunctionTooLong — ManageLicensesFormFields runs 409 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 309 over it, 4.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: NameSearchModal.NameSearchModal apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx:66 — FunctionTooLong — NameSearchModal runs 327 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 227 over it, 3.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: discord-roles-tab.DiscordRolesTab apps/client/src/components/admin/manage/cad-settings/discord-roles-tab.tsx:27 — FunctionTooLong — DiscordRolesTab runs 307 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 207 over it, 3.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ManageCitizenForm.ManageCitizenForm apps/client/src/components/citizen/ManageCitizenForm.tsx:54 — FunctionTooLong — ManageCitizenForm runs 283 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 183 over it, 2.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: VehicleSearchModal.VehicleSearchModal apps/client/src/components/leo/modals/VehicleSearchModal.tsx:31 — FunctionTooLong — VehicleSearchModal runs 265 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 165 over it, 2.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: [path].ValuePath apps/client/src/pages/admin/values/[path].tsx:76 — FunctionTooLong — ValuePath runs 263 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 163 over it, 2.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: search-medical-records-modal.SearchMedicalRecordModal apps/client/src/components/ems-fd/modals/search-medical-records/search-medical-records-modal.tsx:39 — FunctionTooLong — SearchMedicalRecordModal runs 257 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 157 over it, 2.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: register-vehicle-modal.RegisterVehicleModal apps/client/src/components/citizen/vehicles/modals/register-vehicle-modal.tsx:52 — FunctionTooLong — RegisterVehicleModal runs 247 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 147 over it, 2.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: manage-911-call-form.Manage911CallForm apps/client/src/components/dispatch/active-calls/modals/manage-911-call-form.tsx:33 — FunctionTooLong — Manage911CallForm runs 247 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 147 over it, 2.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: manage-record-modal.ManageRecordModal apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx:186 — FunctionTooLong — ManageRecordModal runs 244 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 144 over it, 2.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: manage-incident-modal.ManageIncidentModal apps/client/src/components/leo/incidents/manage-incident-modal.tsx:74 — FunctionTooLong — ManageIncidentModal runs 233 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 133 over it, 2.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: api-verification.ApiVerification apps/client/src/components/auth/api-verification.tsx:13 — FunctionTooLong — ApiVerification runs 227 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 127 over it, 2.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ManageValueModal.ManageValueModal apps/client/src/components/admin/values/ManageValueModal.tsx:164 — FunctionTooLong — ManageValueModal runs 226 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 126 over it, 2.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: add-unit-to-call-modal.AddUnitToCallModal apps/client/src/components/dispatch/active-calls/modals/add-unit-to-call-modal.tsx:36 — FunctionTooLong — AddUnitToCallModal runs 225 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 125 over it, 2.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: manage-bolo-modal.ManageBoloModal apps/client/src/components/active-bolos/manage-bolo-modal.tsx:24 — FunctionTooLong — ManageBoloModal runs 206 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 106 over it, 2.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: appearance-tab.AppearanceTab apps/client/src/components/account/appearance-tab.tsx:34 — FunctionTooLong — AppearanceTab runs 203 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 103 over it, 2.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: manage-unit-tab.ManageUnitTab apps/client/src/components/admin/manage/units/tabs/manage-unit-tab/manage-unit-tab.tsx:35 — FunctionTooLong — ManageUnitTab runs 203 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 103 over it, 2.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: live-map-tab.LiveMapTab apps/client/src/components/admin/manage/cad-settings/live-map-tab.tsx:48 — FunctionTooLong — LiveMapTab runs 200 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 100 over it, 2.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: all-units-tab.AllUnitsTab apps/client/src/components/admin/manage/units/tabs/all-units-tab.tsx:50 — FunctionTooLong — AllUnitsTab runs 194 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 94 over it, 1.94× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: general-settings-tab.GeneralSettingsTab apps/client/src/components/admin/manage/cad-settings/general/general-settings-tab.tsx:27 — FunctionTooLong — GeneralSettingsTab runs 191 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 91 over it, 1.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.CitizenId apps/client/src/pages/citizen/[id]/index.tsx:48 — FunctionTooLong — CitizenId runs 191 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 91 over it, 1.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: active-officers.ActiveOfficers apps/client/src/components/dispatch/active-units/officers/active-officers.tsx:55 — FunctionTooLong — ActiveOfficers runs 176 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 76 over it, 1.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: table-item-form.TableItemForm apps/client/src/components/leo/modals/manage-record/table-item-form.tsx:81 — FunctionTooLong — TableItemForm runs 175 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 75 over it, 1.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: incidents-table.IncidentsTable apps/client/src/components/leo/incidents/incidents-table.tsx:34 — FunctionTooLong — IncidentsTable runs 174 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 74 over it, 1.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: [id].ManageCitizens apps/client/src/pages/admin/manage/users/[id].tsx:65 — FunctionTooLong — ManageCitizens runs 173 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 73 over it, 1.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 98 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×40
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/api/src/controllers/leo/search/SearchActionsController.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/client/src/components/admin/values/ManageValueModal.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/client/src/pages/admin/values/[path].tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/client/src/components/admin/manage/cad-settings/discord-roles-tab.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/api/src/controllers/dispatch/status-controller.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file apps/client/src/components/citizen/ManageCitizenForm.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • + 15 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · Medium CVE · ×35
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 10 more in this group — see findings.md.
D35 · Change Coupling · Change coupling · ×23
  • Change coupling: REDACTED ↔ REDACTED REDACTED:1 — `REDACTED` and `REDACTED` change together 92% of the time (12 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `cac0b486` feat: bump prisma (#1732); `532affb0` fix: set userId when importing citizens; `b7032fbe` :tada: feat: support fetching random citizen/vehicle/weapon — run `git show` on any of them.
  • Change coupling: sentry.client.config.ts ↔ sentry.server.config.ts apps/client/sentry.client.config.ts:1 — `apps/client/sentry.client.config.ts` and `apps/client/sentry.server.config.ts` change together 91% of the time (10 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `649f7d69` chore: disable sentry in dev; `d119832a` chore: ignore certain errors; `9e47f629` chore: small fixes — run `git show` on any of them.
  • Change coupling: vehicles-card.tsx ↔ weapons-card.tsx apps/client/src/components/citizen/vehicles/vehicles-card.tsx:1 — `apps/client/src/components/citizen/vehicles/vehicles-card.tsx` and `apps/client/src/components/citizen/weapons/weapons-card.tsx` change together 89% of the time (24 of the 27 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 24 shared commits counted here, the most recent 3 are `0279fe15` chore: improved loading for citizen page; `dcc48520` chore: add fallback for <Status> component; `ece047a3` feat: use updated select-fields (#1512) — run `git show` on any of them.
  • Change coupling: deputy-column.tsx ↔ officer-column.tsx apps/client/src/components/dispatch/active-units/deputies/deputy-column.tsx:1 — `apps/client/src/components/dispatch/active-units/deputies/deputy-column.tsx` and `apps/client/src/components/dispatch/active-units/officers/columns/officer-column.tsx` change together 86% of the time (12 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `b439a3fa` feat: use darkened color for active units; `e8923a01` feat: Other license categories (#1830); `bc9fbc4a` feat(context-menu): setup & use `@shadcn/ui` (#1686) (at that commit the files were still `apps/client/src/components/dispatch/active-units/deputies/DeputyColumn.tsx` and `apps/client/src/components/dispatch/active-units/officers/officer-column.tsx`) — run `git show` on any of them.
  • Change coupling: useActiveDeputies.ts ↔ useActiveOfficers.ts apps/client/src/hooks/realtime/useActiveDeputies.ts:1 — `apps/client/src/hooks/realtime/useActiveDeputies.ts` and `apps/client/src/hooks/realtime/useActiveOfficers.ts` change together 83% of the time (10 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `7810b936` feat: London Studios SmartSigne integration (#1760); `a4e836dc` fix: properly sync all unit types on live map (#1652); `4b5cf634` :hammer: chore: improved 911-call state — run `git show` on any of them.
  • Change coupling: taxi.tsx ↔ index.tsx apps/client/src/pages/taxi.tsx:1 — `apps/client/src/pages/taxi.tsx` and `apps/client/src/pages/tow/index.tsx` change together 80% of the time (12 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `bc5c08d4` fix: allow search & pagination on tow/taxi pages; `d219ac8b` :bug: fix: issues with realtime tow/taxi; `5baddf5c` :bug: fix: major bug fixes (citizens select fields) (at that commit the files were still `packages/client/src/pages/taxi.tsx` and `packages/client/src/pages/tow/index.tsx`) — run `git show` on any of them.
  • Change coupling: select-deputy-modal.tsx ↔ select-officer-modal.tsx apps/client/src/components/ems-fd/modals/deputy/select-deputy-modal.tsx:1 — `apps/client/src/components/ems-fd/modals/deputy/select-deputy-modal.tsx` and `apps/client/src/components/leo/modals/select-officer-modal.tsx` change together 76% of the time (13 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `5d4e16d4` fix: properly check for whatPages; `0cd7602d` chore: remove debug & update Next; `e05d7a6c` chore: add debug — run `git show` on any of them.
  • Change coupling: active-deputies.tsx ↔ active-officers.tsx apps/client/src/components/dispatch/active-units/deputies/active-deputies.tsx:1 — `apps/client/src/components/dispatch/active-units/deputies/active-deputies.tsx` and `apps/client/src/components/dispatch/active-units/officers/active-officers.tsx` change together 75% of the time (44 of the 59 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 44 shared commits counted here, the most recent 3 are `b95bd325` fix: patrol vehicle not showing; `aae52daa` feat: description emergency vehicle value (#1881); `b439a3fa` feat: use darkened color for active units — run `git show` on any of them.
  • Change coupling: my-deputies.tsx ↔ my-officers.tsx apps/client/src/pages/ems-fd/my-deputies.tsx:1 — `apps/client/src/pages/ems-fd/my-deputies.tsx` and `apps/client/src/pages/officer/my-officers.tsx` change together 74% of the time (17 of the 23 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 17 shared commits counted here, the most recent 3 are `6e67f325` chore: image quality improvements; `4bca92bd` chore: add image fallback wrapper failing images will show null or a …; `f5ebe76f` :hammer: chore: try decrease bundle size — run `git show` on any of them.
  • Change coupling: create-business-modal.tsx ↔ join-business-modal.tsx apps/client/src/components/business/create-business-modal.tsx:1 — `apps/client/src/components/business/create-business-modal.tsx` and `apps/client/src/components/business/join-business-modal.tsx` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `944dd30b` :tada: feat: allow admins to manage business owners (#1591) (at that commit the files were still `apps/client/src/components/business/CreateBusinessModal.tsx` and `apps/client/src/components/business/JoinBusinessModal.tsx`); `5baddf5c` :bug: fix: major bug fixes (citizens select fields) (at that commit the files were still `packages/client/src/components/business/CreateBusinessModal.tsx` and `packages/client/src/components/business/JoinBusinessModal.tsx`); `82749167` :bug: fix: unable to create/join businesses (closes #923) (at that commit the files were still `packages/client/src/components/business/CreateBusinessModal.tsx` and `packages/client/src/components/business/JoinBusinessModal.tsx`) — run `git show` on any of them.
  • Change coupling: get-active-ems-fd-deputy.ts ↔ activeOfficer.ts apps/api/src/lib/get-active-ems-fd-deputy.ts:1 — `apps/api/src/lib/get-active-ems-fd-deputy.ts` and `apps/api/src/lib/leo/activeOfficer.ts` change together 71% of the time (15 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `1280408e` fix: unit inactivity timeouts (#1876); `6453d3fa` :tada: feat: allow admins to use modal buttons (ref #1133) (#1147) (at that commit the file was still `apps/api/src/lib/ems-fd.ts`); `ab78674a` :bug: fix: 403 for get players (closes #1076) (at that commit the files were still `packages/api/src/lib/ems-fd.ts` and `packages/api/src/lib/leo/activeOfficer.ts`) — run `git show` on any of them.
  • Change coupling: manage-record-modal.tsx ↔ select-penal-code.tsx apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx:1 — `apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx` and `apps/client/src/components/leo/modals/manage-record/select-penal-code.tsx` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `6bd2271a` refactor: improve form-row component; `22c00bb2` 🎉 feat: ability to set court entry on tickets & arrest reports (#1328); `27034350` 🚀 Improve penal-code layout & UX (#1305) (at that commit the files were still `apps/client/src/components/leo/modals/ManageRecordModal.tsx` and `apps/client/src/components/leo/modals/ManageRecord/select-penal-code.tsx`) — run `git show` on any of them.
  • Change coupling: REDACTED ↔ index.tsx REDACTED:1 — `REDACTED` and `apps/client/src/pages/business/index.tsx` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `944dd30b` :tada: feat: allow admins to manage business owners (#1591); `e3453865` :bug: fix: correctly handle business creation (at that commit the files were still `packages/api/src/controllers/business/BusinessController.ts` and `packages/client/src/pages/business/index.tsx`); `1147d37c` :tada: feat: new `CreateBusinesses` permissions (closes #743) (at that commit the files were still `packages/api/src/controllers/business/BusinessController.ts` and `packages/client/src/pages/business/index.tsx`) — run `git show` on any of them.
  • Change coupling: login.tsx ↔ register.tsx apps/client/src/pages/auth/login.tsx:1 — `apps/client/src/pages/auth/login.tsx` and `apps/client/src/pages/auth/register.tsx` change together 56% of the time (23 of the 41 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 23 shared commits counted here, the most recent 3 are `9c79a3d2` feat: improved localhost error message; `e3d07ef4` feat: add API verification error message; `84af8541` :hammer: chore: add simple text — run `git show` on any of them.
  • Change coupling: usePanicButton.tsx ↔ useSignal100.tsx apps/client/src/hooks/shared/usePanicButton.tsx:1 — `apps/client/src/hooks/shared/usePanicButton.tsx` and `apps/client/src/hooks/shared/useSignal100.tsx` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `f83a66cc` feat: consistent alerts; `1d44cb71` :tada: feat: LEO/EMS/FD Tones (#871) (at that commit the files were still `packages/client/src/hooks/shared/usePanicButton.tsx` and `packages/client/src/hooks/shared/useSignal100.tsx`); `b81938df` :hammer: chore: minor fixes & improvements (at that commit the files were still `packages/client/src/hooks/shared/usePanicButton.tsx` and `packages/client/src/hooks/shared/useSignal100.tsx`) — run `git show` on any of them.
  • Change coupling: REDACTED ↔ department-fields.tsx REDACTED:1 — `REDACTED` and `apps/client/src/components/admin/values/manage-modal/department-fields.tsx` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `bea35c76` feat: able to add department links (#1786); `5409de8b` feat: custom template for department value (#1678); `2222dc4a` :tada: feat: Enable whitelisting & default rank for EMS/FD (WIP) (#736) (at that commit the files were still `packages/api/src/controllers/admin/values/Import.ts` and `packages/client/src/components/admin/values/manage-modal/DepartmentFields.tsx`) — run `git show` on any of them.
  • Change coupling: upsert-record.ts ↔ manage-record-modal.tsx apps/api/src/lib/leo/records/upsert-record.ts:1 — `apps/api/src/lib/leo/records/upsert-record.ts` and `apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx` change together 53% of the time (9 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `93e9a151` feat: draft records (#1886); `694b10e9` feat: vehicle speed information (#1807); `9f6b4647` feat: records rich text notes (#1745) — run `git show` on any of them.
  • Change coupling: medical-records.tsx ↔ weapons-card.tsx apps/client/src/components/citizen/medical-records/medical-records.tsx:1 — `apps/client/src/components/citizen/medical-records/medical-records.tsx` and `apps/client/src/components/citizen/weapons/weapons-card.tsx` change together 53% of the time (9 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `0279fe15` chore: improved loading for citizen page; `404ea4a2` :hammer: chore: improve colors (at that commit the files were still `packages/client/src/components/citizen/medical-records/MedicalRecords.tsx` and `packages/client/src/components/citizen/weapons/WeaponsCard.tsx`); `a5b86226` 🎉 feat: add table actions alignment (#368) (at that commit the files were still `packages/client/src/components/citizen/medical-records/MedicalRecords.tsx` and `packages/client/src/components/citizen/weapons/WeaponsCard.tsx`) — run `git show` on any of them.
  • Change coupling: REDACTED ↔ index.tsx REDACTED:1 — `REDACTED` and `apps/client/src/pages/admin/manage/units/index.tsx` change together 50% of the time (14 of the 28 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `7836fe75` Manage unit rank role (#1956); `38e64759` feat: unit/department time logs (#1473); `999956e6` :hammer: chore: add back department filtering (at that commit the file was still `apps/api/src/controllers/admin/manage/manage-units-controller.ts`) — run `git show` on any of them.
  • Change coupling: prisma.ts ↔ index.ts apps/api/src/lib/data/prisma.ts:1 — `apps/api/src/lib/data/prisma.ts` and `packages/schemas/src/admin/index.ts` change together 50% of the time (10 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `93c13956` chore: set min 10min for inactivity timeouts (#1874); `86f499e2` 🎉 feat: separated inacitivity filters (#1039) (at that commit the file was still `packages/api/src/lib/prisma.ts`); `5040f4c4` :tada: feat: support custom messages for webhooks (#705) (at that commit the file was still `packages/api/src/lib/prisma.ts`) — run `git show` on any of them.
  • Change coupling: REDACTED ↔ use-active-dispatchers.ts REDACTED:1 — `REDACTED` and `apps/client/src/hooks/realtime/use-active-dispatchers.ts` change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `c1105bf8` chore: small fixes; `f22df42c` chore: improve loading of active dispatchers (#1447) (at that commit the file was still `apps/client/src/hooks/realtime/useActiveDispatchers.ts`); `9b068b45` 🚀 feat: improve loading of units (#1423) (at that commit the file was still `apps/client/src/hooks/realtime/useActiveDispatchers.ts`) — run `git show` on any of them.
  • Change coupling: REDACTED ↔ REDACTED REDACTED:1 — `REDACTED` and `REDACTED` change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `e04dd940` feat(webhook): citizen dead & bleeter post webhooks; `8d6492a4` :hammer: chore: warn user image upload error (closes #1360) (at that commit the file was still `apps/api/src/controllers/bleeter/BleeterController.ts`); `a4cb1ad7` :bug: fix: bust image cache when image is updated (at that commit the file was still `apps/api/src/controllers/bleeter/BleeterController.ts`) — run `git show` on any of them.
  • Change coupling: modal-ids.ts ↔ search.ts apps/client/src/types/modal-ids.ts:1 — `apps/client/src/types/modal-ids.ts` and `packages/types/src/api/search.ts` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `49fd8a29` feat: ability to add weapon flags (#1742); `e59595d4` feat: license points (#1636) (at that commit the file was still `apps/client/src/types/ModalIds.ts`); `36b4c89c` feat: doctor visits (#1631) (at that commit the file was still `apps/client/src/types/ModalIds.ts`) — run `git show` on any of them.
D17 · Explicit Debt · TodoComment · ×12
  • TodoComment packages/ui/src/components/dropdown.tsx:46 — // todo: cn — 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 packages/ui/src/components/dropdown.tsx:70 — // todo: cn — 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 packages/types/src/api.ts:118 — // todo: add cad properties — 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 apps/client/src/components/shared/table/table-pagination.tsx:24 — // todo: add loading states if applicable — 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 apps/client/src/components/leo/modals/NameSearchModal/tabs/weapons-tab.tsx:24 — // todo: set correct data for `allCustomFields` and `customFields` — 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 apps/client/src/components/leo/incidents/manage-incident-modal.tsx:69 — // todo: make this an optional feature — 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 apps/client/src/components/dispatch/active-calls/modals/manage-911-call-modal.tsx:59 — // todo: make this an optional feature — 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 apps/client/src/components/admin/manage/units/tabs/all-units-tab.tsx:218 — // todo: add information about temporary unit here — 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:728 — // todo: copied from client/lib/utils. — 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:163 — // todo: check for LEO perms — 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:383 — // todo: replace from /players/:steamId — 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:117 — // todo — 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×12
  • Low cohesion: EmsFdController (LCOM4 14) REDACTED:51 — EmsFdController's methods fall into 14 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 14 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: AdminManageUnitsController (LCOM4 13) REDACTED:66 — AdminManageUnitsController'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: ManageUsersController (LCOM4 13) REDACTED:56 — ManageUsersController'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: CADSettingsController (LCOM4 11) REDACTED:41 — CADSettingsController's methods fall into 11 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 11 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: DispatchController (LCOM4 9) REDACTED:32 — DispatchController'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: RecordsController (LCOM4 9) REDACTED:64 — RecordsController'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: UserController (LCOM4 6) REDACTED:34 — UserController's methods fall into 6 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 6 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: VehiclesController (LCOM4 6) REDACTED:44 — VehiclesController's methods fall into 6 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 6 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: LeoController (LCOM4 6) REDACTED:29 — LeoController's methods fall into 6 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 6 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: IncidentController (LCOM4 5) REDACTED:41 — IncidentController'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.
  • Low cohesion: Calls911Controller (LCOM4 4) REDACTED:50 — Calls911Controller's methods fall into 4 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 4 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: IncidentController (LCOM4 4) REDACTED:39 — IncidentController's methods fall into 4 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 4 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.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×11
  • Sync-over-async blocking REDACTED:122 — `existsSync` in `handleUploadFavicon` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:417 — `genSaltSync` in `giveUserTempPassword` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:423 — `hashSync` in `giveUserTempPassword` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:52 — `compareSync` in `enable2FA` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:96 — `compareSync` in `disable2FA` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking apps/api/src/controllers/auth/auth-controller.ts:84 — `compareSync` in `login` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking apps/api/src/controllers/auth/auth-controller.ts:160 — `genSaltSync` in `register` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking apps/api/src/controllers/auth/auth-controller.ts:162 — `hashSync` in `register` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:270 — `compareSync` in `updatePassword` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:280 — `genSaltSync` in `updatePassword` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:286 — `hashSync` in `updatePassword` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
X2 · Cancellation propagation · Async function without AbortSignal · ×11
  • Async function without AbortSignal: getLatestReleaseVersion packages/utils/src/version.ts:50 — `getLatestReleaseVersion` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: handleRequest apps/client/src/lib/fetch.ts:17 — `handleRequest` awaits `axios(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `axios(url, { signal })`.
  • Async function without AbortSignal: fetchImageData apps/client/src/components/form/inputs/ImageSelectInput.tsx:50 — `fetchImageData` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: generateBlips apps/client/src/components/dispatch/map/render-map-blips.tsx:33 — `generateBlips` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchLatestVersion apps/api/src/utils/check-for-updates.ts:5 — `fetchLatestVersion` awaits `request(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `request(url, { signal })`.
  • Async function without AbortSignal: fetchImageURLData apps/api/src/lib/images/generate-image-blur-data.ts:44 — `fetchImageURLData` awaits `request(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `request(url, { signal })`.
  • Async function without AbortSignal: sendRawWebhook apps/api/src/lib/discord/webhooks.ts:56 — `sendRawWebhook` awaits `request(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `request(url, { signal })`.
  • Async function without AbortSignal: validateGoogleCaptcha apps/api/src/lib/auth/validate-google-captcha.ts:14 — `validateGoogleCaptcha` awaits `request(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `request(url, { signal })`.
  • Async function without AbortSignal: getDiscordData REDACTED:222 — `getDiscordData` awaits `request(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `request(url, { signal })`.
  • Async function without AbortSignal: getSteamData REDACTED:186 — `getSteamData` awaits `request(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `request(url, { signal })`.
  • Async function without AbortSignal: getChangelog REDACTED:112 — `getChangelog` awaits `request(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `request(url, { signal })`.
AC2 · Forms & labels · <ImageSelectInput> field component without a label · ×10
  • <ImageSelectInput> field component without a label apps/client/src/components/admin/manage/custom-roles/manage-custom-roles-modal.tsx:168 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <ImageSelectInput> field component without a label apps/client/src/components/admin/manage/units/tabs/manage-unit-tab/manage-unit-tab.tsx:138 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <ImageSelectInput> field component without a label apps/client/src/components/admin/values/ManageValueModal.tsx:400 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <ImageSelectInput> field component without a label apps/client/src/components/admin/values/manage-modal/qualification-fields.tsx:53 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <ImageSelectInput> field component without a label apps/client/src/components/admin/values/manage-modal/vehicle-fields.tsx:29 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <ImageSelectInput> field component without a label apps/client/src/components/citizen/ManageCitizenForm.tsx:196 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <ImageSelectInput> field component without a label apps/client/src/components/citizen/pets/manage-pet-modal.tsx:125 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <ImageSelectInput> field component without a label apps/client/src/components/citizen/vehicles/modals/register-vehicle-modal.tsx:191 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <ImageSelectInput> field component without a label apps/client/src/components/ems-fd/modals/deputy/manage-deputy-modal.tsx:130 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <ImageSelectInput> field component without a label apps/client/src/components/leo/manage-officer/manage-officer-fields.tsx:39 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
D12 · Dependency Hygiene · Deprecated · ×8
  • Deprecated: glob REDACTED:78 — glob 10.4.1, declared in REDACTED, is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: multer REDACTED:82 — multer 1.4.5-lts.1, declared in REDACTED, is marked deprecated by its publisher: "Multer 1.x is impacted by a number of vulnerabilities, which have been patched in 2.x. You should upgrade to the latest 2.x version.". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: puppeteer REDACTED:87 — puppeteer 24.11.1, declared in REDACTED, is marked deprecated by its publisher: "< 24.15.0 is no longer supported". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: next REDACTED:65 — next 14.0.3, declared in REDACTED, is marked deprecated by its publisher: "This version has a security vulnerability. Please upgrade to a patched version. See https://nextjs.org/blog/security-update-2025-12-11 for more details.". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: uuid REDACTED:96 — uuid 10.0.0, declared in REDACTED, is marked deprecated by its publisher: "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: eslint REDACTED:24 — eslint 8.56.0, declared in REDACTED, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: @storybook/jest REDACTED:28 — @storybook/jest 0.2.3, declared in REDACTED, is marked deprecated by its publisher: "In Storybook 8, this package functionality has been integrated to a new package called @storybook/test, which uses Vitest APIs for an improved experience. When upgrading to Storybook 8 with 'npx storybook@latest upgrade', you will get prompted and will get an automigration for the new package. Please migrate when you can.". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: @storybook/testing-library REDACTED:32 — @storybook/testing-library 0.2.2, declared in REDACTED, is marked deprecated by its publisher: "In Storybook 8, this package functionality has been integrated to a new package called @storybook/test, which uses Vitest APIs for an improved experience. When upgrading to Storybook 8 with 'npx storybook@latest upgrade', you will get prompted and will get an automigration for the new package. Please migrate when you can.". Replace it with the package or version that message names, or record why this one must stay.
AC2 · Forms & labels · <AddressPostalSelect> field component without a label · ×7
  • <AddressPostalSelect> field component without a label apps/client/src/components/business/create-business-modal.tsx:89 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <AddressPostalSelect> field component without a label apps/client/src/components/citizen/ManageCitizenForm.tsx:326 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <AddressPostalSelect> field component without a label apps/client/src/components/citizen/tow/manage-tow-call.tsx:144 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <AddressPostalSelect> field component without a label apps/client/src/components/dispatch/active-calls/modals/call-tow-modal.tsx:100 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <AddressPostalSelect> field component without a label apps/client/src/components/dispatch/active-calls/modals/manage-911-call-form.tsx:152 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <AddressPostalSelect> field component without a label apps/client/src/components/leo/incidents/manage-incident-modal.tsx:296 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <AddressPostalSelect> field component without a label apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx:412 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
D3 · God Classes · ClassTooLong · ×7
  • ClassTooLong: AdminManageUnitsController REDACTED:66 — ClassTooLong — 595 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 195 over it, 1.49× 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.
  • ClassTooLong: SearchActionsController apps/api/src/controllers/leo/search/SearchActionsController.ts:54 — ClassTooLong — 449 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 49 over it, 1.12× 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.
  • ClassTooLong: VehiclesController REDACTED:44 — ClassTooLong — 411 significant lines (blank, comment-only and punctuation-only lines excluded), 8 methods. The bar is 400 significant lines; this is 11 over it, 1.03× 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.
  • ClassTooLong: ManageLicensesFormFields apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx:1 — ClassTooLong — 409 significant lines (blank, comment-only and punctuation-only lines excluded), 9 methods. The bar is 400 significant lines; this is 9 over it, 1.02× 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.
  • ClassTooLong: RecordsController REDACTED:64 — ClassTooLong — 406 significant lines (blank, comment-only and punctuation-only lines excluded), 13 methods. The bar is 400 significant lines; this is 6 over it, 1.02× 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.
  • ClassTooLong: Calls911Controller REDACTED:50 — ClassTooLong — 404 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 4 over it, 1.01× 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.
  • ClassTooLong: ManageUsersController REDACTED:56 — ClassTooLong — 403 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 3 over it, 1.01× 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.
AC2 · Forms & labels · <Input> field component without a label · ×6
  • <Input> field component without a label apps/client/src/components/dispatch/map/smart-signs/smart-sign-marker.tsx:89 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label apps/client/src/components/dispatch/map/smart-signs/smart-sign-marker.tsx:99 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label apps/client/src/components/dispatch/map/smart-signs/smart-sign-marker.tsx:109 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label apps/client/src/components/leo/modals/manage-record/table-item-form.tsx:198 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label apps/client/src/components/leo/modals/manage-record/table-item-form.tsx:252 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label apps/client/src/components/leo/modals/manage-record/table-item-form.tsx:270 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC2 · Forms & labels · <Select> field component without a label · ×5
  • <Select> field component without a label apps/client/src/components/admin/manage/cad-settings/discord-webhooks/WebhookSettingsField.tsx:45 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label apps/client/src/components/dispatch/modals/temporary-units/create-temporary-unit-modal.tsx:137 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label apps/client/src/components/dispatch/modals/temporary-units/create-temporary-unit-modal.tsx:152 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label apps/client/src/components/leo/modals/manage-record/select-penal-code.tsx:43 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label apps/client/src/components/leo/modals/manage-record/select-penal-code.tsx:54 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
R8 · Dependency Hygiene · Unused dependency 'tslib' · ×4
  • Unused dependency 'tslib' REDACTED:93 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency 'tslib' REDACTED:34 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency 'tslib' REDACTED:121 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency 'tslib' REDACTED:107 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
AC3 · Page structure · Heading level jumps from h1 to h3 · ×3
  • Heading level jumps from h1 to h3 apps/client/src/components/auth/api-verification.tsx:56 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 apps/client/src/components/auth/api-verification.tsx:145 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 apps/client/src/components/auth/localhost-detector.tsx:47 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC6 · Visual & motion safety · Focus outline removed inline · ×3
  • Focus outline removed inline apps/client/src/components/editor/elements/checklist-item.tsx:27 — <span> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline packages/ui/src/components/inputs/input.tsx:9 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline packages/ui/src/components/inputs/textarea.tsx:10 — <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
D3 · God Classes · FileTooLong · ×3
  • FileTooLong: REDACTED REDACTED — FileTooLong — 691 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: AdminManageUnitsController (69-992). The bar is 500 significant lines; this is 191 over it, 1.38× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 529 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: RecordsController (67-660). The bar is 500 significant lines; this is 29 over it, 1.06× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: search/SearchActionsController.ts apps/api/src/controllers/leo/search/SearchActionsController.ts — FileTooLong — 504 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: SearchActionsController (57-747). The bar is 500 significant lines; this is 4 over it, 1.01× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
D36 · Supply-chain Provenance & Signing · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
R10 · Code Duplication · Duplicated block with local edits (90 matched lines × 2 locations) · ×3
  • Duplicated block with local edits (90 matched lines × 2 locations) REDACTED:24 — REDACTED:24 · REDACTED:20 — the two spans are one implementation copied and then locally edited — 564 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (90 matched lines × 2 locations) apps/client/src/components/ems-fd/modals/deputy/select-deputy-modal.tsx:33 — apps/client/src/components/ems-fd/modals/deputy/select-deputy-modal.tsx:33 · apps/client/src/components/leo/modals/select-officer-modal.tsx:48 — the two spans are one implementation copied and then locally edited — 538 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (90 matched lines × 2 locations) apps/client/src/components/ems-fd/modals/search-medical-records/search-medical-records-modal.tsx:127 — apps/client/src/components/ems-fd/modals/search-medical-records/search-medical-records-modal.tsx:127 · apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx:195 — the two spans are one implementation copied and then locally edited — 519 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×3
  • Swallowed exception (caught, then discarded) apps/api/src/lib/discord/auth.ts:33 — `catch` 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, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) REDACTED:39 — `catch` 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, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) REDACTED:51 — `catch` 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, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
AC3 · Page structure · Page without a main landmark · ×2
  • Page without a main landmark apps/api/src/templates/citizen-criminal-record.ejs: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 apps/api/src/templates/record.ejs:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×2
  • Animation without a prefers-reduced-motion guard packages/ui/src/components/loader.tsx:12 — <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard apps/client/src/styles/globals.css:132 — `.dropdown-fade` moves (`animation: dropdownFade 100ms ease-out forwards`) 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.
D1 · Cyclomatic Complexity · zod-error-map.getErrorMap.errorMap (cyclomatic 46) · ×2
  • zod-error-map.getErrorMap.errorMap (cyclomatic 46) apps/api/src/utils/zod-error-map.ts:17 — zod-error-map.getErrorMap.errorMap has cyclomatic complexity 46 (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.
  • zod-error-map.getErrorMap.errorMap (cyclomatic 46) apps/client/src/lib/validation/zod-error-map.ts:22 — zod-error-map.getErrorMap.errorMap has cyclomatic complexity 46 (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.
D2 · Cognitive Complexity · zod-error-map.getErrorMap.errorMap (cognitive 81) · ×2
  • zod-error-map.getErrorMap.errorMap (cognitive 81) apps/api/src/utils/zod-error-map.ts:17 — zod-error-map.getErrorMap.errorMap has cognitive complexity 81 (threshold 15). Drivers by points: ternaries 16 (56 pts), if/else 18 (24 pts), match/switch 1 (nesting depth added 46). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • zod-error-map.getErrorMap.errorMap (cognitive 81) apps/client/src/lib/validation/zod-error-map.ts:22 — zod-error-map.getErrorMap.errorMap has cognitive complexity 81 (threshold 15). Drivers by points: ternaries 16 (56 pts), if/else 18 (24 pts), match/switch 1 (nesting depth added 46). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D31 · IaC & Container Security · Medium IaC · ×2
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change coupling clique · ×2
  • Change coupling clique: manage-medical-records-modal.tsx, create-medical-record-modal.tsx, search-medical-records-modal.tsx apps/client/src/components/citizen/medical-records/manage-medical-records-modal.tsx — 3 files — `apps/client/src/components/citizen/medical-records/manage-medical-records-modal.tsx`, `apps/client/src/components/ems-fd/modals/create-medical-record-modal.tsx`, `apps/client/src/components/ems-fd/modals/search-medical-records/search-medical-records-modal.tsx` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
  • Change coupling clique: index.tsx, index.tsx, index.tsx apps/client/src/pages/dispatch/index.tsx — 3 files — `apps/client/src/pages/dispatch/index.tsx`, `apps/client/src/pages/ems-fd/index.tsx`, `apps/client/src/pages/officer/index.tsx` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D5 · Coupling · Off the main sequence · ×2
  • Off the main sequence: @snailycad/permissions — @snailycad/permissions: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: @snailycad/utils — @snailycad/utils: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
R10 · Code Duplication · Duplication concentrated across 5 sibling directories (6 clone groups) · ×2
  • Duplication concentrated across 5 sibling directories (6 clone groups) apps/api/src/controllers/leo/my-officers/upsert-officer.ts:143 — 6 duplicated blocks under apps/api/src/ have copies in at least two of the sibling directories controllers, lib, middlewares, migrations, utils — 4 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
  • Duplication concentrated across 5 sibling directories (6 clone groups) apps/client/src/components/leo/incidents/manage-incident-modal.tsx:324 — 6 duplicated blocks under apps/client/src/components/leo/ have copies in at least two of the sibling directories call-history, exams, incidents, jail, modals — 2 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 6 sibling directories (5 clone groups) · ×2
  • Duplication concentrated across 6 sibling directories (5 clone groups) apps/client/src/components/admin/manage/cad-settings/default-permissions-tab.tsx:94 — 5 duplicated blocks under apps/client/src/components/admin/manage/ have copies in at least two of the sibling directories cad-settings, citizens, custom-fields, custom-roles, units, users — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
  • Duplication concentrated across 6 sibling directories (5 clone groups) apps/client/src/components/leo/modals/business-search-modal/business-search-modal.tsx:99 — 5 of the duplicated blocks reported below have copies in at least two of the sibling directories CustomFieldSearch, NameSearchModal, VehicleSearch, business-search-modal, manage-record, weapon-search under apps/client/src/components/leo/modals/. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R2 · Cyclomatic Complexity · Complex function errorMap (cyclomatic 46, cognitive 73) · ×2
  • Complex function errorMap (cyclomatic 46, cognitive 73) apps/api/src/utils/zod-error-map.ts:17 — errorMap has cyclomatic complexity 46 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function errorMap (cyclomatic 46, cognitive 73) apps/client/src/lib/validation/zod-error-map.ts:22 — errorMap has cyclomatic complexity 46 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 17, cognitive 16) · ×2
  • Complex function (anonymous) (cyclomatic 17, cognitive 16) REDACTED:119 — (anonymous) has cyclomatic complexity 17 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function (anonymous) (cyclomatic 17, cognitive 16) apps/client/src/components/dispatch/active-units/deputies/active-deputies.tsx:109 — (anonymous) has cyclomatic complexity 17 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R7 · Dead Code · Dead file (~399 LoC) · ×2
  • Dead file (~399 LoC) apps/api/src/controllers/dispatch/status-controller.ts — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~399 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 5 in-repo import(s) from 5 other file(s) do name it (REDACTED, REDACTED, apps/api/src/controllers/leo/incidents/0IncidentEventsController.ts and 2 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~284 LoC) · ×2
  • Dead file (~284 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
  • Dead file (~284 LoC) apps/api/src/controllers/citizen/weapon-controller.ts — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
X3 · Exception handling · Swallowed exception (empty catch) · ×2
  • Swallowed exception (empty catch) apps/api/src/lib/leo/records/create-citizen-violations.ts:23 — 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) apps/api/src/lib/discord/register-metadata.ts:38 — 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.
AC2 · Forms & labels · <Textarea> field component without a label · ×1
  • <Textarea> field component without a label apps/client/src/components/leo/modals/manage-record/table-item-form.tsx:225 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC3 · Page structure · Heading level jumps from h1 to h4 · ×1
  • Heading level jumps from h1 to h4 apps/client/src/components/account/user-connections-tab.tsx:79 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
D1 · Cyclomatic Complexity · ManageValueModal.createInitialValues (cyclomatic 68) · ×1
  • ManageValueModal.createInitialValues (cyclomatic 68) apps/client/src/components/admin/values/ManageValueModal.tsx:92 — ManageValueModal.createInitialValues has cyclomatic complexity 68 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ManageLicensesFormFields.ManageLicensesFormFields (cyclomatic 55) · ×1
  • ManageLicensesFormFields.ManageLicensesFormFields (cyclomatic 55) apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx:75 — ManageLicensesFormFields.ManageLicensesFormFields 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.
D1 · Cyclomatic Complexity · NameSearchModal.NameSearchModal (cyclomatic 54) · ×1
  • NameSearchModal.NameSearchModal (cyclomatic 54) apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx:66 — NameSearchModal.NameSearchModal has cyclomatic complexity 54 (threshold 15). Most of this is not in the body itself: 5 of the 54 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 176, onSubmit, a function literal at line 242, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · StatusController.updateUnitStatus (cyclomatic 49) · ×1
  • StatusController.updateUnitStatus (cyclomatic 49) apps/api/src/controllers/dispatch/status-controller.ts:52 — StatusController.updateUnitStatus has cyclomatic complexity 49 (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.
D1 · Cyclomatic Complexity · VehicleSearchModal.VehicleSearchModal (cyclomatic 43) · ×1
  • VehicleSearchModal.VehicleSearchModal (cyclomatic 43) apps/client/src/components/leo/modals/VehicleSearchModal.tsx:31 — VehicleSearchModal.VehicleSearchModal has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 12 of the 43 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 146, handleMarkStolen, a function literal at line 60, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · upsert-record.upsertRecord (cyclomatic 42) · ×1
  • upsert-record.upsertRecord (cyclomatic 42) apps/api/src/lib/leo/records/upsert-record.ts:30 — upsert-record.upsertRecord has cyclomatic complexity 42 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · manage-incident-modal.ManageIncidentModal (cyclomatic 42) · ×1
  • manage-incident-modal.ManageIncidentModal (cyclomatic 42) apps/client/src/components/leo/incidents/manage-incident-modal.tsx:74 — manage-incident-modal.ManageIncidentModal has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 15 of the 42 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 199, onSubmit, a function literal at line 121). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · use-active-calls.useActiveCalls (cyclomatic 37) · ×1
  • use-active-calls.useActiveCalls (cyclomatic 37) apps/client/src/hooks/realtime/use-active-calls.tsx:28 — use-active-calls.useActiveCalls has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 1 of the 37 points is its own statement and the rest belongs to 8 function items inside it that branch (handleAssignedToCallSpeech, handleShowToastAssignedToCall, a function literal at line 201, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · player-marker.PlayerMarker (cyclomatic 35) · ×1
  • player-marker.PlayerMarker (cyclomatic 35) apps/client/src/components/dispatch/map/units/player-marker.tsx:28 — player-marker.PlayerMarker has cyclomatic complexity 35 (threshold 15). Of this number, 27 points are the body's own statements and 8 belong to 2 function literals inside it that branch. 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.
D1 · Cyclomatic Complexity · search-medical-records-modal.SearchMedicalRecordModal (cyclomatic 35) · ×1
  • search-medical-records-modal.SearchMedicalRecordModal (cyclomatic 35) apps/client/src/components/ems-fd/modals/search-medical-records/search-medical-records-modal.tsx:39 — search-medical-records-modal.SearchMedicalRecordModal has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 7 function items inside it that branch (a function literal at line 109, handleDeclare, a function literal at line 136, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · statuses-area.StatusesArea (cyclomatic 34) · ×1
  • statuses-area.StatusesArea (cyclomatic 34) apps/client/src/components/shared/utility-panel/statuses-area.tsx:39 — statuses-area.StatusesArea has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 14 of the 34 points are its own statements and the rest belongs to 7 function items inside it that branch (handleStatusUpdate, a function literal at line 189, handleOnDuty, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ManageValueModal.ManageValueModal (cyclomatic 33) · ×1
  • ManageValueModal.ManageValueModal (cyclomatic 33) apps/client/src/components/admin/values/ManageValueModal.tsx:164 — ManageValueModal.ManageValueModal has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 3 of the 33 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 312, validate, onSubmit, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · table-item-form.TableItemForm (cyclomatic 33) · ×1
  • table-item-form.TableItemForm (cyclomatic 33) apps/client/src/components/leo/modals/manage-record/table-item-form.tsx:81 — table-item-form.TableItemForm has cyclomatic complexity 33 (threshold 15). Of this number, 31 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ManageCitizenForm.ManageCitizenForm (cyclomatic 31) · ×1
  • ManageCitizenForm.ManageCitizenForm (cyclomatic 31) apps/client/src/components/citizen/ManageCitizenForm.tsx:54 — ManageCitizenForm.ManageCitizenForm has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 12 of the 31 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 149, handleSubmit, a function literal at line 135, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · manage-911-call-form.Manage911CallForm (cyclomatic 31) · ×1
  • manage-911-call-form.Manage911CallForm (cyclomatic 31) apps/client/src/components/dispatch/active-calls/modals/manage-911-call-form.tsx:33 — manage-911-call-form.Manage911CallForm has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 128, onSubmit, handleEndClick, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · manage-record-modal.ManageRecordModal (cyclomatic 31) · ×1
  • manage-record-modal.ManageRecordModal (cyclomatic 31) apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx:186 — manage-record-modal.ManageRecordModal has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 7 of the 31 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 342, onSubmit, a function literal at line 200, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · active-officers.ActiveOfficers (cyclomatic 30) · ×1
  • active-officers.ActiveOfficers (cyclomatic 30) apps/client/src/components/dispatch/active-units/officers/active-officers.tsx:55 — active-officers.ActiveOfficers has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 14 of the 30 points are its own statements and the rest belongs to one function literal inside it that branches (line 132). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · values.useTableDataOfType.get (cyclomatic 29) · ×1
  • values.useTableDataOfType.get (cyclomatic 29) apps/client/src/lib/admin/values/values.tsx:43 — values.useTableDataOfType.get has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · incidents-table.IncidentsTable (cyclomatic 28) · ×1
  • incidents-table.IncidentsTable (cyclomatic 28) apps/client/src/components/leo/incidents/incidents-table.tsx:34 — incidents-table.IncidentsTable has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 11 of the 28 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 142, handlePurge, handleDelete, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · AdminManageUnitsController.getTimeGroupedByUnit (cyclomatic 27) · ×1
  • AdminManageUnitsController.getTimeGroupedByUnit (cyclomatic 27) apps/api/src/controllers/admin/manage/units/department-time-logs-controller.ts:22 — AdminManageUnitsController.getTimeGroupedByUnit has cyclomatic complexity 27 (threshold 15). Of this number, 18 points are the body's own statements and 9 belong to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · register-vehicle-modal.RegisterVehicleModal (cyclomatic 27) · ×1
  • register-vehicle-modal.RegisterVehicleModal (cyclomatic 27) apps/client/src/components/citizen/vehicles/modals/register-vehicle-modal.tsx:52 — register-vehicle-modal.RegisterVehicleModal has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 8 of the 27 points are its own statements and the rest belongs to 5 function items inside it that branch (onSubmit, a function literal at line 189, handleImageUpload, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · [id].ManageCitizens (cyclomatic 27) · ×1
  • [id].ManageCitizens (cyclomatic 27) apps/client/src/pages/admin/manage/users/[id].tsx:65 — [id].ManageCitizens has cyclomatic complexity 27 (threshold 15). Of this number, 16 points are the body's own statements and 11 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · async-list-search-field.AsyncListSearchField (cyclomatic 27) · ×1
  • async-list-search-field.AsyncListSearchField (cyclomatic 27) packages/ui/src/components/fields/async-list-search-field.tsx:55 — async-list-search-field.AsyncListSearchField has cyclomatic complexity 27 (threshold 15). Of this number, 19 points are the body's own statements and 8 belong to one function item inside it that branches. 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.
D1 · Cyclomatic Complexity · all-units-tab.AllUnitsTab (cyclomatic 26) · ×1
  • all-units-tab.AllUnitsTab (cyclomatic 26) apps/client/src/components/admin/manage/units/tabs/all-units-tab.tsx:50 — all-units-tab.AllUnitsTab has cyclomatic complexity 26 (threshold 15). Of this number, 14 points are the body's own statements and 12 belong to 3 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · officer-column.OfficerColumn (cyclomatic 26) · ×1
  • officer-column.OfficerColumn (cyclomatic 26) apps/client/src/components/dispatch/active-units/officers/columns/officer-column.tsx:41 — officer-column.OfficerColumn has cyclomatic complexity 26 (threshold 15). Of this number, 17 points are the body's own statements and 9 belong to 4 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · [path].ValuePath (cyclomatic 26) · ×1
  • [path].ValuePath (cyclomatic 26) apps/client/src/pages/admin/values/[path].tsx:76 — [path].ValuePath has cyclomatic complexity 26 (threshold 15). Of this number, 15 points are the body's own statements and 11 belong to 6 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · validate-record-data.validateRecordData (cyclomatic 25) · ×1
  • validate-record-data.validateRecordData (cyclomatic 25) apps/api/src/lib/leo/records/validate-record-data.ts:29 — validate-record-data.validateRecordData has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · deputy-column.DeputyColumn (cyclomatic 25) · ×1
  • deputy-column.DeputyColumn (cyclomatic 25) apps/client/src/components/dispatch/active-units/deputies/deputy-column.tsx:42 — deputy-column.DeputyColumn has cyclomatic complexity 25 (threshold 15). Of this number, 16 points are the body's own statements and 9 belong to 4 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · upsert-officer.upsertOfficer (cyclomatic 24) · ×1
  • upsert-officer.upsertOfficer (cyclomatic 24) apps/api/src/controllers/leo/my-officers/upsert-officer.ts:50 — upsert-officer.upsertOfficer has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · login-form.LoginForm (cyclomatic 24) · ×1
  • login-form.LoginForm (cyclomatic 24) apps/client/src/components/auth/login/login-form.tsx:29 — login-form.LoginForm has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 6 of the 24 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 111, onSubmit, handleContinueAs). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · add-unit-to-call-modal.AddUnitToCallModal (cyclomatic 24) · ×1
  • add-unit-to-call-modal.AddUnitToCallModal (cyclomatic 24) apps/client/src/components/dispatch/active-calls/modals/add-unit-to-call-modal.tsx:36 — add-unit-to-call-modal.AddUnitToCallModal has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 8 function items inside it that branch (a function literal at line 192, a function literal at line 266, a function literal at line 55, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · active-deputies.ActiveDeputies (cyclomatic 24) · ×1
  • active-deputies.ActiveDeputies (cyclomatic 24) apps/client/src/components/dispatch/active-units/deputies/active-deputies.tsx:36 — active-deputies.ActiveDeputies has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 11 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 109). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useFetch.useFetch.execute (cyclomatic 24) · ×1
  • useFetch.useFetch.execute (cyclomatic 24) apps/client/src/lib/useFetch.tsx:57 — useFetch.useFetch.execute has cyclomatic complexity 24 (threshold 15). Of this number, 19 points are the body's own statements and 5 belong to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · AuthContext.AuthProvider (cyclomatic 23) · ×1
  • AuthContext.AuthProvider (cyclomatic 23) apps/client/src/context/AuthContext.tsx:38 — AuthContext.AuthProvider has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 5 of the 23 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 47, 103, 90, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.CitizenId (cyclomatic 23) · ×1
  • index.CitizenId (cyclomatic 23) apps/client/src/pages/citizen/[id]/index.tsx:48 — index.CitizenId has cyclomatic complexity 23 (threshold 15). Of this number, 16 points are the body's own statements and 7 belong to 3 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · AdminManageUnitsController.acceptOrDeclineUnit (cyclomatic 22) · ×1
  • AdminManageUnitsController.acceptOrDeclineUnit (cyclomatic 22) REDACTED:645 — AdminManageUnitsController.acceptOrDeclineUnit 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.
D1 · Cyclomatic Complexity · manage-unit-tab.ManageUnitTab (cyclomatic 22) · ×1
  • manage-unit-tab.ManageUnitTab (cyclomatic 22) apps/client/src/components/admin/manage/units/tabs/manage-unit-tab/manage-unit-tab.tsx:35 — manage-unit-tab.ManageUnitTab has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 106, onSubmit, a function literal at line 197, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · EventItem.EventItem (cyclomatic 22) · ×1
  • EventItem.EventItem (cyclomatic 22) apps/client/src/components/dispatch/events/EventItem.tsx:32 — EventItem.EventItem has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 82, deleteEvent, a function literal at line 92). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · use-map-players.useMapPlayers (cyclomatic 22) · ×1
  • use-map-players.useMapPlayers (cyclomatic 22) apps/client/src/hooks/realtime/use-map-players.tsx:35 — use-map-players.useMapPlayers has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 57, 103, 223, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · VehiclesController.updateVehicle (cyclomatic 21) · ×1
  • VehiclesController.updateVehicle (cyclomatic 21) REDACTED:298 — VehiclesController.updateVehicle has cyclomatic complexity 21 (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.
D1 · Cyclomatic Complexity · manage-2fa-modal.Manage2FAModal (cyclomatic 21) · ×1
  • manage-2fa-modal.Manage2FAModal (cyclomatic 21) apps/client/src/components/account/2fa/manage-2fa-modal.tsx:24 — manage-2fa-modal.Manage2FAModal has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch (onSubmit, a function literal at line 134, onCancel). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · manage-tow-call.ManageCallModal (cyclomatic 21) · ×1
  • manage-tow-call.ManageCallModal (cyclomatic 21) apps/client/src/components/citizen/tow/manage-tow-call.tsx:38 — manage-tow-call.ManageCallModal has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch (onSubmit, a function literal at line 133, handleEndCall). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · merge-unit-modal.MergeUnitModal (cyclomatic 21) · ×1
  • merge-unit-modal.MergeUnitModal (cyclomatic 21) apps/client/src/components/dispatch/active-units/modals/merge-unit-modal.tsx:39 — merge-unit-modal.MergeUnitModal has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 6 function items inside it that branch (onSubmit, a function literal at line 156, a function literal at line 75, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · manage-bolo-modal.ManageBoloModal (cyclomatic 20) · ×1
  • manage-bolo-modal.ManageBoloModal (cyclomatic 20) apps/client/src/components/active-bolos/manage-bolo-modal.tsx:24 — manage-bolo-modal.ManageBoloModal has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 121, onSubmit, a function literal at line 185, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · active-calls.Active911Calls (cyclomatic 20) · ×1
  • active-calls.Active911Calls (cyclomatic 20) apps/client/src/components/dispatch/active-calls/active-calls.tsx:32 — active-calls.Active911Calls has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to 4 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · ModalButtons.ModalButtons (cyclomatic 20) · ×1
  • ModalButtons.ModalButtons (cyclomatic 20) apps/client/src/components/leo/ModalButtons.tsx:49 — ModalButtons.ModalButtons has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to 2 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · records-tab.RecordsTable (cyclomatic 20) · ×1
  • records-tab.RecordsTable (cyclomatic 20) apps/client/src/components/leo/modals/NameSearchModal/tabs/records-tab.tsx:145 — records-tab.RecordsTable has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 246, a function literal at line 247, handleDeleteClick, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · footer-actions.NameSearchFooterActions (cyclomatic 20) · ×1
  • footer-actions.NameSearchFooterActions (cyclomatic 20) apps/client/src/components/leo/modals/NameSearchModal/sections/footer-actions.tsx:26 — footer-actions.NameSearchFooterActions has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 belong to 4 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · business-search-modal.BusinessSearchModal (cyclomatic 20) · ×1
  • business-search-modal.BusinessSearchModal (cyclomatic 20) apps/client/src/components/leo/modals/business-search-modal/business-search-modal.tsx:21 — business-search-modal.BusinessSearchModal has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 4 function items inside it that branch (onSubmit, a function literal at line 89, a function literal at line 33, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · DiscordAuth.handleCallbackFromDiscord (cyclomatic 19) · ×1
  • DiscordAuth.handleCallbackFromDiscord (cyclomatic 19) REDACTED:56 — DiscordAuth.handleCallbackFromDiscord has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function item inside it that branches. 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.
D1 · Cyclomatic Complexity · SteamOAuthController.handleCallbackFromSteam (cyclomatic 19) · ×1
  • SteamOAuthController.handleCallbackFromSteam (cyclomatic 19) REDACTED:39 — SteamOAuthController.handleCallbackFromSteam has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function item inside it that branches. 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.
D1 · Cyclomatic Complexity · assigned-units-table.AssignedUnitsTable (cyclomatic 19) · ×1
  • assigned-units-table.AssignedUnitsTable (cyclomatic 19) apps/client/src/components/dispatch/active-calls/modals/assigned-units-table.tsx:25 — assigned-units-table.AssignedUnitsTable has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 79, handleUnassignFromCall, a function literal at line 48). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · manage-911-call-modal.Manage911CallModal (cyclomatic 19) · ×1
  • manage-911-call-modal.Manage911CallModal (cyclomatic 19) apps/client/src/components/dispatch/active-calls/modals/manage-911-call-modal.tsx:64 — manage-911-call-modal.Manage911CallModal has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to 3 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · manage-deputy-modal.ManageDeputyModal (cyclomatic 19) · ×1
  • manage-deputy-modal.ManageDeputyModal (cyclomatic 19) apps/client/src/components/ems-fd/modals/deputy/manage-deputy-modal.tsx:32 — manage-deputy-modal.ManageDeputyModal has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 3 function items inside it that branch (onSubmit, a function literal at line 128, a function literal at line 190). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · involved-units-table.InvolvedUnitsTable (cyclomatic 19) · ×1
  • involved-units-table.InvolvedUnitsTable (cyclomatic 19) apps/client/src/components/leo/incidents/involved-units/involved-units-table.tsx:32 — involved-units-table.InvolvedUnitsTable has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 98, a function literal at line 52, handleUnassignFromCall, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ValuesController.getValueByPath (cyclomatic 18) · ×1
  • ValuesController.getValueByPath (cyclomatic 18) REDACTED:68 — ValuesController.getValueByPath has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 91). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Calls911Controller.update911Call (cyclomatic 18) · ×1
  • Calls911Controller.update911Call (cyclomatic 18) REDACTED:261 — Calls911Controller.update911Call has cyclomatic complexity 18 (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.
D1 · Cyclomatic Complexity · getSessionUser.getSessionUser (cyclomatic 18) · ×1
  • getSessionUser.getSessionUser (cyclomatic 18) apps/api/src/lib/auth/getSessionUser.ts:65 — getSessionUser.getSessionUser has cyclomatic complexity 18 (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.
D1 · Cyclomatic Complexity · manage-penal-code-modal.ManagePenalCode (cyclomatic 18) · ×1
  • manage-penal-code-modal.ManagePenalCode (cyclomatic 18) apps/client/src/components/admin/values/penal-codes/manage-penal-code-modal.tsx:25 — manage-penal-code-modal.ManagePenalCode has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 2 function items inside it that branch (onSubmit, a function literal at line 117). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · active-incidents.ActiveIncidents (cyclomatic 18) · ×1
  • active-incidents.ActiveIncidents (cyclomatic 18) apps/client/src/components/dispatch/active-incidents/active-incidents.tsx:35 — active-incidents.ActiveIncidents has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 6 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · warrants-tab.NameSearchWarrantsTab (cyclomatic 18) · ×1
  • warrants-tab.NameSearchWarrantsTab (cyclomatic 18) apps/client/src/components/leo/modals/NameSearchModal/tabs/warrants-tab.tsx:24 — warrants-tab.NameSearchWarrantsTab has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 4 function items inside it that branch (handleDelete, handleChange, a function literal at line 109, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · multi-form.MultiForm (cyclomatic 18) · ×1
  • multi-form.MultiForm (cyclomatic 18) packages/ui/src/components/multi-form/multi-form.tsx:29 — multi-form.MultiForm has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 72, 78, 54, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · VehiclesController.registerVehicle (cyclomatic 17) · ×1
  • VehiclesController.registerVehicle (cyclomatic 17) REDACTED:128 — VehiclesController.registerVehicle has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · Calls911Controller.get911Calls (cyclomatic 17) · ×1
  • Calls911Controller.get911Calls (cyclomatic 17) REDACTED:60 — Calls911Controller.get911Calls has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · Nav.Nav (cyclomatic 17) · ×1
  • Nav.Nav (cyclomatic 17) apps/client/src/components/shared/nav/Nav.tsx:27 — Nav.Nav has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · active-bolos.ActiveBolos (cyclomatic 17) · ×1
  • active-bolos.ActiveBolos (cyclomatic 17) apps/client/src/components/active-bolos/active-bolos.tsx:43 — active-bolos.ActiveBolos has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to 2 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · general-settings-tab.GeneralSettingsTab (cyclomatic 17) · ×1
  • general-settings-tab.GeneralSettingsTab (cyclomatic 17) apps/client/src/components/admin/manage/cad-settings/general/general-settings-tab.tsx:27 — general-settings-tab.GeneralSettingsTab has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (onSubmit, a function literal at line 134). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · editor.Editor (cyclomatic 17) · ×1
  • editor.Editor (cyclomatic 17) apps/client/src/components/editor/editor.tsx:65 — editor.Editor has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to 4 function literals inside it that branch. 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.
D1 · Cyclomatic Complexity · ModalButtons.ModalButtons (cyclomatic 17) · ×1
  • ModalButtons.ModalButtons (cyclomatic 17) apps/client/src/components/ems-fd/ModalButtons.tsx:58 — ModalButtons.ModalButtons has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · Select.Select (cyclomatic 17) · ×1
  • Select.Select (cyclomatic 17) apps/client/src/components/form/Select.tsx:34 — Select.Select has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to one function item inside it that branches. 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.
D1 · Cyclomatic Complexity · index.BusinessId (cyclomatic 17) · ×1
  • index.BusinessId (cyclomatic 17) apps/client/src/pages/business/[id]/[employeeId]/index.tsx:32 — index.BusinessId has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to 5 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · manage-employee-modal.ManageEmployeeModal (cyclomatic 16) · ×1
  • manage-employee-modal.ManageEmployeeModal (cyclomatic 16) apps/client/src/components/business/manage/tabs/employees-tab/manage-employee-modal.tsx:22 — manage-employee-modal.ManageEmployeeModal has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (onSubmit, a function literal at line 96). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · pending-citizen-logs-tab.PendingCitizenRecordsTab (cyclomatic 16) · ×1
  • pending-citizen-logs-tab.PendingCitizenRecordsTab (cyclomatic 16) apps/client/src/components/leo/citizen-logs/pending-citizen-logs-tab.tsx:41 — pending-citizen-logs-tab.PendingCitizenRecordsTab has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 119, handleAcceptDeclineClick). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ManageOfficerModal.ManageOfficerModal (cyclomatic 16) · ×1
  • ManageOfficerModal.ManageOfficerModal (cyclomatic 16) apps/client/src/components/leo/modals/ManageOfficerModal.tsx:33 — ManageOfficerModal.ManageOfficerModal has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (onSubmit, a function literal at line 124). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · records-tab.RecordsTab (cyclomatic 16) · ×1
  • records-tab.RecordsTab (cyclomatic 16) apps/client/src/components/leo/modals/NameSearchModal/tabs/records-tab.tsx:30 — records-tab.RecordsTab has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 4 function items inside it that branch (handleDelete, handleRecordUpdate, a function literal at line 91, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · select-officer-modal.SelectOfficerModal (cyclomatic 16) · ×1
  • select-officer-modal.SelectOfficerModal (cyclomatic 16) apps/client/src/components/leo/modals/select-officer-modal.tsx:27 — select-officer-modal.SelectOfficerModal has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 6 function items inside it that branch (onSubmit, a function literal at line 101, a function literal at line 46, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · use-async-table.useAsyncTable (cyclomatic 16) · ×1
  • use-async-table.useAsyncTable (cyclomatic 16) apps/client/src/hooks/shared/table/use-async-table.ts:30 — use-async-table.useAsyncTable has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (fetchData). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · [handle].BleeterProfilePage (cyclomatic 16) · ×1
  • [handle].BleeterProfilePage (cyclomatic 16) apps/client/src/pages/bleeter/@/[handle].tsx:33 — [handle].BleeterProfilePage has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 4 function items inside it that branch. 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.
D2 · Cognitive Complexity · ManageLicensesFormFields.ManageLicensesFormFields (cognitive 106) · ×1
  • ManageLicensesFormFields.ManageLicensesFormFields (cognitive 106) apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx:75 — ManageLicensesFormFields.ManageLicensesFormFields has cognitive complexity 106 (threshold 15). Drivers by points: ternaries 36 (88 pts), boolean chains 18 (nesting depth added 52). 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.
D2 · Cognitive Complexity · NameSearchModal.NameSearchModal (cognitive 79) · ×1
  • NameSearchModal.NameSearchModal (cognitive 79) apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx:66 — NameSearchModal.NameSearchModal has cognitive complexity 79 (threshold 15). Drivers by points: ternaries 24 (49 pts), boolean chains 19, if/else 11 (nesting depth added 25). Most of this is not in the body itself: 4 of the 79 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 176, onSubmit, a function literal at line 242, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · StatusController.updateUnitStatus (cognitive 64) · ×1
  • StatusController.updateUnitStatus (cognitive 64) apps/api/src/controllers/dispatch/status-controller.ts:52 — StatusController.updateUnitStatus has cognitive complexity 64 (threshold 15). Drivers by points: if/else 34 (44 pts), boolean chains 12, ternaries 5 (7 pts), error handling 1 (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ManageValueModal.createInitialValues (cognitive 63) · ×1
  • ManageValueModal.createInitialValues (cognitive 63) apps/client/src/components/admin/values/ManageValueModal.tsx:92 — ManageValueModal.createInitialValues has cognitive complexity 63 (threshold 15). Drivers by points: boolean chains 33, ternaries 30. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · search-medical-records-modal.SearchMedicalRecordModal (cognitive 52) · ×1
  • search-medical-records-modal.SearchMedicalRecordModal (cognitive 52) apps/client/src/components/ems-fd/modals/search-medical-records/search-medical-records-modal.tsx:39 — search-medical-records-modal.SearchMedicalRecordModal has cognitive complexity 52 (threshold 15). Drivers by points: ternaries 15 (36 pts), boolean chains 11, if/else 5 (nesting depth added 21). None of this is in the body itself: all 52 points belong to 7 function items inside it that branch (a function literal at line 109, a function literal at line 136, handleDeclare, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · VehicleSearchModal.VehicleSearchModal (cognitive 48) · ×1
  • VehicleSearchModal.VehicleSearchModal (cognitive 48) apps/client/src/components/leo/modals/VehicleSearchModal.tsx:31 — VehicleSearchModal.VehicleSearchModal has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 16 (26 pts), boolean chains 11, if/else 10 (11 pts) (nesting depth added 11). Most of this is not in the body itself: 6 of the 48 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 146, handleMarkStolen, a function literal at line 60, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · useFetch.useFetch.execute (cognitive 47) · ×1
  • useFetch.useFetch.execute (cognitive 47) apps/client/src/lib/useFetch.tsx:57 — useFetch.useFetch.execute has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 9 (25 pts), if/else 9 (16 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 25). Of this number, 30 points are the body's own statements and 17 belong to one function literal inside it that branches. 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.
D2 · Cognitive Complexity · manage-incident-modal.ManageIncidentModal (cognitive 46) · ×1
  • manage-incident-modal.ManageIncidentModal (cognitive 46) apps/client/src/components/leo/incidents/manage-incident-modal.tsx:74 — manage-incident-modal.ManageIncidentModal has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 22 (26 pts), boolean chains 12, if/else 6 (8 pts) (nesting depth added 6). Most of this is not in the body itself: 15 of the 46 points are its own statements and the rest belongs to 3 function items inside it that branch (onSubmit, a function literal at line 199, a function literal at line 121). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · manage-911-call-form.Manage911CallForm (cognitive 45) · ×1
  • manage-911-call-form.Manage911CallForm (cognitive 45) apps/client/src/components/dispatch/active-calls/modals/manage-911-call-form.tsx:33 — manage-911-call-form.Manage911CallForm has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 15 (25 pts), if/else 8 (12 pts), boolean chains 8 (nesting depth added 14). None of this is in the body itself: all 45 points belong to 5 function items inside it that branch (a function literal at line 128, onSubmit, handleEndClick, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · use-active-calls.useActiveCalls (cognitive 45) · ×1
  • use-active-calls.useActiveCalls (cognitive 45) apps/client/src/hooks/realtime/use-active-calls.tsx:28 — use-active-calls.useActiveCalls has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 12, ternaries 4, error handling 2 (nesting depth added 8). None of this is in the body itself: all 45 points belong to 8 function items inside it that branch (a function literal at line 201, handleAssignedToCallSpeech, handleShowToastAssignedToCall, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · upsert-record.upsertRecord (cognitive 44) · ×1
  • upsert-record.upsertRecord (cognitive 44) apps/api/src/lib/leo/records/upsert-record.ts:30 — upsert-record.upsertRecord has cognitive complexity 44 (threshold 15). Drivers by points: boolean chains 26, if/else 13 (17 pts), ternaries 1 (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · manage-record-modal.ManageRecordModal (cognitive 42) · ×1
  • manage-record-modal.ManageRecordModal (cognitive 42) apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx:186 — manage-record-modal.ManageRecordModal has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 14 (20 pts), if/else 9 (14 pts), boolean chains 8 (nesting depth added 11). Most of this is not in the body itself: 6 of the 42 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 342, onSubmit, a function literal at line 200, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · active-officers.ActiveOfficers (cognitive 39) · ×1
  • active-officers.ActiveOfficers (cognitive 39) apps/client/src/components/dispatch/active-units/officers/active-officers.tsx:55 — active-officers.ActiveOfficers has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 16 (26 pts), boolean chains 13 (nesting depth added 10). Of this number, 18 points are the body's own statements and 21 belong to one function literal inside it that branches. 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.
D2 · Cognitive Complexity · AdminManageUnitsController.getTimeGroupedByUnit (cognitive 38) · ×1
  • AdminManageUnitsController.getTimeGroupedByUnit (cognitive 38) apps/api/src/controllers/admin/manage/units/department-time-logs-controller.ts:22 — AdminManageUnitsController.getTimeGroupedByUnit has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (22 pts), ternaries 7 (11 pts), boolean chains 3, loops 1, match/switch 1 (nesting depth added 17). Of this number, 28 points are the body's own statements and 10 belong to one function literal inside it that branches. 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.
D2 · Cognitive Complexity · statuses-area.StatusesArea (cognitive 38) · ×1
  • statuses-area.StatusesArea (cognitive 38) apps/client/src/components/shared/utility-panel/statuses-area.tsx:39 — statuses-area.StatusesArea has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 11, ternaries 7 (8 pts) (nesting depth added 3). Most of this is not in the body itself: 11 of the 38 points are its own statements and the rest belongs to 7 function items inside it that branch (handleStatusUpdate, a function literal at line 189, handlePlaySoundOnStatusChange, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · manage-unit-tab.ManageUnitTab (cognitive 37) · ×1
  • manage-unit-tab.ManageUnitTab (cognitive 37) apps/client/src/components/admin/manage/units/tabs/manage-unit-tab/manage-unit-tab.tsx:35 — manage-unit-tab.ManageUnitTab has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 13 (26 pts), if/else 5 (8 pts), boolean chains 3 (nesting depth added 16). Most of this is not in the body itself: 6 of the 37 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 106, onSubmit, a function literal at line 197, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ManageValueModal.ManageValueModal (cognitive 36) · ×1
  • ManageValueModal.ManageValueModal (cognitive 36) apps/client/src/components/admin/values/ManageValueModal.tsx:164 — ManageValueModal.ManageValueModal has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 19, if/else 11 (14 pts), boolean chains 3 (nesting depth added 3). Most of this is not in the body itself: 2 of the 36 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 312, onSubmit, handleValueImageUpload, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · player-marker.PlayerMarker (cognitive 35) · ×1
  • player-marker.PlayerMarker (cognitive 35) apps/client/src/components/dispatch/map/units/player-marker.tsx:28 — player-marker.PlayerMarker has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 15, ternaries 11, if/else 7 (9 pts) (nesting depth added 2). Of this number, 27 points are the body's own statements and 8 belong to 2 function literals inside it that branch. 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.
D2 · Cognitive Complexity · incidents-table.IncidentsTable (cognitive 35) · ×1
  • incidents-table.IncidentsTable (cognitive 35) apps/client/src/components/leo/incidents/incidents-table.tsx:34 — incidents-table.IncidentsTable has cognitive complexity 35 (threshold 15). Drivers by points: ternaries 16 (24 pts), boolean chains 6, if/else 5 (nesting depth added 8). Most of this is not in the body itself: 13 of the 35 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 142, handlePurge, handleDelete, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · all-units-tab.AllUnitsTab (cognitive 34) · ×1
  • all-units-tab.AllUnitsTab (cognitive 34) apps/client/src/components/admin/manage/units/tabs/all-units-tab.tsx:50 — all-units-tab.AllUnitsTab has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 12 (19 pts), if/else 5 (7 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 10). Most of this is not in the body itself: 15 of the 34 points are its own statements and the rest belongs to 3 function items inside it that branch (setSelectedUnitsOffDuty, a function literal at line 186, handleDeleteUnit). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ManageCitizenForm.ManageCitizenForm (cognitive 33) · ×1
  • ManageCitizenForm.ManageCitizenForm (cognitive 33) apps/client/src/components/citizen/ManageCitizenForm.tsx:54 — ManageCitizenForm.ManageCitizenForm has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 17 (19 pts), boolean chains 9, if/else 4 (5 pts) (nesting depth added 3). Most of this is not in the body itself: 11 of the 33 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 149, handleSubmit, a function literal at line 194, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · register-vehicle-modal.RegisterVehicleModal (cognitive 33) · ×1
  • register-vehicle-modal.RegisterVehicleModal (cognitive 33) apps/client/src/components/citizen/vehicles/modals/register-vehicle-modal.tsx:52 — register-vehicle-modal.RegisterVehicleModal has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 12 (15 pts), if/else 10 (13 pts), boolean chains 5 (nesting depth added 6). Most of this is not in the body itself: 9 of the 33 points are its own statements and the rest belongs to 5 function items inside it that branch (onSubmit, handleImageUpload, a function literal at line 189, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · active-deputies.ActiveDeputies (cognitive 33) · ×1
  • active-deputies.ActiveDeputies (cognitive 33) apps/client/src/components/dispatch/active-units/deputies/active-deputies.tsx:36 — active-deputies.ActiveDeputies has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 14 (24 pts), boolean chains 9 (nesting depth added 10). Most of this is not in the body itself: 15 of the 33 points are its own statements and the rest belongs to one function literal inside it that branches (line 109). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · async-list-search-field.AsyncListSearchField (cognitive 33) · ×1
  • async-list-search-field.AsyncListSearchField (cognitive 33) packages/ui/src/components/fields/async-list-search-field.tsx:55 — async-list-search-field.AsyncListSearchField has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 12 (19 pts), boolean chains 7, if/else 5 (6 pts), error handling 1 (nesting depth added 8). Of this number, 25 points are the body's own statements and 8 belong to one function item inside it that branches. 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.
D2 · Cognitive Complexity · login-form.LoginForm (cognitive 32) · ×1
  • login-form.LoginForm (cognitive 32) apps/client/src/components/auth/login/login-form.tsx:29 — login-form.LoginForm has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 12 (22 pts), boolean chains 7, if/else 3 (nesting depth added 10). Most of this is not in the body itself: 4 of the 32 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 111, onSubmit, handleContinueAs). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · manage-tow-call.ManageCallModal (cognitive 30) · ×1
  • manage-tow-call.ManageCallModal (cognitive 30) apps/client/src/components/citizen/tow/manage-tow-call.tsx:38 — manage-tow-call.ManageCallModal has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 14 (21 pts), if/else 6 (8 pts), boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 7 of the 30 points are its own statements and the rest belongs to 3 function items inside it that branch (onSubmit, a function literal at line 133, handleEndCall). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · [path].ValuePath (cognitive 29) · ×1
  • [path].ValuePath (cognitive 29) apps/client/src/pages/admin/values/[path].tsx:76 — [path].ValuePath has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 14 (15 pts), if/else 9 (11 pts), boolean chains 2, loops 1 (nesting depth added 3). Most of this is not in the body itself: 13 of the 29 points are its own statements and the rest belongs to 6 function items inside it that branch (setList, handleDeleteSelected, a function literal at line 233, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · manage-bolo-modal.ManageBoloModal (cognitive 27) · ×1
  • manage-bolo-modal.ManageBoloModal (cognitive 27) apps/client/src/components/active-bolos/manage-bolo-modal.tsx:24 — manage-bolo-modal.ManageBoloModal has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 11 (13 pts), if/else 6 (11 pts), boolean chains 3 (nesting depth added 7). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 4 function items inside it that branch (onSubmit, a function literal at line 121, a function literal at line 185, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · use-map-players.useMapPlayers (cognitive 27) · ×1
  • use-map-players.useMapPlayers (cognitive 27) apps/client/src/hooks/realtime/use-map-players.tsx:35 — use-map-players.useMapPlayers has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 8). None of this is in the body itself: all 27 points belong to 8 function literals inside it that branch (lines 57, 103, 223, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · AdminManageUnitsController.acceptOrDeclineUnit (cognitive 26) · ×1
  • AdminManageUnitsController.acceptOrDeclineUnit (cognitive 26) REDACTED:645 — AdminManageUnitsController.acceptOrDeclineUnit has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 4 (8 pts), boolean chains 4, match/switch 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.
D2 · Cognitive Complexity · manage-2fa-modal.Manage2FAModal (cognitive 26) · ×1
  • manage-2fa-modal.Manage2FAModal (cognitive 26) apps/client/src/components/account/2fa/manage-2fa-modal.tsx:24 — manage-2fa-modal.Manage2FAModal has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 8 (9 pts), boolean chains 4 (nesting depth added 6). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 3 function items inside it that branch (onSubmit, a function literal at line 134, onCancel). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · add-unit-to-call-modal.AddUnitToCallModal (cognitive 26) · ×1
  • add-unit-to-call-modal.AddUnitToCallModal (cognitive 26) apps/client/src/components/dispatch/active-calls/modals/add-unit-to-call-modal.tsx:36 — add-unit-to-call-modal.AddUnitToCallModal has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 10 (13 pts), if/else 5 (7 pts), boolean chains 6 (nesting depth added 5). None of this is in the body itself: all 26 points belong to 8 function items inside it that branch (a function literal at line 192, a function literal at line 266, handleAddUnit, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · CreateCitizenModal.CreateOrManageCitizenModal · ×1
  • CreateCitizenModal.CreateOrManageCitizenModal::onSubmit (cognitive 26) apps/client/src/components/leo/modals/NameSearchModal/CreateCitizenModal.tsx:36 — CreateCitizenModal.CreateOrManageCitizenModal::onSubmit has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (26 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.
D2 · Cognitive Complexity · records-tab.RecordsTable (cognitive 26) · ×1
  • records-tab.RecordsTable (cognitive 26) apps/client/src/components/leo/modals/NameSearchModal/tabs/records-tab.tsx:145 — records-tab.RecordsTable has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 11 (17 pts), if/else 5 (6 pts), boolean chains 2, loops 1 (nesting depth added 7). Most of this is not in the body itself: 4 of the 26 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 246, a function literal at line 247, handleDeleteClick, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · [id].ManageCitizens (cognitive 26) · ×1
  • [id].ManageCitizens (cognitive 26) apps/client/src/pages/admin/manage/users/[id].tsx:65 — [id].ManageCitizens has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 13, ternaries 8 (10 pts), if/else 3 (nesting depth added 2). Of this number, 17 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ValuesController.getValueByPath (cognitive 25) · ×1
  • ValuesController.getValueByPath (cognitive 25) REDACTED:68 — ValuesController.getValueByPath has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 13 (21 pts), if/else 4 (nesting depth added 8). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 91). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · create-where-object.createSearchWhereObject (cognitive 25) · ×1
  • create-where-object.createSearchWhereObject (cognitive 25) apps/api/src/lib/values/create-where-object.ts:12 — create-where-object.createSearchWhereObject has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 5 (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.
D2 · Cognitive Complexity · active-calls.Active911Calls (cognitive 25) · ×1
  • active-calls.Active911Calls (cognitive 25) apps/client/src/components/dispatch/active-calls/active-calls.tsx:32 — active-calls.Active911Calls has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 10 (15 pts), boolean chains 5, if/else 4 (5 pts) (nesting depth added 6). Of this number, 13 points are the body's own statements and 12 belong to 4 function items inside it that branch. 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.
D2 · Cognitive Complexity · active-incidents.ActiveIncidents (cognitive 25) · ×1
  • active-incidents.ActiveIncidents (cognitive 25) apps/client/src/components/dispatch/active-incidents/active-incidents.tsx:35 — active-incidents.ActiveIncidents has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 8 (11 pts), boolean chains 3 (nesting depth added 6). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to 6 function items inside it that branch (handleDismissIncident, a function literal at line 214, a function literal at line 224, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · values.useTableDataOfType.get (cognitive 25) · ×1
  • values.useTableDataOfType.get (cognitive 25) apps/client/src/lib/admin/values/values.tsx:43 — values.useTableDataOfType.get has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 8 (15 pts), boolean chains 8, if/else 1, match/switch 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.
D2 · Cognitive Complexity · index.CitizenId (cognitive 25) · ×1
  • index.CitizenId (cognitive 25) apps/client/src/pages/citizen/[id]/index.tsx:48 — index.CitizenId has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 9 (12 pts), boolean chains 7, if/else 6 (nesting depth added 3). Of this number, 18 points are the body's own statements and 7 belong to 3 function items inside it that branch. 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.
D2 · Cognitive Complexity · DiscordAuth.handleCallbackFromDiscord (cognitive 24) · ×1
  • DiscordAuth.handleCallbackFromDiscord (cognitive 24) REDACTED:56 — DiscordAuth.handleCallbackFromDiscord has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 6). Of this number, 17 points are the body's own statements and 7 belong to one function item inside it that branches. 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.
D2 · Cognitive Complexity · SteamOAuthController.handleCallbackFromSteam (cognitive 24) · ×1
  • SteamOAuthController.handleCallbackFromSteam (cognitive 24) REDACTED:39 — SteamOAuthController.handleCallbackFromSteam has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 6). Of this number, 17 points are the body's own statements and 7 belong to one function item inside it that branches. 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.
D2 · Cognitive Complexity · VehiclesController.updateVehicle (cognitive 24) · ×1
  • VehiclesController.updateVehicle (cognitive 24) REDACTED:298 — VehiclesController.updateVehicle has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 4, ternaries 3 (4 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · upsert-officer.upsertOfficer (cognitive 24) · ×1
  • upsert-officer.upsertOfficer (cognitive 24) apps/api/src/controllers/leo/my-officers/upsert-officer.ts:50 — upsert-officer.upsertOfficer has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 7, ternaries 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · officer-column.OfficerColumn (cognitive 24) · ×1
  • officer-column.OfficerColumn (cognitive 24) apps/client/src/components/dispatch/active-units/officers/columns/officer-column.tsx:41 — officer-column.OfficerColumn has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 12 (14 pts), boolean chains 9, if/else 1 (nesting depth added 2). Of this number, 13 points are the body's own statements and 11 belong to 4 function items inside it that branch. 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.
D2 · Cognitive Complexity · warrants-tab.NameSearchWarrantsTab (cognitive 24) · ×1
  • warrants-tab.NameSearchWarrantsTab (cognitive 24) apps/client/src/components/leo/modals/NameSearchModal/tabs/warrants-tab.tsx:24 — warrants-tab.NameSearchWarrantsTab has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 7 (13 pts), if/else 7 (8 pts), boolean chains 3 (nesting depth added 7). Most of this is not in the body itself: 8 of the 24 points are its own statements and the rest belongs to 4 function items inside it that branch (handleDelete, a function literal at line 109, handleChange, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · footer-actions.NameSearchFooterActions (cognitive 24) · ×1
  • footer-actions.NameSearchFooterActions (cognitive 24) apps/client/src/components/leo/modals/NameSearchModal/sections/footer-actions.tsx:26 — footer-actions.NameSearchFooterActions has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 8 (13 pts), if/else 6 (7 pts), boolean chains 4 (nesting depth added 6). Of this number, 15 points are the body's own statements and 9 belong to 4 function items inside it that branch. 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.
D2 · Cognitive Complexity · Nav.Nav (cognitive 23) · ×1
  • Nav.Nav (cognitive 23) apps/client/src/components/shared/nav/Nav.tsx:27 — Nav.Nav has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 9 (16 pts), boolean chains 6, if/else 1 (nesting depth added 7). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
D2 · Cognitive Complexity · deputy-column.DeputyColumn (cognitive 23) · ×1
  • deputy-column.DeputyColumn (cognitive 23) apps/client/src/components/dispatch/active-units/deputies/deputy-column.tsx:42 — deputy-column.DeputyColumn has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 11 (13 pts), boolean chains 9, if/else 1 (nesting depth added 2). Of this number, 12 points are the body's own statements and 11 belong to 4 function items inside it that branch. 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.
D2 · Cognitive Complexity · merge-unit-modal.MergeUnitModal (cognitive 23) · ×1
  • merge-unit-modal.MergeUnitModal (cognitive 23) apps/client/src/components/dispatch/active-units/modals/merge-unit-modal.tsx:39 — merge-unit-modal.MergeUnitModal has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, ternaries 6, loops 1 (2 pts) (nesting depth added 4). Most of this is not in the body itself: 6 of the 23 points are its own statements and the rest belongs to 6 function items inside it that branch (onSubmit, a function literal at line 156, a function literal at line 75, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · manage-deputy-modal.ManageDeputyModal (cognitive 23) · ×1
  • manage-deputy-modal.ManageDeputyModal (cognitive 23) apps/client/src/components/ems-fd/modals/deputy/manage-deputy-modal.tsx:32 — manage-deputy-modal.ManageDeputyModal has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 9 (10 pts), boolean chains 2 (nesting depth added 4). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 3 function items inside it that branch (onSubmit, a function literal at line 128, a function literal at line 190). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · manage-911-call-modal.Manage911CallModal (cognitive 22) · ×1
  • manage-911-call-modal.Manage911CallModal (cognitive 22) apps/client/src/components/dispatch/active-calls/modals/manage-911-call-modal.tsx:64 — manage-911-call-modal.Manage911CallModal has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 12 (16 pts), boolean chains 3, if/else 3 (nesting depth added 4). Of this number, 16 points are the body's own statements and 6 belong to 3 function items inside it that branch. 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.
D2 · Cognitive Complexity · table-item-form.TableItemForm (cognitive 22) · ×1
  • table-item-form.TableItemForm (cognitive 22) apps/client/src/components/leo/modals/manage-record/table-item-form.tsx:81 — table-item-form.TableItemForm has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, ternaries 7 (8 pts), if/else 2 (3 pts) (nesting depth added 2). Of this number, 19 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · business-search-modal.BusinessSearchModal (cognitive 22) · ×1
  • business-search-modal.BusinessSearchModal (cognitive 22) apps/client/src/components/leo/modals/business-search-modal/business-search-modal.tsx:21 — business-search-modal.BusinessSearchModal has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 7 (9 pts), boolean chains 7, if/else 6 (nesting depth added 2). None of this is in the body itself: all 22 points belong to 4 function items inside it that branch (onSubmit, a function literal at line 89, a function literal at line 33, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · jail.Jail (cognitive 22) · ×1
  • jail.Jail (cognitive 22) apps/client/src/pages/officer/jail.tsx:35 — jail.Jail has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 8 (16 pts), boolean chains 3, if/else 1 (2 pts), loops 1 (nesting depth added 9). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 129, 83, 130). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · TowController.createTowCall (cognitive 21) · ×1
  • TowController.createTowCall (cognitive 21) REDACTED:97 — TowController.createTowCall has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, error handling 1 (2 pts), ternaries 1 (2 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.
D2 · Cognitive Complexity · Calls911Controller.update911Call (cognitive 21) · ×1
  • Calls911Controller.update911Call (cognitive 21) REDACTED:261 — Calls911Controller.update911Call has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 9 (13 pts), boolean chains 4, if/else 4 (nesting depth added 4). 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.
D2 · Cognitive Complexity · EmsFdController.panicButton (cognitive 21) · ×1
  • EmsFdController.panicButton (cognitive 21) REDACTED:459 — EmsFdController.panicButton has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 3 (4 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.
D2 · Cognitive Complexity · validateUser.validateUserData (cognitive 21) · ×1
  • validateUser.validateUserData (cognitive 21) apps/api/src/lib/auth/validateUser.ts:12 — validateUser.validateUserData has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 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.
D2 · Cognitive Complexity · EventItem.EventItem (cognitive 21) · ×1
  • EventItem.EventItem (cognitive 21) apps/client/src/components/dispatch/events/EventItem.tsx:32 — EventItem.EventItem has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (8 pts), boolean chains 7, if/else 5 (6 pts) (nesting depth added 3). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch (deleteEvent, a function literal at line 82, a function literal at line 92). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · create-map-units-from-active-units.ts.createMapUnitsFromActiveUnits (cognitive 21) · ×1
  • create-map-units-from-active-units.ts.createMapUnitsFromActiveUnits (cognitive 21) apps/client/src/lib/map/create-map-units-from-active-units.ts.ts:16 — create-map-units-from-active-units.ts.createMapUnitsFromActiveUnits has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 4, 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.
D2 · Cognitive Complexity · multi-form.MultiForm (cognitive 21) · ×1
  • multi-form.MultiForm (cognitive 21) packages/ui/src/components/multi-form/multi-form.tsx:29 — multi-form.MultiForm has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 9 (12 pts), boolean chains 5, if/else 3 (4 pts) (nesting depth added 4). None of this is in the body itself: all 21 points belong to 7 function literals inside it that branch (lines 72, 78, 54, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · validate-record-data.validateRecordData (cognitive 20) · ×1
  • validate-record-data.validateRecordData (cognitive 20) apps/api/src/lib/leo/records/validate-record-data.ts:29 — validate-record-data.validateRecordData has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 14, if/else 6. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · manage-penal-code-modal.ManagePenalCode (cognitive 20) · ×1
  • manage-penal-code-modal.ManagePenalCode (cognitive 20) apps/client/src/components/admin/values/penal-codes/manage-penal-code-modal.tsx:25 — manage-penal-code-modal.ManagePenalCode has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 9, if/else 4 (6 pts), boolean chains 5 (nesting depth added 2). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 2 function items inside it that branch (onSubmit, a function literal at line 117). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · active-bolos.ActiveBolos (cognitive 19) · ×1
  • active-bolos.ActiveBolos (cognitive 19) apps/client/src/components/active-bolos/active-bolos.tsx:43 — active-bolos.ActiveBolos has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 6, if/else 2 (nesting depth added 3). Of this number, 10 points are the body's own statements and 9 belong to 2 function items inside it that branch. 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.
D2 · Cognitive Complexity · register-weapon-modal.RegisterWeaponModal (cognitive 19) · ×1
  • register-weapon-modal.RegisterWeaponModal (cognitive 19) apps/client/src/components/citizen/weapons/register-weapon-modal.tsx:35 — register-weapon-modal.RegisterWeaponModal has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 9 (10 pts), if/else 5 (8 pts), boolean chains 1 (nesting depth added 4). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 3 function items inside it that branch (onSubmit, a function literal at line 113, a function literal at line 134). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · create-temporary-unit-modal.CreateTemporaryUnitModal (cognitive 19) · ×1
  • create-temporary-unit-modal.CreateTemporaryUnitModal (cognitive 19) apps/client/src/components/dispatch/modals/temporary-units/create-temporary-unit-modal.tsx:25 — create-temporary-unit-modal.CreateTemporaryUnitModal has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 9 (15 pts), boolean chains 3, if/else 1 (nesting depth added 6). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 80, a function literal at line 120, onSubmit, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ModalButtons.ModalButtons (cognitive 19) · ×1
  • ModalButtons.ModalButtons (cognitive 19) apps/client/src/components/leo/ModalButtons.tsx:49 — ModalButtons.ModalButtons has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 9 (12 pts), boolean chains 6, if/else 1 (nesting depth added 3). Of this number, 17 points are the body's own statements and 2 belong to 2 function items inside it that branch. 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.
D2 · Cognitive Complexity · pending-citizen-logs-tab.PendingCitizenRecordsTab (cognitive 19) · ×1
  • pending-citizen-logs-tab.PendingCitizenRecordsTab (cognitive 19) apps/client/src/components/leo/citizen-logs/pending-citizen-logs-tab.tsx:41 — pending-citizen-logs-tab.PendingCitizenRecordsTab has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (13 pts), boolean chains 5, if/else 1 (nesting depth added 5). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 119, handleAcceptDeclineClick). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ManageOfficerModal.ManageOfficerModal (cognitive 19) · ×1
  • ManageOfficerModal.ManageOfficerModal (cognitive 19) apps/client/src/components/leo/modals/ManageOfficerModal.tsx:33 — ManageOfficerModal.ManageOfficerModal has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 5, boolean chains 3 (nesting depth added 3). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 2 function items inside it that branch (onSubmit, a function literal at line 124). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · AuthContext.AuthProvider (cognitive 19) · ×1
  • AuthContext.AuthProvider (cognitive 19) apps/client/src/context/AuthContext.tsx:38 — AuthContext.AuthProvider has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 8, ternaries 1. Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 47, 103, 90, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · getSessionUser.getSessionUser (cognitive 18) · ×1
  • getSessionUser.getSessionUser (cognitive 18) apps/api/src/lib/auth/getSessionUser.ts:65 — getSessionUser.getSessionUser has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · general-settings-tab.GeneralSettingsTab · ×1
  • general-settings-tab.GeneralSettingsTab::onSubmit (cognitive 18) apps/client/src/components/admin/manage/cad-settings/general/general-settings-tab.tsx:38 — general-settings-tab.GeneralSettingsTab::onSubmit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · all-citizens-tab.AllCitizensTab (cognitive 18) · ×1
  • all-citizens-tab.AllCitizensTab (cognitive 18) apps/client/src/components/admin/manage/citizens/all-citizens-tab.tsx:36 — all-citizens-tab.AllCitizensTab has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 7 (13 pts), boolean chains 3, if/else 2 (nesting depth added 6). Of this number, 9 points are the body's own statements and 9 belong to 2 function items inside it that branch. 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.
D2 · Cognitive Complexity · [handle].BleeterProfilePage (cognitive 18) · ×1
  • [handle].BleeterProfilePage (cognitive 18) apps/client/src/pages/bleeter/@/[handle].tsx:33 — [handle].BleeterProfilePage has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 9 (12 pts), boolean chains 4, if/else 2 (nesting depth added 3). Of this number, 14 points are the body's own statements and 4 belong to 4 function items inside it that branch. 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.
D2 · Cognitive Complexity · call-history.CallHistory (cognitive 18) · ×1
  • call-history.CallHistory (cognitive 18) apps/client/src/pages/officer/call-history.tsx:37 — call-history.CallHistory has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (11 pts), boolean chains 4, if/else 3 (nesting depth added 5). Of this number, 10 points are the body's own statements and 8 belong to 3 function items inside it that branch. 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.
D2 · Cognitive Complexity · VehiclesController.registerVehicle (cognitive 17) · ×1
  • VehiclesController.registerVehicle (cognitive 17) REDACTED:128 — VehiclesController.registerVehicle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · LeoController.panicButton (cognitive 17) · ×1
  • LeoController.panicButton (cognitive 17) REDACTED:98 — LeoController.panicButton has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · many-to-many.manyToManyHelper (cognitive 17) · ×1
  • many-to-many.manyToManyHelper (cognitive 17) apps/api/src/lib/data/many-to-many.ts:22 — many-to-many.manyToManyHelper has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 4, 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.
D2 · Cognitive Complexity · activeOfficer.getActiveOfficer (cognitive 17) · ×1
  • activeOfficer.getActiveOfficer (cognitive 17) apps/api/src/lib/leo/activeOfficer.ts:15 — activeOfficer.getActiveOfficer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · manage-bleet-modal.ManageBleetModal (cognitive 17) · ×1
  • manage-bleet-modal.ManageBleetModal (cognitive 17) apps/client/src/components/bleeter/manage-bleet-modal.tsx:29 — manage-bleet-modal.ManageBleetModal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 3, boolean chains 2 (nesting depth added 4). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 2 function items inside it that branch (onSubmit, a function literal at line 123). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · assigned-units-table.AssignedUnitsTable (cognitive 17) · ×1
  • assigned-units-table.AssignedUnitsTable (cognitive 17) apps/client/src/components/dispatch/active-calls/modals/assigned-units-table.tsx:25 — assigned-units-table.AssignedUnitsTable has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, ternaries 7, if/else 2 (3 pts) (nesting depth added 1). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 79, handleUnassignFromCall, a function literal at line 48). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · editor.Editor (cognitive 17) · ×1
  • editor.Editor (cognitive 17) apps/client/src/components/editor/editor.tsx:65 — editor.Editor has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7, if/else 5 (6 pts), boolean chains 3, loops 1 (nesting depth added 1). Of this number, 9 points are the body's own statements and 8 belong to 4 function literals inside it that branch. 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.
D2 · Cognitive Complexity · involved-units-table.InvolvedUnitsTable (cognitive 17) · ×1
  • involved-units-table.InvolvedUnitsTable (cognitive 17) apps/client/src/components/leo/incidents/involved-units/involved-units-table.tsx:32 — involved-units-table.InvolvedUnitsTable has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 8, boolean chains 6, if/else 2 (3 pts) (nesting depth added 1). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 98, handleUnassignFromCall, a function literal at line 52, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · records-tab.RecordsTab (cognitive 17) · ×1
  • records-tab.RecordsTab (cognitive 17) apps/client/src/components/leo/modals/NameSearchModal/tabs/records-tab.tsx:30 — records-tab.RecordsTab has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (10 pts), if/else 4, boolean chains 3 (nesting depth added 3). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 91, handleRecordUpdate, handleDelete, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · use-async-table.useAsyncTable · ×1
  • use-async-table.useAsyncTable::fetchData (cognitive 17) apps/client/src/hooks/shared/table/use-async-table.ts:79 — use-async-table.useAsyncTable::fetchData has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, loops 2, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · get-active-ems-fd-deputy.getActiveDeputy (cognitive 16) · ×1
  • get-active-ems-fd-deputy.getActiveDeputy (cognitive 16) apps/api/src/lib/get-active-ems-fd-deputy.ts:15 — get-active-ems-fd-deputy.getActiveDeputy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cad-features-tab.CADFeaturesTab (cognitive 16) · ×1
  • cad-features-tab.CADFeaturesTab (cognitive 16) apps/client/src/components/admin/manage/cad-settings/general/cad-features-tab.tsx:40 — cad-features-tab.CADFeaturesTab has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (10 pts), if/else 3 (4 pts), loops 2 (nesting depth added 4). None of this is in the body itself: all 16 points belong to 7 function items inside it that branch (a function literal at line 148, createInitialOptions, onSubmit, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Select.Select (cognitive 16) · ×1
  • Select.Select (cognitive 16) apps/client/src/components/form/Select.tsx:34 — Select.Select has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (8 pts), boolean chains 6, if/else 2 (nesting depth added 1). Of this number, 8 points are the body's own statements and 8 belong to one function item inside it that branches. 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.
D2 · Cognitive Complexity · select-officer-modal.SelectOfficerModal (cognitive 16) · ×1
  • select-officer-modal.SelectOfficerModal (cognitive 16) apps/client/src/components/leo/modals/select-officer-modal.tsx:27 — select-officer-modal.SelectOfficerModal has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7, if/else 5 (6 pts), boolean chains 3 (nesting depth added 1). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 6 function items inside it that branch (onSubmit, a function literal at line 101, a function literal at line 46, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · weapon-search-modal.WeaponSearchModal (cognitive 16) · ×1
  • weapon-search-modal.WeaponSearchModal (cognitive 16) apps/client/src/components/leo/modals/weapon-search-modal.tsx:21 — weapon-search-modal.WeaponSearchModal has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 5, boolean chains 2 (nesting depth added 3). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 76, onSubmit, a function literal at line 32, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · table-header.TableHeader (cognitive 16) · ×1
  • table-header.TableHeader (cognitive 16) apps/client/src/components/shared/table/table-header.tsx:20 — table-header.TableHeader has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9 (12 pts), boolean chains 3, if/else 1 (nesting depth added 3). Of this number, 12 points are the body's own statements and 4 belong to 2 function literals inside it that branch. 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.
D2 · Cognitive Complexity · index.BusinessId (cognitive 16) · ×1
  • index.BusinessId (cognitive 16) apps/client/src/pages/business/[id]/[employeeId]/index.tsx:32 — index.BusinessId has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (8 pts), if/else 5, boolean chains 3 (nesting depth added 1). Of this number, 8 points are the body's own statements and 8 belong to 5 function items inside it that branch. 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×1
  • Change-coupling hub: REDACTED → REDACTED, REDACTED, REDACTED REDACTED — `REDACTED` changes together with 3 other files — `REDACTED`, `REDACTED`, `REDACTED` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D8 · Code Coverage · Coverage not measured · ×1
  • Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — apps/api/ runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
IC1 · Incompleteness & stubs · Fake-async · ×1
  • Fake-async — async method never awaits apps/api/src/services/socket-service.ts:125 — `emitUpdateUnitStatus` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
IC1 · Incompleteness & stubs · Guard cannot change the result · ×1
  • Guard cannot change the result — returns what the code already falls through to apps/client/src/context/ValuesContext.tsx:74 — The guard above `return true;` also returns `true`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
IC1 · Incompleteness & stubs · Both branches are identical · ×1
  • Both branches are identical — the condition decides nothing packages/ui/src/components/fields/async-list-search-field/actions.tsx:51 — Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
R10 · Code Duplication · Duplication concentrated across 12 sibling directories (143 clone groups) · ×1
  • Duplication concentrated across 12 sibling directories (143 clone groups) apps/client/src/components/dispatch/modals/address-search-modal.tsx:28 — 143 duplicated blocks under apps/client/src/components/ have copies in at least two of the sibling directories account, active-bolos, admin, bleeter, business, citizen (+6 more sibling(s) not listed) — 95 of them are reported below, and 48 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 143 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 143 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 143 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 11 sibling directories (111 clone groups) · ×1
  • Duplication concentrated across 11 sibling directories (111 clone groups) REDACTED:37 — 111 duplicated blocks under apps/api/src/controllers/ have copies in at least two of the sibling directories admin, auth, bleeter, business, calls, citizen (+5 more sibling(s) not listed) — 54 of them are reported below, and 57 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 111 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 111 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 111 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 3 sibling directories (72 clone groups) · ×1
  • Duplication concentrated across 3 sibling directories (72 clone groups) apps/client/src/components/leo/modals/NameSearchModal/sections/basic-information.tsx:30 — 72 duplicated blocks under apps/client/src/ have copies in at least two of the sibling directories components, hooks, pages — 40 of them are reported below, and 32 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 72 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 72 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 72 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 9 sibling directories (33 clone groups) · ×1
  • Duplication concentrated across 9 sibling directories (33 clone groups) apps/client/src/pages/ems-fd/my-deputies.tsx:37 — 33 duplicated blocks under apps/client/src/pages/ have copies in at least two of the sibling directories admin, bleeter, business, citizen, dispatch, ems-fd (+3 more sibling(s) not listed) — 19 of them are reported below, and 14 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 33 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 33 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 33 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 6 sibling directories (9 clone groups) · ×1
  • Duplication concentrated across 6 sibling directories (9 clone groups) apps/client/src/components/citizen/vehicles/vehicles-card.tsx:89 — 9 duplicated blocks under apps/client/src/components/citizen/ have copies in at least two of the sibling directories licenses, medical-records, pets, tow, vehicles, weapons — 7 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 9 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 9 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 9 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 3 sibling directories (8 clone groups) · ×1
  • Duplication concentrated across 3 sibling directories (8 clone groups) apps/client/src/components/admin/manage/cad-settings/general/import-blacklisted-words-modal.tsx:16 — 8 duplicated blocks under apps/client/src/components/admin/ have copies in at least two of the sibling directories import, manage, values — 7 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 8 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 8 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 8 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 4 sibling directories (7 clone groups) · ×1
  • Duplication concentrated across 4 sibling directories (7 clone groups) apps/client/src/components/admin/manage/cad-settings/discord-webhooks/discord-webhooks-tab.tsx:85 — 7 duplicated blocks under apps/client/src/components/admin/manage/cad-settings/ have copies in at least two of the sibling directories discord-webhooks, general, misc-features, webhooks — 5 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 4 sibling directories (6 clone groups) · ×1
  • Duplication concentrated across 4 sibling directories (6 clone groups) apps/client/src/components/dispatch/active-calls/columns/assigned-units-column.tsx:41 — 6 duplicated blocks under apps/client/src/components/dispatch/ have copies in at least two of the sibling directories active-calls, active-incidents, active-units, events — 5 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block with local edits (222 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (222 matched lines × 2 locations) REDACTED:37 — REDACTED:37 · REDACTED:35 — the two spans are one implementation copied and then locally edited — 1310 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (134 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (134 matched lines × 2 locations) apps/client/src/components/dispatch/active-units/deputies/active-deputies.tsx:47 — apps/client/src/components/dispatch/active-units/deputies/active-deputies.tsx:47 · apps/client/src/components/dispatch/active-units/officers/active-officers.tsx:66 — the two spans are one implementation copied and then locally edited — 762 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (127 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (127 matched lines × 2 locations) apps/client/src/components/admin/manage/cad-settings/misc-features/license-number-tab.tsx:14 — apps/client/src/components/admin/manage/cad-settings/misc-features/license-number-tab.tsx:14 · apps/client/src/components/admin/manage/cad-settings/misc-features/max-license-points-tab.tsx:14 — the two spans are one implementation copied and then locally edited — 646 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (126 identical lines × 2 files) · ×1
  • Wholesale file copy (126 identical lines × 2 files) apps/api/src/utils/zod-error-map.ts:3 — apps/api/src/utils/zod-error-map.ts:3 · apps/client/src/lib/validation/zod-error-map.ts:3 — these 2 files are line-for-line copies of one another — 126 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (123 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (123 matched lines × 2 locations) apps/client/src/pages/admin/manage/custom-fields.tsx:23 — apps/client/src/pages/admin/manage/custom-fields.tsx:23 · apps/client/src/pages/admin/manage/custom-roles.tsx:31 — the two spans are one implementation copied and then locally edited — 739 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (121 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (121 matched lines × 2 locations) apps/client/src/components/dispatch/active-units/deputies/deputy-column.tsx:66 — apps/client/src/components/dispatch/active-units/deputies/deputy-column.tsx:66 · apps/client/src/components/dispatch/active-units/officers/columns/officer-column.tsx:65 — the two spans are one implementation copied and then locally edited — 696 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (118 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (118 matched lines × 2 locations) apps/client/src/pages/ems-fd/my-deputies.tsx:37 — apps/client/src/pages/ems-fd/my-deputies.tsx:37 · apps/client/src/pages/officer/my-officers.tsx:42 — the two spans are one implementation copied and then locally edited — 833 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (101 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (101 matched lines × 2 locations) apps/client/src/components/dispatch/modals/address-search-modal.tsx:28 — apps/client/src/components/dispatch/modals/address-search-modal.tsx:28 · apps/client/src/components/leo/modals/business-search-modal/business-search-modal.tsx:40 — the two spans are one implementation copied and then locally edited — 579 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (100 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (100 matched lines × 2 locations) REDACTED:40 — REDACTED:40 · REDACTED:65 — the two spans are one implementation copied and then locally edited — 613 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (96 lines × 2 locations) · ×1
  • Duplicated block (96 lines × 2 locations) REDACTED:36 — REDACTED:36 · REDACTED:151 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (96 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (96 matched lines × 2 locations) apps/api/src/lib/dispatch/911-calls/assign-units-to-911-call.ts:30 — apps/api/src/lib/dispatch/911-calls/assign-units-to-911-call.ts:30 · apps/api/src/lib/incidents/handle-involved-units.ts:28 — the two spans are one implementation copied and then locally edited — 500 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (91 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (91 matched lines × 2 locations) apps/api/src/controllers/citizen/MedicalRecordController.ts:19 — apps/api/src/controllers/citizen/MedicalRecordController.ts:19 · apps/api/src/controllers/citizen/weapon-controller.ts:72 — the two spans are one implementation copied and then locally edited — 566 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (89 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (89 matched lines × 2 locations) apps/client/src/pages/officer/bureau-of-firearms.tsx:16 — apps/client/src/pages/officer/bureau-of-firearms.tsx:16 · apps/client/src/pages/officer/dmv.tsx:16 — the two spans are one implementation copied and then locally edited — 599 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (84 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (84 matched lines × 2 locations) apps/client/src/components/courthouse/court-entries/court-entries-tab.tsx:14 — apps/client/src/components/courthouse/court-entries/court-entries-tab.tsx:14 · apps/client/src/components/courthouse/courthouse-posts/courthouse-posts-tab.tsx:15 — the two spans are one implementation copied and then locally edited — 551 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (81 lines × 2 locations) · ×1
  • Duplicated block (81 lines × 2 locations) apps/api/src/lib/get-active-ems-fd-deputy.ts:15 — apps/api/src/lib/get-active-ems-fd-deputy.ts:15 · apps/api/src/lib/leo/activeOfficer.ts:15 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block with local edits (81 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (81 matched lines × 2 locations) apps/client/src/pages/law-book.tsx:17 — apps/client/src/pages/law-book.tsx:17 · apps/client/src/pages/officer/penal-codes.tsx:18 — the two spans are one implementation copied and then locally edited — 554 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (79 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (79 matched lines × 2 locations) apps/client/src/components/admin/manage/courthouse/expungement-requests-tab.tsx:15 — apps/client/src/components/admin/manage/courthouse/expungement-requests-tab.tsx:15 · apps/client/src/components/admin/manage/courthouse/name-change-requests-tab.tsx:14 — the two spans are one implementation copied and then locally edited — 518 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (79 identical lines × 2 files) · ×1
  • Wholesale file copy (79 identical lines × 2 files) apps/client/src/pages/auth/account-password.tsx:1 — apps/client/src/pages/auth/account-password.tsx:1 · apps/client/src/pages/auth/temp-password.tsx:1 — these 2 files are line-for-line copies of one another — 79 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (78 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (78 matched lines × 2 locations) apps/client/src/components/admin/manage/units/tabs/all-units-tab.tsx:43 — apps/client/src/components/admin/manage/units/tabs/all-units-tab.tsx:43 · apps/client/src/components/admin/manage/units/tabs/callsigns-tab/callsigns-tab.tsx:20 — the two spans are one implementation copied and then locally edited — 456 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (73 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (73 matched lines × 2 locations) apps/client/src/components/ems-fd/ModalButtons.tsx:81 — apps/client/src/components/ems-fd/ModalButtons.tsx:81 · apps/client/src/components/leo/ModalButtons.tsx:75 — the two spans are one implementation copied and then locally edited — 394 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (71 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (71 matched lines × 2 locations) apps/client/src/components/dispatch/active-calls/modals/add-unit-to-call-modal.tsx:155 — apps/client/src/components/dispatch/active-calls/modals/add-unit-to-call-modal.tsx:155 · apps/client/src/components/leo/incidents/involved-units/add-involved-unit.tsx:86 — the two spans are one implementation copied and then locally edited — 404 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (69 lines × 2 locations) · ×1
  • Duplicated block (69 lines × 2 locations) apps/client/src/components/leo/modals/NameSearchModal/ManageCitizenFlagsModal.tsx:13 — apps/client/src/components/leo/modals/NameSearchModal/ManageCitizenFlagsModal.tsx:13 · apps/client/src/components/leo/modals/NameSearchModal/manage-citizen-address-flags-modal.tsx:13 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block with local edits (68 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (68 matched lines × 2 locations) apps/client/src/components/citizen/vehicles/vehicles-card.tsx:89 — apps/client/src/components/citizen/vehicles/vehicles-card.tsx:89 · apps/client/src/components/citizen/weapons/weapons-card.tsx:77 — the two spans are one implementation copied and then locally edited — 469 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (66 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (66 matched lines × 2 locations) apps/client/src/components/courthouse/court-entries/manage-court-entry-modal.tsx:31 — apps/client/src/components/courthouse/court-entries/manage-court-entry-modal.tsx:31 · apps/client/src/components/courthouse/courthouse-posts/manage-courthouse-post-modal.tsx:22 — the two spans are one implementation copied and then locally edited — 377 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (65 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (65 matched lines × 2 locations) apps/client/src/components/admin/manage/cad-settings/discord-webhooks/discord-webhooks-tab.tsx:85 — apps/client/src/components/admin/manage/cad-settings/discord-webhooks/discord-webhooks-tab.tsx:85 · apps/client/src/components/admin/manage/cad-settings/webhooks/raw-webhooks-tab.tsx:77 — the two spans are one implementation copied and then locally edited — 272 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R2 · Cyclomatic Complexity · Complex function createInitialValues (cyclomatic 81, cognitive 76) · ×1
  • Complex function createInitialValues (cyclomatic 81, cognitive 76) apps/client/src/components/admin/values/ManageValueModal.tsx:92 — createInitialValues has cyclomatic complexity 81 and cognitive complexity 76; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ManageLicensesFormFields (cyclomatic 55, cognitive 54) · ×1
  • Complex function ManageLicensesFormFields (cyclomatic 55, cognitive 54) apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx:75 — ManageLicensesFormFields has cyclomatic complexity 55 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function upsertRecord (cyclomatic 47, cognitive 49) · ×1
  • Complex function upsertRecord (cyclomatic 47, cognitive 49) apps/api/src/lib/leo/records/upsert-record.ts:30 — upsertRecord has cyclomatic complexity 47 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (top-level) (cyclomatic 45, cognitive 47) · ×1
  • Complex function (top-level) (cyclomatic 45, cognitive 47) REDACTED:1 — (top-level) has cyclomatic complexity 45 and cognitive complexity 47; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function TableItemForm (cyclomatic 35, cognitive 22) · ×1
  • Complex function TableItemForm (cyclomatic 35, cognitive 22) apps/client/src/components/leo/modals/manage-record/table-item-form.tsx:81 — TableItemForm has cyclomatic complexity 35 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function get (cyclomatic 31, cognitive 26) · ×1
  • Complex function get (cyclomatic 31, cognitive 26) apps/client/src/lib/admin/values/values.tsx:43 — get has cyclomatic complexity 31 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function createInitialRecordValues (cyclomatic 30, cognitive 23) · ×1
  • Complex function createInitialRecordValues (cyclomatic 30, cognitive 23) apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx:102 — createInitialRecordValues has cyclomatic complexity 30 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ManageCitizenForm (cyclomatic 28, cognitive 27) · ×1
  • Complex function ManageCitizenForm (cyclomatic 28, cognitive 27) apps/client/src/components/citizen/ManageCitizenForm.tsx:54 — ManageCitizenForm has cyclomatic complexity 28 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 28, cognitive 27) · ×1
  • Complex function (anonymous) (cyclomatic 28, cognitive 27) apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx:176 — (anonymous) has cyclomatic complexity 28 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function validateRecordData (cyclomatic 28, cognitive 23) · ×1
  • Complex function validateRecordData (cyclomatic 28, cognitive 23) apps/api/src/lib/leo/records/validate-record-data.ts:29 — validateRecordData has cyclomatic complexity 28 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function PlayerMarker (cyclomatic 27, cognitive 27) · ×1
  • Complex function PlayerMarker (cyclomatic 27, cognitive 27) apps/client/src/components/dispatch/map/units/player-marker.tsx:28 — PlayerMarker has cyclomatic complexity 27 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (top-level) (cyclomatic 26, cognitive 26) · ×1
  • Complex function (top-level) (cyclomatic 26, cognitive 26) REDACTED:1 — (top-level) has cyclomatic complexity 26 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function createDefaultLicensesValues (cyclomatic 26, cognitive 25) · ×1
  • Complex function createDefaultLicensesValues (cyclomatic 26, cognitive 25) apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx:17 — createDefaultLicensesValues has cyclomatic complexity 26 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 26, cognitive 23) · ×1
  • Complex function (anonymous) (cyclomatic 26, cognitive 23) apps/client/src/components/ems-fd/modals/search-medical-records/search-medical-records-modal.tsx:109 — (anonymous) has cyclomatic complexity 26 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ManageIncidentModal (cyclomatic 26, cognitive 23) · ×1
  • Complex function ManageIncidentModal (cyclomatic 26, cognitive 23) apps/client/src/components/leo/incidents/manage-incident-modal.tsx:74 — ManageIncidentModal has cyclomatic complexity 26 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function execute (cyclomatic 25, cognitive 36) · ×1
  • Complex function execute (cyclomatic 25, cognitive 36) apps/client/src/lib/useFetch.tsx:57 — execute has cyclomatic complexity 25 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function upsertOfficer (cyclomatic 25, cognitive 28) · ×1
  • Complex function upsertOfficer (cyclomatic 25, cognitive 28) apps/api/src/controllers/leo/my-officers/upsert-officer.ts:50 — upsertOfficer has cyclomatic complexity 25 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (top-level) (cyclomatic 24, cognitive 24) · ×1
  • Complex function (top-level) (cyclomatic 24, cognitive 24) REDACTED:1 — (top-level) has cyclomatic complexity 24 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function RegisterVehicleModal (cyclomatic 23, cognitive 22) · ×1
  • Complex function RegisterVehicleModal (cyclomatic 23, cognitive 22) apps/client/src/components/citizen/vehicles/modals/register-vehicle-modal.tsx:52 — RegisterVehicleModal has cyclomatic complexity 23 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 21, cognitive 19) · ×1
  • Complex function (anonymous) (cyclomatic 21, cognitive 19) apps/client/src/components/dispatch/active-calls/modals/manage-911-call-form.tsx:128 — (anonymous) has cyclomatic complexity 21 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 20, cognitive 19) · ×1
  • Complex function (anonymous) (cyclomatic 20, cognitive 19) apps/client/src/components/dispatch/active-units/officers/active-officers.tsx:132 — (anonymous) has cyclomatic complexity 20 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 20, cognitive 18) · ×1
  • Complex function (anonymous) (cyclomatic 20, cognitive 18) apps/client/src/components/leo/modals/VehicleSearchModal.tsx:146 — (anonymous) has cyclomatic complexity 20 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function OfficerColumn (cyclomatic 20, cognitive 16) · ×1
  • Complex function OfficerColumn (cyclomatic 20, cognitive 16) apps/client/src/components/dispatch/active-units/officers/columns/officer-column.tsx:41 — OfficerColumn has cyclomatic complexity 20 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function citizenObjectFromData (cyclomatic 19, cognitive 18) · ×1
  • Complex function citizenObjectFromData (cyclomatic 19, cognitive 18) apps/api/src/lib/citizen/citizen-create-data-obj.ts:16 — citizenObjectFromData has cyclomatic complexity 19 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function CitizenId (cyclomatic 19, cognitive 18) · ×1
  • Complex function CitizenId (cyclomatic 19, cognitive 18) apps/client/src/pages/citizen/[id]/index.tsx:48 — CitizenId has cyclomatic complexity 19 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function DeputyColumn (cyclomatic 19, cognitive 15) · ×1
  • Complex function DeputyColumn (cyclomatic 19, cognitive 15) apps/client/src/components/dispatch/active-units/deputies/deputy-column.tsx:42 — DeputyColumn has cyclomatic complexity 19 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getSessionUser (cyclomatic 18, cognitive 18) · ×1
  • Complex function getSessionUser (cyclomatic 18, cognitive 18) apps/api/src/lib/auth/getSessionUser.ts:65 — getSessionUser has cyclomatic complexity 18 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 18, cognitive 17) · ×1
  • Complex function (anonymous) (cyclomatic 18, cognitive 17) apps/client/src/components/admin/values/ManageValueModal.tsx:312 — (anonymous) has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ManagePenalCode (cyclomatic 18, cognitive 17) · ×1
  • Complex function ManagePenalCode (cyclomatic 18, cognitive 17) apps/client/src/components/admin/values/penal-codes/manage-penal-code-modal.tsx:25 — ManagePenalCode has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ManageCitizens (cyclomatic 18, cognitive 17) · ×1
  • Complex function ManageCitizens (cyclomatic 18, cognitive 17) apps/client/src/pages/admin/manage/users/[id].tsx:65 — ManageCitizens has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ModalButtons (cyclomatic 18, cognitive 15) · ×1
  • Complex function ModalButtons (cyclomatic 18, cognitive 15) apps/client/src/components/leo/ModalButtons.tsx:49 — ModalButtons has cyclomatic complexity 18 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 17, cognitive 24) · ×1
  • Complex function (anonymous) (cyclomatic 17, cognitive 24) REDACTED:91 — (anonymous) has cyclomatic complexity 17 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function Nav (cyclomatic 17, cognitive 16) · ×1
  • Complex function Nav (cyclomatic 17, cognitive 16) apps/client/src/components/shared/nav/Nav.tsx:27 — Nav has cyclomatic complexity 17 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function upsertEmsFdDeputy (cyclomatic 16, cognitive 16) · ×1
  • Complex function upsertEmsFdDeputy (cyclomatic 16, cognitive 16) apps/api/src/lib/ems-fd/upsert-ems-fd-deputy.ts:37 — upsertEmsFdDeputy has cyclomatic complexity 16 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 16, cognitive 14) · ×1
  • Complex function (anonymous) (cyclomatic 16, cognitive 14) apps/client/src/components/leo/incidents/manage-incident-modal.tsx:199 — (anonymous) has cyclomatic complexity 16 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function createSearchWhereObject (cyclomatic 15, cognitive 28) · ×1
  • Complex function createSearchWhereObject (cyclomatic 15, cognitive 28) apps/api/src/lib/values/create-where-object.ts:12 — createSearchWhereObject has cyclomatic complexity 15 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 900 lines of code REDACTED:1 — REDACTED has 900 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 654 lines of code REDACTED:1 — REDACTED has 654 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/api/src/controllers/leo/search/SearchActionsController.ts · ×1
  • apps/api/src/controllers/leo/search/SearchActionsController.ts: 646 lines of code apps/api/src/controllers/leo/search/SearchActionsController.ts:1 — apps/api/src/controllers/leo/search/SearchActionsController.ts has 646 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 632 lines of code REDACTED:1 — REDACTED has 632 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 604 lines of code REDACTED:1 — REDACTED has 604 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 599 lines of code REDACTED:1 — REDACTED has 599 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 597 lines of code REDACTED:1 — REDACTED has 597 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 579 lines of code REDACTED:1 — REDACTED has 579 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx · ×1
  • apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx: 533 lines of code apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx:1 — apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx has 533 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 509 lines of code REDACTED:1 — REDACTED has 509 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx · ×1
  • apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx: 507 lines of code apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx:1 — apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx has 507 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 503 lines of code REDACTED:1 — REDACTED has 503 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 499 lines of code REDACTED:1 — REDACTED has 499 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 469 lines of code REDACTED:1 — REDACTED has 469 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/client/src/components/admin/values/ManageValueModal.tsx · ×1
  • apps/client/src/components/admin/values/ManageValueModal.tsx: 425 lines of code apps/client/src/components/admin/values/ManageValueModal.tsx:1 — apps/client/src/components/admin/values/ManageValueModal.tsx has 425 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx · ×1
  • apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx: 413 lines of code apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx:1 — apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx has 413 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · apps/client/src/pages/admin/values/[path].tsx · ×1
  • apps/client/src/pages/admin/values/[path].tsx: 402 lines of code apps/client/src/pages/admin/values/[path].tsx:1 — apps/client/src/pages/admin/values/[path].tsx has 402 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R7 · Dead Code · Dead file (~1044 LoC) · ×1
  • Dead file (~1044 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 4 in-repo import(s) from 4 other file(s) do name it (REDACTED, REDACTED, REDACTED and 1 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~754 LoC) · ×1
  • Dead file (~754 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~747 LoC) · ×1
  • Dead file (~747 LoC) apps/api/src/controllers/leo/search/SearchActionsController.ts — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~725 LoC) · ×1
  • Dead file (~725 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/api/src/controllers/auth/auth-controller.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~689 LoC) · ×1
  • Dead file (~689 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~680 LoC) · ×1
  • Dead file (~680 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~667 LoC) · ×1
  • Dead file (~667 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~659 LoC) · ×1
  • Dead file (~659 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~589 LoC) · ×1
  • Dead file (~589 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (apps/api/src/lib/values/create-where-object.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~572 LoC) · ×1
  • Dead file (~572 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 16 in-repo import(s) from 16 other file(s) do name it (REDACTED, REDACTED, REDACTED and 13 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~560 LoC) · ×1
  • Dead file (~560 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~537 LoC) · ×1
  • Dead file (~537 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~451 LoC) · ×1
  • Dead file (~451 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~441 LoC) · ×1
  • Dead file (~441 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 5 in-repo import(s) from 5 other file(s) do name it (REDACTED, REDACTED, REDACTED and 2 more) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~431 LoC) · ×1
  • Dead file (~431 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~420 LoC) · ×1
  • Dead file (~420 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~345 LoC) · ×1
  • Dead file (~345 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~339 LoC) · ×1
  • Dead file (~339 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~326 LoC) · ×1
  • Dead file (~326 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (REDACTED, apps/api/src/controllers/leo/search/SearchActionsController.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~308 LoC) · ×1
  • Dead file (~308 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~302 LoC) · ×1
  • Dead file (~302 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~293 LoC) · ×1
  • Dead file (~293 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~289 LoC) · ×1
  • Dead file (~289 LoC) apps/api/src/controllers/leo/my-officers/upsert-officer.ts — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (REDACTED, REDACTED, REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~281 LoC) · ×1
  • Dead file (~281 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~278 LoC) · ×1
  • Dead file (~278 LoC) apps/api/src/controllers/admin/manage/units/department-time-logs-controller.ts — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~277 LoC) · ×1
  • Dead file (~277 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~264 LoC) · ×1
  • Dead file (~264 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~252 LoC) · ×1
  • Dead file (~252 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~249 LoC) · ×1
  • Dead file (~249 LoC) apps/api/src/lib/leo/records/upsert-record.ts — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (REDACTED, apps/api/src/lib/leo/records/create-citizen-violations.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~245 LoC) · ×1
  • Dead file (~245 LoC) apps/api/src/controllers/auth/auth-controller.ts — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (REDACTED, REDACTED) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~242 LoC) · ×1
  • Dead file (~242 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~232 LoC) · ×1
  • Dead file (~232 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (REDACTED, apps/api/src/controllers/leo/my-officers/upsert-officer.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~222 LoC) · ×1
  • Dead file (~222 LoC) apps/api/src/lib/dispatch/911-calls/assign-units-to-911-call.ts — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (REDACTED, apps/api/src/lib/dispatch/911-calls/utils/create-assigned-text.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~218 LoC) · ×1
  • Dead file (~218 LoC) REDACTED — no import path from any entry point (98 application, 14 tooling, 45 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unused dependency '@faker-js/faker' · ×1
  • Unused dependency '@faker-js/faker' REDACTED:36 — Declared in the root REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'lerna' · ×1
  • Unused dependency 'lerna' REDACTED:26 — Declared in the root REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@snailycad/prisma-generator-redundant-types' · ×1
  • Unused dependency '@snailycad/prisma-generator-redundant-types' REDACTED:50 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'regenerator-runtime' · ×1
  • Unused dependency 'regenerator-runtime' REDACTED:35 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'tsconfig-paths' · ×1
  • Unused dependency 'tsconfig-paths' REDACTED:36 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@radix-ui/react-toolbar' · ×1
  • Unused dependency '@radix-ui/react-toolbar' REDACTED:26 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@react-aria/dialog' · ×1
  • Unused dependency '@react-aria/dialog' REDACTED:78 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@react-stately/select' · ×1
  • Unused dependency '@react-stately/select' REDACTED:101 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'prop-types' · ×1
  • Unused dependency 'prop-types' REDACTED:36 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'tailwind-merge' · ×1
  • Unused dependency 'tailwind-merge' REDACTED:120 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×1
  • Untrusted text written into markup unescaped apps/client/src/components/dispatch/map/render-map-blips.tsx:122 — `blipCss` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Minor — 641 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×458
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/api/src/controllers/leo/search/SearchActionsController.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/client/src/components/admin/values/ManageValueModal.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/client/src/pages/admin/values/[path].tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/client/src/components/admin/manage/cad-settings/discord-roles-tab.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/client/src/components/ems-fd/modals/search-medical-records/search-medical-records-modal.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/client/src/components/leo/modals/VehicleSearchModal.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/types/src/index.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/client/src/components/admin/manage/cad-settings/live-map-tab.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/client/src/components/citizen/ManageCitizenForm.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/client/src/components/leo/incidents/manage-incident-modal.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file apps/client/src/components/citizen/vehicles/modals/register-vehicle-modal.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 433 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate packages/ui/src/components/fields/async-list-search-field/actions.tsx:19 — `!!props.errorMessage && "!border-red-500 focus:!border-red-700 dark:!focus:border-red-700"` appears character-identically in 2 files — packages/ui/src/components/fields/async-list-search-field/actions.tsx, packages/ui/src/components/inputs/select/select-actions.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:250 — `!business || business.status === WhitelistStatus.DECLINED` appears character-identically in 2 files — REDACTED, apps/api/src/utils/businesses.ts. 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 apps/client/src/components/leo/modals/NameSearchModal/ManageCitizenFlagsModal.tsx:44 — `!currentResult || currentResult.isConfidential` appears character-identically in 14 files — apps/client/src/components/leo/modals/NameSearchModal/ManageCitizenFlagsModal.tsx, apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx, apps/client/src/components/leo/modals/NameSearchModal/manage-citizen-address-flags-modal.tsx, apps/client/src/components/leo/modals/NameSearchModal/sections/basic-information.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:531 — `!data.divisions || data.divisions.length <= 0` appears character-identically in 2 files — REDACTED, apps/api/src/controllers/leo/my-officers/upsert-officer.ts. 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 packages/ui/src/components/fields/async-list-search-field.tsx:178 — `!props.isDisabled && "group-hover:dark:!border-gray-500 group-hover:!border-gray-500"` appears character-identically in 2 files — packages/ui/src/components/fields/async-list-search-field.tsx, packages/ui/src/components/fields/async-list-search-field/actions.tsx. 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 apps/client/src/components/admin/manage/units/tabs/callsigns-tab/manage-unit-callsign-modal.tsx:109 — `!value.officerRankDepartments || value.officerRankDepartments.length <= 0` appears character-identically in 2 files — apps/client/src/components/admin/manage/units/tabs/callsigns-tab/manage-unit-callsign-modal.tsx, apps/client/src/components/admin/manage/units/tabs/manage-unit-tab/manage-unit-tab.tsx. 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 apps/api/src/lib/dispatch/911-calls/assign-units-to-911-call.ts:34 — `"disconnect" in data && data.disconnect?.id` appears character-identically in 2 files — apps/api/src/lib/dispatch/911-calls/assign-units-to-911-call.ts, apps/api/src/lib/incidents/handle-involved-units.ts. 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 apps/client/src/components/leo/modals/CustomFieldsArea.tsx:22 — `"isConfidential" in currentResult && currentResult.isConfidential` appears character-identically in 2 files — apps/client/src/components/leo/modals/CustomFieldsArea.tsx, apps/client/src/components/leo/modals/NameSearchModal/tabs/notes-tab.tsx. 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 apps/client/src/components/dispatch/active-units/private-messages/send-message-form/send-message-form.tsx:50 — `(event.metaKey || event.ctrlKey) && event.key === "Enter"` appears character-identically in 2 files — apps/client/src/components/dispatch/active-units/private-messages/send-message-form/send-message-form.tsx, apps/client/src/components/dispatch/events/UpdateEventForm.tsx. 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 apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx:240 — `Array.isArray(results) && !currentResult` appears character-identically in 2 files — apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx, apps/client/src/components/leo/modals/business-search-modal/business-search-modal.tsx. 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 apps/client/src/pages/auth/login.tsx:70 — `CORS_ORIGIN_URL?.includes("localhost") || NEXT_PUBLIC_CLIENT_URL?.includes("localhost")` appears character-identically in 2 files — apps/client/src/pages/auth/login.tsx, apps/client/src/pages/auth/register.tsx. 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 apps/client/src/components/auth/login/login-form.tsx:104 — `DISCORD_AUTH && useThirdPartyConnectionsAbility` appears character-identically in 2 files — apps/client/src/components/auth/login/login-form.tsx, apps/client/src/pages/auth/pending.tsx. 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 apps/client/src/components/ems-fd/modals/search-medical-records/search-medical-records-modal.tsx:158 — `SOCIAL_SECURITY_NUMBERS && item.socialSecurityNumber` appears character-identically in 4 files — apps/client/src/components/ems-fd/modals/search-medical-records/search-medical-records-modal.tsx, apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx, apps/client/src/components/shared/CitizenSuggestionsField.tsx, apps/client/src/pages/officer/jail.tsx. 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 apps/client/src/components/auth/login/login-form.tsx:103 — `STEAM_OAUTH && useThirdPartyConnectionsAbility` appears character-identically in 2 files — apps/client/src/components/auth/login/login-form.tsx, apps/client/src/pages/auth/pending.tsx. 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 apps/client/src/components/form/FormField.tsx:63 — `["__Input__", "__Textarea__"].includes(child?.type?.displayName) || child?.type?.name === "Select"` appears character-identically in 2 files — apps/client/src/components/form/FormField.tsx, apps/client/src/components/form/SettingsFormField.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:234 — `activeDispatcher?.departmentId || undefined` appears character-identically in 2 files — REDACTED, REDACTED. 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 apps/client/src/components/dispatch/active-calls/modals/call-tow-modal.tsx:74 — `activeUnit && (isUnitCombined(activeUnit) || isUnitCombinedEmsFd(activeUnit))` appears character-identically in 2 files — apps/client/src/components/dispatch/active-calls/modals/call-tow-modal.tsx, apps/client/src/components/dispatch/active-units/modals/merge-unit-modal.tsx. 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 apps/client/src/components/admin/manage/units/tabs/all-units-tab/prune-units-modal.tsx:179 — `asyncTable.isLoading || state === "loading"` appears character-identically in 2 files — apps/client/src/components/admin/manage/units/tabs/all-units-tab/prune-units-modal.tsx, apps/client/src/components/admin/manage/users/modals/prune-users-modal.tsx. 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 apps/client/src/components/admin/AdminLayout.tsx:38 — `cad?.version?.latestReleaseVersion && parseCadVersion(cad.version.latestReleaseVersion) > parseCadVersion(cad.version.currentVersion)` appears character-identically in 2 files — apps/client/src/components/admin/AdminLayout.tsx, apps/client/src/components/admin/cad-settings/layout.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:180 — `data.socialSecurityNumber && isEditableSSNEnabled` appears character-identically in 3 files — REDACTED, REDACTED, apps/api/src/controllers/leo/search/SearchActionsController.ts. 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 packages/ui/src/components/inputs/input.tsx:17 — `errorMessage && "border-red-500 dark:border-red-500 focus:border-red-700 dark:focus:border-red-700"` appears character-identically in 2 files — packages/ui/src/components/inputs/input.tsx, packages/ui/src/components/inputs/textarea.tsx. 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 apps/client/src/components/admin/manage/units/tabs/manage-unit-tab/manage-unit-tab.tsx:274 — `hasManageAwardsPermissions || hasManagePermissions` appears character-identically in 2 files — apps/client/src/components/admin/manage/units/tabs/manage-unit-tab/manage-unit-tab.tsx, apps/client/src/pages/admin/manage/units/[id].tsx. 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 apps/api/src/controllers/leo/my-officers/upsert-officer.ts:128 — `isBadgeNumbersEnabled && !data.badgeNumberString` appears character-identically in 2 files — apps/api/src/controllers/leo/my-officers/upsert-officer.ts, apps/api/src/lib/ems-fd/upsert-ems-fd-deputy.ts. 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 apps/client/src/components/dispatch/active-calls/active-calls.tsx:154 — `isUnitAssigned && "bg-gray-200 dark:bg-amber-900"` appears character-identically in 2 files — apps/client/src/components/dispatch/active-calls/active-calls.tsx, apps/client/src/components/dispatch/active-incidents/active-incidents.tsx. 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 apps/client/src/components/dispatch/active-calls/modals/add-unit-to-call-modal.tsx:268 — `isUnitCombined(unit) || isUnitCombinedEmsFd(unit)` appears character-identically in 3 files — apps/client/src/components/dispatch/active-calls/modals/add-unit-to-call-modal.tsx, apps/client/src/components/dispatch/active-units/modals/unit-radio-channel-modal.tsx, apps/client/src/lib/utils.ts. 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.
  • + 15 more in this group — see findings.md.
X7 · Silent fallback defaults · Pending state with no failure state · ×31
  • Pending state with no failure state apps/client/src/pages/pets/[id]/index.tsx:31 — The view draws `<div class="grid w-full h-full place-content-center py-32">` under `! currentPet`, but `currentPet` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/pages/officer/call-history.tsx:128 — The view draws `<Loader/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/pages/bleeter/@/[handle].tsx:116 — The view draws `<Loader/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/pages/admin/manage/businesses/index.tsx:202 — The view draws `<Loader class="mr-2 border-red-200"/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/shared/utility-panel/edit-dashboard-layout-modal.tsx:123 — The view draws `<Loader/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/leo/qualifications/ActiveUnitsQualificationsCard.tsx:94 — The view draws `<Loader/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/leo/modals/AllowImpoundedVehicleCheckoutModal.tsx:57 — The view draws `<Loader class="mr-2 border-red-200"/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/leo/modals/ManageOfficerModal.tsx:142 — The view draws `<Loader class="mr-2"/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/leo/modals/NameSearchModal/tabs/records-tab.tsx:296 — The view draws `<Loader class="w-3 h-3"/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/leo/modals/NameSearchModal/sections/license-points/manage-license-points-modal.tsx:96 — The view draws `<Loader class="mr-2"/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/leo/incidents/incidents-table.tsx:134 — The view draws `<Loader/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/leo/incidents/involved-units/involved-units-table.tsx:135 — The view draws `<Loader/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/dispatch/modals/enable-signal-100-modal.tsx:78 — The view draws `<Loader class="mr-2"/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/dispatch/modals/select-department-modal.tsx:83 — The view draws `<Loader class="mr-2"/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/dispatch/active-units/modals/manage-unit-modal.tsx:125 — The view draws `<Loader class="mr-2 border-red-200"/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/dispatch/active-units/modals/manage-unit-modal.tsx:136 — The view draws `<Loader class="mr-2 border-red-200"/>` under `statusState === "loading"`, but `statusState` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/citizen/tow/assign-to-tow-taxi-call.tsx:93 — The view draws `<Loader class="mr-2"/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/citizen/records/citizen-records-card.tsx:27 — The view draws `<div class="p-4 card">` under `isInitialLoading || ! data`, but `isInitialLoading` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/bleeter/modals/followers-following-modal.tsx:73 — The view draws `<Loader/>` under `isLoading || ! data`, but `isLoading` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/admin/manage/users/danger-zone.tsx:80 — The view draws `<Loader class="mr-3"/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/admin/manage/users/danger-zone.tsx:90 — The view draws `<Loader class="mr-3"/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/admin/manage/users/danger-zone.tsx:101 — The view draws `<Loader class="mr-3"/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/admin/manage/users/danger-zone.tsx:113 — The view draws `<Loader class="mr-3"/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/admin/manage/users/modals/give-temp-password-modal.tsx:53 — The view draws `<Loader/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state apps/client/src/components/admin/manage/users/modals/manage-permissions-modal.tsx:128 — The view draws `<Loader/>` under `state === "loading"`, but `state` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • + 6 more in this group — see findings.md.
P2 · Observability · Console output used as the logging channel · ×29
  • Console output used as the logging channel apps/api/src/utils/check-for-updates.ts:22 — `apps/api/src/utils/check-for-updates.ts` reports through `console.*` at line 22 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/api/src/utils/check-for-updates.ts:40 — `apps/api/src/utils/check-for-updates.ts` reports through `console.*` at line 40 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/api/src/utils/validate-environment-variables.ts:10 — `apps/api/src/utils/validate-environment-variables.ts` reports through `console.*` at line 10 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/api/src/utils/validate-requirements.ts:35 — `apps/api/src/utils/validate-requirements.ts` reports through `console.*` at line 35 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/api/src/middlewares/handle-inactivity.ts:116 — `apps/api/src/middlewares/handle-inactivity.ts` reports through `console.*` at line 116 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/api/src/middlewares/handle-inactivity.ts:126 — `apps/api/src/middlewares/handle-inactivity.ts` reports through `console.*` at line 126 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/api/src/middlewares/handle-inactivity.ts:171 — `apps/api/src/middlewares/handle-inactivity.ts` reports through `console.*` at line 171 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/api/src/middlewares/handle-inactivity.ts:184 — `apps/api/src/middlewares/handle-inactivity.ts` reports through `console.*` at line 184 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/api/src/middlewares/handle-inactivity.ts:196 — `apps/api/src/middlewares/handle-inactivity.ts` reports through `console.*` at line 196 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/api/src/middlewares/handle-inactivity.ts:197 — `apps/api/src/middlewares/handle-inactivity.ts` reports through `console.*` at line 197 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/api/src/lib/leo/send-panic-button-webhook.ts:53 — `apps/api/src/lib/leo/send-panic-button-webhook.ts` reports through `console.*` at line 53 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/api/src/lib/leo/setInactiveUnitsOffDuty.ts:64 — `apps/api/src/lib/leo/setInactiveUnitsOffDuty.ts` reports through `console.*` at line 64 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/api/src/lib/images/generate-image-blur-data.ts:52 — `apps/api/src/lib/images/generate-image-blur-data.ts` reports through `console.*` at line 52 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/api/src/lib/dispatch/911-calls/handle-end-911-call.ts:49 — `apps/api/src/lib/dispatch/911-calls/handle-end-911-call.ts` reports through `console.*` at line 49 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/api/src/lib/discord/register-metadata.ts:37 — `apps/api/src/lib/discord/register-metadata.ts` reports through `console.*` at line 37 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/api/src/lib/discord/webhooks.ts:47 — `apps/api/src/lib/discord/webhooks.ts` reports through `console.*` at line 47 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/api/src/lib/discord/webhooks.ts:72 — `apps/api/src/lib/discord/webhooks.ts` reports through `console.*` at line 72 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/api/src/lib/data/prisma.ts:15 — `apps/api/src/lib/data/prisma.ts` reports through `console.*` at line 15 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/api/src/lib/data/prisma.ts:17 — `apps/api/src/lib/data/prisma.ts` reports through `console.*` at line 17 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:312 — `REDACTED` reports through `console.*` at line 312 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:407 — `REDACTED` reports through `console.*` at line 407 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:657 — `REDACTED` reports through `console.*` at line 657 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/api/src/controllers/leo/search/SearchActionsController.ts:589 — `apps/api/src/controllers/leo/search/SearchActionsController.ts` reports through `console.*` at line 589 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:136 — `REDACTED` reports through `console.*` at line 136 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/api/src/controllers/dispatch/status-controller.ts:374 — `apps/api/src/controllers/dispatch/status-controller.ts` reports through `console.*` at line 374 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • + 4 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · Low CVE · ×19
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D12 · Dependency Hygiene · Deprecated · ×12
  • Deprecated: @babel/plugin-proposal-class-properties REDACTED:1135 — @babel/plugin-proposal-class-properties 7.18.6 is resolved in REDACTED and is marked deprecated by its publisher: "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: @babel/plugin-proposal-nullish-coalescing-operator REDACTED:1142 — @babel/plugin-proposal-nullish-coalescing-operator 7.18.6 is resolved in REDACTED and is marked deprecated by its publisher: "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: @babel/plugin-proposal-optional-chaining REDACTED:1149 — @babel/plugin-proposal-optional-chaining 7.21.0 is resolved in REDACTED and is marked deprecated by its publisher: "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: @storybook/expect REDACTED:4724 — @storybook/expect 28.1.3-5 is resolved in REDACTED and is marked deprecated by its publisher: "In Storybook 8, this package functionality has been integrated to a new package called @storybook/test, which uses Vitest APIs for an improved experience. When upgrading to Storybook 8 with 'npx storybook@latest upgrade', you will get prompted and will get an automigration for the new package. Please migrate when you can.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: glob REDACTED:7836 — glob 7.1.4 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: glob REDACTED:7840 — glob 7.1.6 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: glob REDACTED:7844 — glob 7.1.7 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: glob REDACTED:7848 — glob 7.2.3 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: glob REDACTED:7852 — glob 8.1.0 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: rimraf REDACTED:10817 — rimraf 2.6.3 is resolved in REDACTED and is marked deprecated by its publisher: "Rimraf versions prior to v4 are no longer supported". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: rimraf REDACTED:10822 — rimraf 2.7.1 is resolved in REDACTED and is marked deprecated by its publisher: "Rimraf versions prior to v4 are no longer supported". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: rimraf REDACTED:10827 — rimraf 3.0.2 is resolved in REDACTED and is marked deprecated by its publisher: "Rimraf versions prior to v4 are no longer supported". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
D12 · Dependency Hygiene · Outdated (npm) · ×8
  • Outdated (npm): @sentry/browser REDACTED:31 — @sentry/browser is pinned at 7.81.1; registry.npmjs.org publishes 11.14.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @sentry/nextjs REDACTED:32 — @sentry/nextjs is pinned at 7.81.1; registry.npmjs.org publishes 11.14.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @sentry/node REDACTED:45 — @sentry/node is pinned at 8.8.0; registry.npmjs.org publishes 11.14.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): ejs REDACTED:76 — ejs is pinned at 3.1.10; registry.npmjs.org publishes 7.0.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): glob REDACTED:78 — glob is pinned at 10.4.1; registry.npmjs.org publishes 14.0.6 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): nanoid REDACTED:83 — nanoid is pinned at 3.3.6; registry.npmjs.org publishes 6.0.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): prisma REDACTED:86 — prisma is pinned at 5.15.0; registry.npmjs.org publishes 8.0.0-rc.34 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): uuid REDACTED:96 — uuid is pinned at 10.0.0; registry.npmjs.org publishes 14.0.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
X7 · Silent fallback defaults · Silent fallback default in catch · ×8
  • Silent fallback default in catch REDACTED:585 — `deleteById` swallows every exception into `return false` — 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.
  • Silent fallback default in catch apps/api/src/controllers/leo/create-where-obj.ts:88 — `getName` swallows every exception into `return []` — 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.
  • Silent fallback default in catch apps/api/src/utils/get-translator.ts:53 — `loadDefaultLocale` swallows every exception into `return "en"` — 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.
  • Silent fallback default in catch apps/client/src/components/admin/manage/audit-logs/view-audit-logs-diff-modal.tsx:65 — `parseAuditLogData` 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.
  • Silent fallback default in catch apps/client/src/components/admin/values/ManageValueModal.tsx:466 — `safelyParseJSON` swallows every exception into `return false` — 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.
  • Silent fallback default in catch apps/client/src/components/admin/values/ManageValueModal.tsx:476 — `safelyStringifyJSON` swallows every exception into `return "null"` — 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.
  • Silent fallback default in catch apps/client/src/lib/getTranslation.ts:27 — `getTranslations` swallows every exception into `return {}` — 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.
  • Silent fallback default in catch apps/client/src/lib/getTranslation.ts:36 — `loadTranslationPath` swallows every exception into `return {}` — 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.
D19 · Documentation Quality · Documentation · ×6
  • Documentation: no build, run or usage example packages/audit-logger/README.md:1 — `audit-logger` is a published package (`REDACTED` without `"private": true`) and neither `packages/audit-logger/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example packages/config/README.md:1 — `config` is a published package (`REDACTED` without `"private": true`) and neither `packages/config/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example packages/permissions/README.md:1 — `permissions` is a published package (`REDACTED` without `"private": true`) and neither `packages/permissions/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example packages/schemas/README.md:1 — `schemas` is a published package (`REDACTED` without `"private": true`) and neither `packages/schemas/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example packages/types/README.md:1 — `types` is a published package (`REDACTED` without `"private": true`) and neither `packages/types/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example packages/utils/README.md:1 — `utils` is a published package (`REDACTED` without `"private": true`) and neither `packages/utils/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
D34 · Knowledge Freshness · Most significant orphaned file · ×3
  • Most significant orphaned file apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file apps/client/src/components/leo/modals/manage-record/manage-record-modal.tsx:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file REDACTED:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×2
  • Projects may be oversized for their cohesion REDACTED:1 — `apps/client` (53535 LoC, 525 module-visible types across 186 directories) overshoots its size bounds. 2 of 10 build unit(s) (npm) overshoot their size bounds, lowering Project Cohesion to 6.0/10. 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.
  • Projects may be oversized for their cohesion REDACTED:1 — `apps/api` (23811 LoC, 190 module-visible types across 49 directories) overshoots its size bounds. 2 of 10 build unit(s) (npm) overshoot their size bounds, lowering Project Cohesion to 6.0/10. 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.
R8 · Dependency Hygiene · Type-only dependency '@react-types/shared' in production deps · ×2
  • Type-only dependency '@react-types/shared' in production deps apps/client/src/components/form/inputs/value-select-field.tsx:6 — Every import is type-only — move it to devDependencies.
  • Type-only dependency '@react-types/shared' in production deps packages/ui/src/components/error-message.tsx:1 — Every import is type-only — move it to devDependencies.
C3 · Audit Trail · Partial audit-trail evidence · ×1
  • Partial audit-trail evidence — An audit mechanism is present, but the trail is not yet complete — missing: an ORM write hook every change flows through (a TypeORM/MikroORM subscriber, a Sequelize or Mongoose hook, Prisma middleware or a query extension, or an event-store append), per-model coverage (@Audited, or a change-history plugin such as mongoose-history or sequelize-paper-trail applied to each model).
C5 · Data-Subject Rights · Partial data-subject-rights support · ×1
  • Partial data-subject-rights support — Corroborated rights: erasure ✓ · export ✗ · consent ✗. Each tick means this scan found code in the repository implementing that right — a deletion/anonymisation path for erasure, a data-export or portability path for export, and consent state recorded alongside the personal data it authorises. A ✗ therefore means no such code was recognised HERE, not that the right is unsupported: a capability provided by a platform, a manual runbook, or code spelled in a way this scan does not match is not visible to it. Confirm before treating a cross as a gap; where it is one, the right has to be fulfilled manually.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found REDACTED:6 — 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/`. ADRs are expected here because `REDACTED` makes this repository a deployable product (line 6).
D21 · Naming Consistency · `EmsFDDashboard` spells `FD` where 22 names in the project spell it `Fd` · ×1
  • `EmsFDDashboard` spells `FD` where 22 names in the project spell it `Fd` apps/client/src/pages/ems-fd/index.tsx:81 — 22 of 24 names in project snailycad spell the token `Fd` (22 of 24; unit: names in project snailycad containing `Fd`). Peers: TemporaryUnitsController.createTemporaryEmsFdDeputy (REDACTED:78); apps.api.src.controllers.ems-fd.ems-fd-controller.EmsFdController (REDACTED:51); EmsFdController.getDeputyLogs(emsFdDeputyId) (REDACTED:89); EmsFdController.createEmsFdDeputy (REDACTED:122); ems-fd-controller.activeEmsFdDeputiesWhereInput (REDACTED:643). Rename to `EmsFdDashboard`. [rule N6]
D21 · Naming Consistency · `suspendedEmsFDDeputies` spells `FD` where 22 names in the project spell it `Fd` · ×1
  • `suspendedEmsFDDeputies` spells `FD` where 22 names in the project spell it `Fd` packages/types/src/api/admin.ts:23 — 22 of 24 names in project snailycad spell the token `Fd` (22 of 24; unit: names in project snailycad containing `Fd`). Peers: TemporaryUnitsController.createTemporaryEmsFdDeputy (REDACTED:78); apps.api.src.controllers.ems-fd.ems-fd-controller.EmsFdController (REDACTED:51); EmsFdController.getDeputyLogs(emsFdDeputyId) (REDACTED:89); EmsFdController.createEmsFdDeputy (REDACTED:122); ems-fd-controller.activeEmsFdDeputiesWhereInput (REDACTED:643). Rename to `suspendedEmsFdDeputies`. [rule N6]
D24 · Comment Value · redundant comment · ×1
  • redundant comment apps/client/src/components/dispatch/map/units/player-marker.tsx:37 — "player has sirens enabled" repeats the code it sits on: 3 of its 3 words (player, sirens, enabled) are already in `if (parseInt(player.icon, 10) === 56 && player.hasSirenEnabled)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Dormant codebase · ×1
  • Dormant codebase — 461 of 461 significant files have no living knowledge — the codebase as a whole is dormant, not 461 separate risks. Counted over 461 of the 797 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. Re-engage owners or document before change.
GD1 · Unfinished & placeholder code · Placeholder literal left in code · ×1
  • Placeholder literal left in code apps/client/src/components/admin/values/manage-modal/status-value-fields.tsx:189 — A placeholder string ("Lorem ipsum dolor sit.") is still in shipped code — typical of generated boilerplate that was never filled in.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 1/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `apps/client`, `packages/ui`.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:7 — No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 3 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · Dependabot does not watch npm · ×1
  • Dependabot does not watch npm REDACTED:3 — `REDACTED` schedules updates, but no `package-ecosystem` entry covers `npm`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list.
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.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
R8 · Dependency Hygiene · Type-only dependency '@react-types/combobox' in production deps · ×1
  • Type-only dependency '@react-types/combobox' in production deps packages/ui/src/components/fields/async-list-search-field.tsx:5 — Every import is type-only — move it to devDependencies.
R8 · Dependency Hygiene · Type-only dependency '@react-types/overlays' in production deps · ×1
  • Type-only dependency '@react-types/overlays' in production deps packages/ui/src/hooks/select/useMultiSelectState.ts:5 — Every import is type-only — move it to devDependencies.
R8 · Dependency Hygiene · Type-only dependency '@react-types/select' in production deps · ×1
  • Type-only dependency '@react-types/select' in production deps packages/ui/src/components/fields/select-field.tsx:2 — Every import is type-only — move it to devDependencies.
R8 · Dependency Hygiene · Type-only dependency 'slate-history' in production deps · ×1
  • Type-only dependency 'slate-history' in production deps packages/utils/src/editor/index.ts:4 — Every import is type-only — move it to devDependencies.
R8 · Dependency Hygiene · Type-only dependency 'slate-react' in production deps · ×1
  • Type-only dependency 'slate-react' in production deps packages/utils/src/editor/index.ts:3 — Every import is type-only — move it to devDependencies.
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 1/12 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types · Null assertions (`!`) override strict null checking · ×1
  • Null assertions (`!`) override strict null checking — ~0.7 `!` null assertions per 1k TypeScript source lines — 64 assertion(s) across the 96650 source line(s) of the 767 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: REDACTED (3), REDACTED (3), apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx (3). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
Minor — 140 finding(s)
D12 · Dependency Hygiene · Outdated (npm) · ×136
  • Outdated (npm): @discordjs/rest — @discordjs/rest is pinned at 2.3.0; registry.npmjs.org publishes 2.6.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @faker-js/faker — @faker-js/faker is pinned at 9.8.0; registry.npmjs.org publishes 10.6.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @headlessui/react — @headlessui/react is pinned at 2.0.4; registry.npmjs.org publishes 2.2.10 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @internationalized/date — @internationalized/date is pinned at 3.5.4; registry.npmjs.org publishes 3.12.4 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @monaco-editor/react — @monaco-editor/react is pinned at 4.6.0; registry.npmjs.org publishes 4.7.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @paralleldrive/cuid2 — @paralleldrive/cuid2 is pinned at 2.2.2; registry.npmjs.org publishes 3.3.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @prisma/client — @prisma/client is pinned at 5.15.0; registry.npmjs.org publishes 7.10.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-accordion — @radix-ui/react-accordion is pinned at 1.1.2; registry.npmjs.org publishes 1.3.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-context-menu — @radix-ui/react-context-menu is pinned at 2.1.5; registry.npmjs.org publishes 2.4.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-dropdown-menu — @radix-ui/react-dropdown-menu is pinned at 2.0.6; registry.npmjs.org publishes 2.2.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-hover-card — @radix-ui/react-hover-card is pinned at 1.0.7; registry.npmjs.org publishes 1.2.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-popover — @radix-ui/react-popover is pinned at 1.0.7; registry.npmjs.org publishes 1.3.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-tabs — @radix-ui/react-tabs is pinned at 1.0.4; registry.npmjs.org publishes 1.2.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-toolbar — @radix-ui/react-toolbar is pinned at 1.0.4; registry.npmjs.org publishes 1.2.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @radix-ui/react-tooltip — @radix-ui/react-tooltip is pinned at 1.0.7; registry.npmjs.org publishes 1.4.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @react-aria/breadcrumbs — @react-aria/breadcrumbs is pinned at 3.5.13; registry.npmjs.org publishes 3.6.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @react-aria/button — @react-aria/button is pinned at 3.9.5; registry.npmjs.org publishes 3.15.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @react-aria/calendar — @react-aria/calendar is pinned at 3.5.8; registry.npmjs.org publishes 3.10.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @react-aria/checkbox — @react-aria/checkbox is pinned at 3.12.0; registry.npmjs.org publishes 3.17.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @react-aria/combobox — @react-aria/combobox is pinned at 3.8.0; registry.npmjs.org publishes 3.16.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @react-aria/datepicker — @react-aria/datepicker is pinned at 3.9.0; registry.npmjs.org publishes 3.17.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @react-aria/dialog — @react-aria/dialog is pinned at 3.5.14; registry.npmjs.org publishes 3.6.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @react-aria/focus — @react-aria/focus is pinned at 3.15.0; registry.npmjs.org publishes 3.22.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @react-aria/i18n — @react-aria/i18n is pinned at 3.9.0; registry.npmjs.org publishes 3.13.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @react-aria/interactions — @react-aria/interactions is pinned at 3.20.0; registry.npmjs.org publishes 3.28.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • + 111 more in this group — see findings.md.
D24 · Comment Value · doc comments repeat the names · ×4
  • doc comments repeat the names apps/client/src/components/shared/Title.tsx:11 — 0 of 1 documented parameters and 1 of 13 summaries in `@snailycad/client` only repeat the member or parameter name (e.g. "whether to render an h1 for the layout title" for `renderLayoutTitle`). Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names packages/schemas/src/admin/index.ts:110 — 0 of 0 documented parameters and 7 of 11 summaries in `@snailycad/schemas` only repeat the member or parameter name (e.g. "discord webhooks" for `DISCORD_WEBHOOK_TYPE`). Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names packages/types/src/api.ts:224 — 0 of 0 documented parameters and 1 of 4 summaries in `@snailycad/types` only repeat the member or parameter name (e.g. "citizens" for `CitizenProperties`). Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names packages/utils/src/callsign.ts:19 — 2 of 4 documented parameters and 0 of 3 summaries in `@snailycad/utils` only repeat the member or parameter name (e.g. "The unit object" for `unit`). Delete the restating tags, or add what the name does not say.

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.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-fac9aff817e049f29615b8a928a6ca36/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=800" --report-format json --report-path /tmp/watchdog-gitleaks-fac9aff817e049f29615b8a928a6ca36/history-1.json --exit-code 0 --source .1artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=1000 --max-count=2566" --report-format json --report-path /tmp/watchdog-gitleaks-fac9aff817e049f29615b8a928a6ca36/history-2.json --exit-code 0 --source .4artifacts/raw/gitleaks-history-2.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-fac9aff817e049f29615b8a928a6ca36/tree.json --exit-code 0 --source .1artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .192artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .142artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .4artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—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. semgrep could not parse 37 file(s) — `REDACTED`, `REDACTED`, `REDACTED`, `REDACTED`, `apps/api/src/controllers/leo/create-where-obj.ts`, … (+32 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D40 · Network Egress Confinementruntime-hardening—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.0—
D41 · Kernel & Syscall Confinementruntime-hardening—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.0—
D42 · Runtime Threat Enforcementruntime-hardening—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.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1eaa6-997b-7147-a0e0-6235f8a66284 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

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.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md