Public report of Rootly-AI-Labs/on-call-health, 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, 14:31 UTC · Survey ID cd_2d13de60b1dc481dbd61c7819a409f87

Rootly-AI-Labs/on-call-health

Measured 17 November 2026, 14:27 UTC, at code version 82aceac

First survey, so nothing to compare with yet
CAI score 33.6out of 100 Weak
CriticalWeakAdequateStrongExemplary

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 large codebase: 103,795 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 0.7 person-years · Weakest lens: Production Readiness, 19.1

Findings by how serious they are

92 critical 1277 serious 215 minor

9 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, 14:27 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.

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 ▸

81of 81 dimensions measured by tools.
1544of 1584 findings point to an exact file and line, so you can open each one in the code. The other 40 concern the repository as a whole, such as missing documentation.
81dimensions across 7 lenses, read from 103,795 lines of product code in 2 projects.
Chapters

Executive summary

Rootly-AI-Labs/on-call-health falls short of our standard for production, held back most by its Production Readiness lens, the way the code is tested, built, released and run. It scores 33.6 out of 100 and is rated Weak, and 43 of its 92 critical findings are security problems.

Production Readiness, at 19.1, is the weakest lens and counts most in the score. The best first step is fixing the 16 tests that are switched off, worth about 9.8 points. Planning backups and recovery would lift Production Readiness itself, worth about 3.0 points. Raising Production Readiness to 70 would lift the score to about 45.4.

Thirty-nine passwords or keys are open to anyone who can read the repository. Two settings leave the servers or containers unsafe, and ten buttons or links have no name a screen reader can say. Replacing each exposed password or key, correcting the unsafe settings and naming the buttons and links would close these risks. Setting a waiting period for automatic updates would fix the automatic dependency update that takes a new release at once, and updating the vulnerable packages would deal with the package with a known security hole. The 15 labels or groups of fields with no name need connecting to their fields or naming.

The product code is 103,795 lines, about €110,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 19.1 · counts for 46%Code Health 25.4 · counts for 25%Accessibility 54.8 · counts for 14%Security and Compliance 63.9 · counts for 8%Maturity 65.2 · counts for 4%Architecture 87.7 · counts for 2%Performance 100.0 · counts for 1%

If Production Readiness rose from 19.1 to 70, the lowest score rated Strong, the score would rise from 33.6 to about 45.4.

Code composition: what the lines of code are
Product code 84%Tests 16%
Rebuild cost: about €110,000 · Estimate
Cost to rebuild€35,000 to €180,000, for 582 to 1,845 hours of work, about 0.7 person-years for 1 to 2 engineers
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 34. 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.
SizeLarge: 103,795 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 16 Skipped test finding(s) in Test Quality — start with integrations.spec.ts (6), org-management.spec.ts (6), auth.spec.ts (2).
Raises the score by about 9.8 points · Medium effort · Test Quality
2
Resolve the 1 Banned license finding(s) in License Compliance.
Raises the score by about 3.8 points · Low effort · License Compliance
3
Resolve the 1 finding(s) in DR & Backup.
Raises the score by about 3.0 points · Medium effort · DR & Backup

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 €110,000 to build again, about 0.7 person-years of work. Its weakest lens is Production Readiness, at 19.1 (Critical). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 16 Skipped test finding(s) in Test Quality. Of all the actions in this report, it raises the score most for the work it takes: about 9.8 points for medium effort, because it clears the 16 Test Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.3 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 7% to 15% on every change. The history of the code shows how much it changes: about 23,823 lines over the last 90 days, which is about 96,616 lines a year. At that pace, the extra work comes to an estimated 16.2 to 97.2 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

259 modules, with 173 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; 219 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 backend.app.agents.burnout_agent2 backend.app.core3 backend.app.core.input_validation4 backend.app.models.analysis5 backend.app.models.linear_integration6 backend.app.models.organization7 backend.app.models.user8 backend.app.models.user_correlation9 backend.app.services.retention_legacy10 backend.app.services.retention_preview11 backend.app.services.retention_status12 frontend.src.app.integrations.components.AIInsightsCard13 frontend.src.app.integrations.components.GitHubIntegrationCard14 frontend.src.app.integrations.components.JiraIntegrationCard15 frontend.src.app.integrations.dialogs16 frontend.src.app.integrations.types17 frontend.src.components18 frontend.src.components.api-keys19 frontend.src.components.dashboard20 frontend.src.components.notifications21 frontend.src.components.ui22 frontend.src.hooks23 frontend.src.lib24 backend.app.api.endpoints.auth25 backend.app.services.data_retention26 backend.app.services.integration_validator27 backend.app.services.notification_service28 backend.app.services.survey_scheduler29 backend.app.services.user_sync_service30 backend.mock_data_helpers31 backend.scripts32 frontend.src.app.integrations.components.AuthMethodBadge33 frontend.src.app.integrations.components.GitHubConnectedCard34 frontend.src.app.integrations.components.IntegrationCardItem35 frontend.src.app.integrations.components.JiraConnectedCard36 frontend.src.app.integrations.components.LinearConnectedCard37 frontend.src.components.integrations38 backend.app.api.endpoints39 backend.app.services40 frontend.src.app.integrations.components
1 backend.app.agents.burnout_agent
2 backend.app.core
3 backend.app.core.input_validation
4 backend.app.models.analysis
5 backend.app.models.linear_integration
6 backend.app.models.organization
7 backend.app.models.user
8 backend.app.models.user_correlation
9 backend.app.services.retention_legacy
10 backend.app.services.retention_preview
11 backend.app.services.retention_status
12 frontend.src.app.integrations.components.AIInsightsCard
13 frontend.src.app.integrations.components.GitHubIntegrationCard
14 frontend.src.app.integrations.components.JiraIntegrationCard
15 frontend.src.app.integrations.dialogs
16 frontend.src.app.integrations.types
17 frontend.src.components
18 frontend.src.components.api-keys
19 frontend.src.components.dashboard
20 frontend.src.components.notifications
21 frontend.src.components.ui
22 frontend.src.hooks
23 frontend.src.lib
24 backend.app.api.endpoints.auth3
25 backend.app.services.data_retention11
26 backend.app.services.integration_validator1
27 backend.app.services.notification_service11
28 backend.app.services.survey_scheduler1
29 backend.app.services.user_sync_service11
30 backend.mock_data_helpers23
31 backend.scripts11
32 frontend.src.app.integrations.components.AuthMethodBadge1
33 frontend.src.app.integrations.components.GitHubConnectedCard1
34 frontend.src.app.integrations.components.IntegrationCardItem1
35 frontend.src.app.integrations.components.JiraConnectedCard1
36 frontend.src.app.integrations.components.LinearConnectedCard1
37 frontend.src.components.integrations11
38 backend.app.api.endpoints31119121
39 backend.app.services3453313
40 frontend.src.app.integrations.components11111111
Uses a module listed above itPart of a loopThe module itself
1 backend.app.agents.burnout_agent2 backend.app.core3 backend.app.core.input_validation4 backend.app.models.analysis5 backend.app.models.linear_integration6 backend.app.models.organization7 backend.app.models.user8 backend.app.models.user_correlation9 backend.app.services.retention_legacy10 backend.app.services.retention_preview11 backend.app.services.retention_status12 frontend.src.app.integrations.components.AIInsightsCard13 frontend.src.app.integrations.components.GitHubIntegrationCard14 frontend.src.app.integrations.components.JiraIntegrationCard15 frontend.src.app.integrations.dialogs16 frontend.src.app.integrations.types17 frontend.src.components18 frontend.src.components.api-keys19 frontend.src.components.dashboard20 frontend.src.components.notifications21 frontend.src.components.ui22 frontend.src.hooks23 frontend.src.lib24 backend.app.api.endpoints.auth25 backend.app.services.data_retention26 backend.app.services.integration_validator27 backend.app.services.notification_service28 backend.app.services.survey_scheduler29 backend.app.services.user_sync_service30 backend.mock_data_helpers31 backend.scripts32 frontend.src.app.integrations.components.AuthMethodBadge33 frontend.src.app.integrations.components.GitHubConnectedCard34 frontend.src.app.integrations.components.IntegrationCardItem35 frontend.src.app.integrations.components.JiraConnectedCard36 frontend.src.app.integrations.components.LinearConnectedCard37 frontend.src.components.integrations38 backend.app.api.endpoints39 backend.app.services40 frontend.src.app.integrations.componentsbackend.app.agents.burnout_agent1backend.app.core2backend.app.core.input_validation3backend.app.models.analysis4backend.app.models.linear_integration5backend.app.models.organization6backend.app.models.user7backend.app.models.user_correlation8backend.app.services.retention_legacy9backend.app.services.retention_preview10backend.app.services.retention_status11frontend.src.app.integrations.components.AIInsightsCard12frontend.src.app.integrations.components.GitHubIntegrationCard13frontend.src.app.integrations.components.JiraIntegrationCard14frontend.src.app.integrations.dialogs15frontend.src.app.integrations.types16frontend.src.components17frontend.src.components.api-keys18frontend.src.components.dashboard19frontend.src.components.notifications20frontend.src.components.ui21frontend.src.hooks22frontend.src.lib23backend.app.api.endpoints.auth24backend.app.services.data_retention25backend.app.services.integration_validator26backend.app.services.notification_service27backend.app.services.survey_scheduler28backend.app.services.user_sync_service29backend.mock_data_helpers30backend.scripts31frontend.src.app.integrations.components.AuthMethodBadge32frontend.src.app.integrations.components.GitHubConnectedCard33frontend.src.app.integrations.components.IntegrationCardItem34frontend.src.app.integrations.components.JiraConnectedCard35frontend.src.app.integrations.components.LinearConnectedCard36frontend.src.components.integrations37backend.app.api.endpoints38backend.app.services39frontend.src.app.integrations.components403111111112311111111131119121345331311111111+219 more modules (most-connected shown)

At a glance — Code Health · 25.4 · Weak · gated by D1, D2, R10, R2, X4, X5 ·

At a glance — Architecture · 87.7 · Adequate · gated by D26 ·

At a glance — Maturity · 65.2 · Adequate · gated by M2 ·

At a glance — Readiness · 19.1 · Critical · gated by D12, R4, P3, P5, P7, P8 ·

At a glance — Security · 63.9 · Adequate · gated by D28, D36 ·

At a glance — Accessibility · 54.8 · Adequate · gated by AC4 ·

At a glance — Performance · 100.0 · Exemplary ·

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
A07:2025 — Authentication Failures40High / Critical
A02:2025 — Security Misconfiguration13High / Critical
A03:2025 — Software Supply Chain Failures8High / Critical
A05:2025 — Injection5High / Critical
A01:2025 — Broken Access Control5Medium

Roadmap

Top priorities: Resolve the 16 Skipped test finding(s) in Test Quality — start with integrations.spec.ts (6), org-management.spec.ts (6), auth.spec.ts (2); Resolve the 1 Banned license finding(s) in License Compliance; Resolve the 1 finding(s) in DR & Backup.

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

Do thisHelpsEffortDimension
Resolve the 16 Skipped test finding(s) in Test Quality — start with integrations.spec.ts (6), org-management.spec.ts (6), auth.spec.ts (2).+9.8 ptsMediumTest Quality
Resolve the 1 Banned license finding(s) in License Compliance.+3.8 ptsLowLicense Compliance
Resolve the 1 finding(s) in DR & Backup.+3.0 ptsMediumDR & Backup
Add tests that import the unreached modules (directly or through their public entry).+3.0 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.4 ptsMediumCode Duplication
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED.+1.2 ptsLowADR Quality
Bring the 117 bodies over 30 down to 30 or less in Cognitive Complexity — start with RootlyAPIClient.get_alerts_count (cognitive 794), analyses.run_analysis_task (cognitive 505), UnifiedBurnoutAnalyzer._generate_daily_trends (cognitive 470).+2.2 ptsHighCognitive Complexity
Resolve the 66 FunctionTooLong finding(s) in God Classes — start with REDACTED (7), useDashboard.ts (4), AlertsCountCard.tsx (2).+1.5 ptsHighGod Classes

File quality

Per-file score 0–10 — a quality signature. Of 181 files carrying findings, judged against the Production bar: 1% slop · 79% mixed · 20% near-clean.

FileScoreBandWorst signal
REDACTED3.4SlopIaC & Container Security: High IaC: REDACTED
frontend/src/app/dashboard/page.tsx3.9SlopChange Coupling: Boundary-crossing change coupling: REDACTED ↔ GitHubCommitsTimeline.tsx
REDACTED4.0MixedData Compliance (PII/GDPR): Medium: REDACTED
REDACTED4.4MixedSecrets (history): High secret: REDACTED
REDACTED4.4MixedSecrets (history): High secret: REDACTED
REDACTED4.4MixedDependency Vulnerabilities: High CVE: REDACTED
REDACTED4.4MixedIaC & Container Security: High IaC: REDACTED
REDACTED4.4MixedData Compliance (PII/GDPR): Medium: REDACTED
REDACTED4.8MixedData Compliance (PII/GDPR): Medium: REDACTED
REDACTED4.9MixedData Compliance (PII/GDPR): Medium: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
frontend/src/components/dashboard/UserAlertsCard.tsx5.7MixedCyclomatic Complexity: UserAlertsCard.UserAlertsCard (cyclomatic 99)
frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx5.9MixedCyclomatic Complexity: PagerDutyIntegrationForm.PagerDutyIntegrationForm (cyclomatic 26)
REDACTED6.0MixedExplicit Debt: TodoComment
backend/app/api/endpoints/manual_mappings.py6.0MixedExplicit Debt: TodoComment
frontend/src/components/landing-page.tsx6.0MixedExplicit Debt: TodoComment
frontend/e2e/auth.spec.ts6.0MixedExplicit Debt: TodoComment
frontend/e2e/landing-page.spec.ts6.0MixedExplicit Debt: TodoComment
frontend/src/hooks/useDashboard.ts6.1MixedCyclomatic Complexity: useDashboard.useDashboard (cyclomatic 97)
REDACTED6.2MixedIaC & Container Security: Medium IaC: 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 — 92

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

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

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

Could not be resolved — 9

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 81 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 — 81 dimensions across the health lenses
D1D2D3D4D5D6D10D12D13D14D15D16D17D19D20D24D26D28D29D30D31D32D34D35D36D37D43D44AC1AC2AC3AC4AC5AC6AX10AX2AX3AX4AX6C2C4C5M1M2M3M4P1P2P3P4P5P6P7P8PF3R1R10R2R3R4R5R6R7R8R9S1X1X12X17X19X2X21X23X24X25X27X28X3X30X4X5

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, 1544 of 1584 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 01a1e9e7-d9aa-780b-b544-b49212b525f3.

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.

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the JavaScript/TypeScript suite(s) run through a browser-driven runner the coverage collector does not drive — frontend/ (@playwright/test) — a gap in the analyzer, not something this repository is missing. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
  • D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 94 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 69 test source file(s) (.py) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — 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. Test reliability NOT SCORED: this repository's production source includes .tsx, and the built-in reliability runner cannot re-run the .tsx test suite(s) — so reliability was not measured for the repository as a whole. The Python (repository root, 67 test files): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted.
  • D14 License Compliance — 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 repository declares package.json, but the licence verdict published here was taken over its Python distribution dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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: no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict. For npm the surface is what a published package.json's entry points (exports, main, module, types) export, followed through the source; an entry that names build output the tree does not commit (dist/, build/) is not followed back to source, because only a tsconfig outDir/rootDir pair states that mapping and a bundler's input lives in executable configuration this engine does not evaluate.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • AC2 Forms & labels — 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. 18 further occurrence(s) are not listed individually; the score already reflects all 58.
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • C4 Data Retention — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • C5 Data-Subject Rights — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java source only, and this repository's Python is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust source only, and this repository's Python is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — 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. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • 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. 201 further occurrence(s) are not listed individually; the score already reflects all 241.
  • 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. 93 further occurrence(s) are not listed individually; the score already reflects all 133.
  • 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. 143 further occurrence(s) are not listed individually; the score already reflects all 183.
  • 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. 24 further occurrence(s) are not listed individually; the score already reflects all 64.
  • 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. 28 further occurrence(s) are not listed individually; the score already reflects all 68.
  • X16 Unfloored truncation loop — 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X2 Cancellation propagation — 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. 72 further occurrence(s) are not listed individually; the score already reflects all 112.
  • X27 Collection changed while being enumerated — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X29 Per-element action decided by a fixed element — 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X3 Exception handling — 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. 21 further occurrence(s) are not listed individually; the score already reflects all 61.
  • X4 Structured logging — 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. 1841 further occurrence(s) are not listed individually; the score already reflects all 1881.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • 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.
  • 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.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • 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.
  • 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.
  • D32 Data Compliance (PII/GDPR): PII/GDPR signals are heuristic pattern matches in code — they flag likely handling concerns, not legal compliance, and cannot trace where data actually flows at runtime.
  • 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.
  • C4 Data Retention: This control is scored from in-repo evidence only — its real-world effectiveness, exercised only at runtime, is outside a static scan.
  • 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".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • 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 Complexity2.0 / 10Critical✓ 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 2.0 / 10 · rule-coverage 100% · ceiling Prevented

232 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was analyses.run_analysis_task at 246. A further 2 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 AuthInterceptor.AuthInterceptor at 16 — they are counted neither in the figure above nor in this dimension's score. 2 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: frontend/src/components/AuthInterceptor.tsx (AuthInterceptor.AuthInterceptor at 16), frontend/src/components/dashboard/AnalysisProgressSection.tsx (AnalysisProgressSection.AnalysisProgressSection at 16). 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.

TeamMembersList.TeamMembersList::handleMemberClick (cyclomatic 20) · ×2frontend/src/components/dashboard/TeamMembersList.tsx:286
page.IntegrationsPage::loadAllIntegrationsAPIBackground (cyclomatic 19) · ×2REDACTED:1470
page.TeamPageContent::getUserIntegrations (cyclomatic 18) · ×2frontend/src/app/management/page.tsx:1009
analyses.run_analysis_task (cyclomatic 246)REDACTED:3241
page.DashboardContent (cyclomatic 244)frontend/src/app/dashboard/page.tsx:133

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

What to do

  1. Bring the 20 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with analyses.run_analysis_task (cyclomatic 246), page.DashboardContent (cyclomatic 244), RootlyAPIClient.get_alerts_count (cyclomatic 239). — 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 20 together lifts Cyclomatic Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

D2 · Cognitive Complexity2.0 / 10Critical✓ 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 2.0 / 10 · rule-coverage 100% · ceiling Prevented

314 method(s) exceeded the cognitive complexity threshold of 15; the worst was RootlyAPIClient.get_alerts_count at 794.

mapping-drawer.MappingDrawer::runAutoMapping (cognitive 26) · ×3frontend/src/components/mapping-drawer.tsx:330
page.TeamPageContent::getUserIntegrations (cognitive 20) · ×2frontend/src/app/management/page.tsx:1009
RootlyAPIClient.get_alerts_count (cognitive 794)backend/app/core/rootly_client.py:479
analyses.run_analysis_task (cognitive 505)REDACTED:3241
UnifiedBurnoutAnalyzer._generate_daily_trends (cognitive 470)backend/app/services/unified_burnout_analyzer.py:4115

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

What to do

  1. Bring the 117 bodies over 30 down to 30 or less in Cognitive Complexity — start with RootlyAPIClient.get_alerts_count (cognitive 794), analyses.run_analysis_task (cognitive 505), UnifiedBurnoutAnalyzer._generate_daily_trends (cognitive 470). — 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 117 together lifts Cognitive Complexity from 2.0 to about 5.6/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

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

D3 · God Classes6.0 / 10Adequate✓ 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 6.0 / 10 · rule-coverage 100% · ceiling Prevented

109 god class(es) detected.

FunctionTooLong: page.IntegrationsPage · ×66REDACTED:179
FileTooLong: services/unified_burnout_analyzer.py · ×35backend/app/services/unified_burnout_analyzer.py
ClassTooLong: useDashboard · ×6frontend/src/hooks/useDashboard.ts:1
TooManyMethods: UnifiedBurnoutAnalyzer · ×2backend/app/services/unified_burnout_analyzer.py:75

What to do

  1. Resolve the 66 FunctionTooLong finding(s) in God Classes — start with REDACTED (7), useDashboard.ts (4), AlertsCountCard.tsx (2). — One of this dimension's main actionable groups (66 warning-level).
  2. Resolve the 35 FileTooLong finding(s) in God Classes — start with REDACTED (3), unified_burnout_analyzer.py, REDACTED. — One of this dimension's main actionable groups (35 warning-level).
  3. Resolve the 6 ClassTooLong finding(s) in God Classes — start with useDashboard.ts, SlackSurveyTabs.tsx, OrganizationManagementDialog.tsx. — One of this dimension's main actionable groups (6 warning-level).

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

D4 · Code Duplication7.5 / 10Strong✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

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

134 duplicated block group(s) detected. 6.3 % of the production lines (6,554 of 103,795) are in a reported copy. A further 47 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. Measured on part of this repository only: .tsx (34% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.

Duplicated block (12 lines × 2) · ×6backend/app/agents/tools/workload_analyzer.py:158
Duplicated block (14 lines × 2) · ×5REDACTED:1126
Duplicated block (13 lines × 2) · ×5backend/app/api/endpoints/linear.py:1281
Duplicated block (11 lines × 2) · ×5REDACTED:2233
Duplicated block (8 lines × 2) · ×5REDACTED:910

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

What to do

  1. Resolve the 6 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with workload_analyzer.py, linear.py, enhanced_github_matcher.py. — One of this dimension's main actionable groups (6 warning-level).
  2. Resolve the 5 Duplicated block (14 lines × 2) finding(s) in Code Duplication — start with integration_validator.py (2), REDACTED, manual_mappings.py. — One of this dimension's main actionable groups (5 warning-level).
  3. Resolve the 5 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with linear.py, rootly.py, oauth.py. — One of this dimension's main actionable groups (5 warning-level).

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

D5 · Coupling10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Prevented

2 production modules (npm+source-import), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations, and — for the source no manifest declares — its top-level source directories, with the imports between them as edges; 0 module(s) off the main sequence.

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)9.8 / 10Stronggated by 1 serious finding✓ 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 9.8 / 10 · rule-coverage 100% · ceiling Verified

1 of 57 classes have LCOM4 above 3.

Low cohesion: GitHubOAuth (LCOM4 4)backend/app/auth/oauth.py:100

What to do

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

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

D10 · Test Quality6.6 / 10Adequate✓ 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 6.6 / 10 · rule-coverage 100% · ceiling Prevented

16 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 94 tests. Measured on the JavaScript/TypeScript suite only — at least 69 test source file(s) (.py) went unread, so its test quality is unmeasured and is not in these counts.

Skipped test: should show login page · ×16frontend/e2e/auth.spec.ts:9

What to do

  1. Resolve the 16 Skipped test finding(s) in Test Quality — start with integrations.spec.ts (6), org-management.spec.ts (6), auth.spec.ts (2). — One of this dimension's main actionable groups (16 warning-level).

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

D12 · Dependency Hygiene10.0 0.3 / 10Critical✓ 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 0.3 / 10 · rule-coverage 3% · ceiling Verified

0 outdated, 0 yanked pinned Python distributions. 1 of 33 shipped distributions were graded against pypi.org (0 not published there, 32 declared without an exact pin, which installs the newest release the declaration admits and so cannot be behind one). Only EXACT pins are graded for currency: a floor or a range already installs the newest release it admits, so reporting one would report this repository for being current. Whether a deliberate upper cap has itself gone stale is a different and weaker question, and is not asked. Whether any distribution is UNMAINTAINED is not graded — PyPI publishes no maintenance status, and release age does not stand in for one. Lockfiles are not read (poetry.lock, uv.lock, Pipfile.lock, pdm.lock), so a lock-resolved install is outside this verdict. Known CVEs in this dependency graph are D30's question.

Detailed fixes: d12_recommendation.md.

D13 · REDACTED Scanning10.0 / 10Exemplary○ Nothing flagged

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 10.0 / 10 · rule-coverage 100% · ceiling Prevented

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance8.0 / 10Adequategated by 1 critical finding✓ 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 8.0 / 10 · rule-coverage 100% · ceiling Verified

1 of 114 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 33 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (81 reached that way). Requirements it states ONLY under an extra, a PEP 735 dependency group, a Poetry dev group or a dev-named requirements file are excluded: pip does not install any of them for a consumer. ★ This repository commits no dependency lockfile that this pass reads, so each licence is the one PyPI publishes for the distribution's CURRENT release rather than for a pinned version. 6 of them publish no licence on PyPI this pass can read; that is missing data, not a violation, and none of them is charged. ★ COVERAGE OF THIS VERDICT: it grades this repository's Python distribution dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

Banned license: psycopg

What to do

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

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

D15 · Churn × Complexity Hotspots6.8 / 10Adequate✓ 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 6.8 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: REDACTED (11×246=2706); frontend/src/app/management/page.tsx (4×377=1508); frontend/src/app/dashboard/page.tsx (6×244=1464) Repeated repair below the complexity floor: backend/migrations/migration_runner.py (3 of 5 changes were fixes)

Hotspot: REDACTED · ×18REDACTED:3241
Repeated repair: backend/migrations/migration_runner.pybackend/migrations/migration_runner.py:169

What to do

  1. Resolve the 18 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (2), REDACTED, useDashboard.ts. — One of this dimension's main actionable groups (18 warning-level).
  2. Resolve the 1 Repeated repair finding(s) in Churn × Complexity Hotspots — start with migration_runner.py. — One of this dimension's main actionable groups (1 warning-level).

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

D16 · Bus Factor7.5 / 10Strong✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

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

65 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is frontend/src/components/mapping-drawer.tsx. Counted over 260 of the 344 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1 · ×3

What to do

  1. Resolve the 3 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (3 recommendation-level).

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

D17 · Explicit Debt10.0 / 10Stronggated by 8 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

8 deducted task-comment markers across 103795 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 · ×8frontend/src/components/landing-page.tsx:84

What to do

  1. Resolve the 8 TodoComment finding(s) in Explicit Debt — start with auth.spec.ts (2), landing-page.spec.ts (2), manual_mappings.py (2). — One of this dimension's main actionable groups (8 warning-level).

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

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

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 10.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 1 documentation facets pass in full. 5 document(s) read across 2 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.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:35

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.

D24 · Comment Value6.8 6.7 / 10Adequate✓ 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 6.7 / 10 · rule-coverage 98% · ceiling Documented

39 of 1227 judged comments only repeat the code they sit on (3.2 %). 45 comment(s) in another language or script were not judged.

redundant comment · ×28frontend/e2e/smoke.spec.ts:46
doc comments repeat the namesfrontend/src/app/integrations/handlers/integration-handlers.ts:499

What to do

  1. Resolve the 28 redundant comment finding(s) in Comment Value — start with REDACTED (4), useDashboard.ts (3), useValidation.ts (2). — One of this dimension's main actionable groups (28 recommendation-level).

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

D26 · Project Cohesion0.0 / 10Critical✓ 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 0.0 / 10 · rule-coverage 100% · ceiling Documented

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

Projects may be oversized for their cohesion · ×2backend/requirements.txt:1

What to do

  1. Resolve the 2 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with requirements.txt, package.json. — 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)0.0 / 10Critical✓ 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 0.0 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 34 High secret finding(s) in Secrets (history) — start with REDACTED (33), REDACTED. — One of this dimension's main actionable groups (34 issue-level).
  2. Resolve the 5 REDACTED finding(s) in Secrets (history) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (5 issue-level).
  3. 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)7.4 / 10Adequategated by 1 critical finding✓ 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 7.4 / 10 · rule-coverage 100% · ceiling Documented

5 finding(s): 0 critical, 1 high, 2 medium, 2 low. semgrep hit a parse error in 4 file(s) — `backend/app/services/unified_burnout_analyzer.py`, `REDACTED`, `frontend/src/app/management/page.tsx`, `frontend/src/hooks/useDashboard.ts` — so no absence of findings in them is evidence of anything, and nothing in them was analysed. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED

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 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

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

D30 · Dependency Vulnerabilities9.1 / 10Adequategated by 1 critical finding✓ 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 9.1 / 10 · rule-coverage 100% · ceiling Documented

3 finding(s): 0 critical, 1 high, 1 medium, 1 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Low CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

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

D31 · IaC & Container Security8.5 / 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 8.5 / 10 · rule-coverage 100% · ceiling Documented

13 finding(s): 0 critical, 2 high, 8 medium, 3 low.

REDACTED
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 8 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (4), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (8 warning-level).
  3. Resolve the 3 Low IaC finding(s) in IaC & Container Security — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 recommendation-level).

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

D32 · Data Compliance (PII/GDPR)6.0 / 10Adequate✓ Tool-verified

What it measures: Likely personal-data (PII / GDPR) handling concerns — logging or storing data without safeguards.

Method: Heuristic PII/GDPR LEAK scan via semgrep across the repo, using our own ruleset: personal data crossing a boundary it should not — reaching a log/console sink, a URL or query string, or unprotected browser storage. Matches map to severity and a 0-10 wide normalizer. A clean sweep is unscored rather than an unearned 10, and is a statement about the leak paths checked only — this dimension does not inventory the personal data a repository holds (the personal-data map and the C1-C5 compliance cards do that), so it never reports that a repository has no personal-data surface. Reported LOUDLY as a measurement gap if the ruleset is missing from the analyzer image. Exhaustive over the leak paths, advisory-leaning; degrades on parse failure.

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

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

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 2 REDACTED finding(s) in Data Compliance (PII/GDPR) — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 2 REDACTED finding(s) in Data Compliance (PII/GDPR) — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Data Compliance (PII/GDPR) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

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

D34 · Knowledge Freshness8.3 / 10Adequategated by 1 critical finding✓ 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 8.3 / 10 · rule-coverage 100% · ceiling Documented

44 of 260 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is backend/app/agents/workflows/comprehensive_analysis.py. Counted over 260 of the 344 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledgebackend/app/agents/workflows/comprehensive_analysis.py:1
Orphaned file · ×43frontend/src/app/integrations/handlers/mapping-handlers.ts:1
Further orphaned files (smaller)

What to do

  1. Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with comprehensive_analysis.py. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 43 Orphaned file finding(s) in Knowledge Freshness — start with mapping-handlers.ts, platform_scoring.py, slack-integration-card.tsx. — One of this dimension's main actionable groups (43 recommendation-level).
  3. Resolve the 1 Further orphaned files (smaller) 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.6 / 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.6 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: AlertsCountCard.tsx↔UserAlertsCard.tsx 90%; github_only_burnout_analyzer.py↔unified_burnout_analyzer.py 84%; PagerDutyIntegrationForm.tsx↔RootlyIntegrationForm.tsx 73%

Boundary-crossing change coupling: user_correlation.py ↔ migration_runner.py · ×3backend/app/models/user_correlation.py:1
Change coupling: github_only_burnout_analyzer.py ↔ unified_burnout_analyzer.py · ×4backend/app/services/github_only_burnout_analyzer.py:1
Change-coupling hub: UserAlertsCard.tsx → REDACTED, rootly_client.py, AlertsCountCard.tsxfrontend/src/components/dashboard/UserAlertsCard.tsx

What to do

  1. Resolve the 3 Boundary-crossing change coupling finding(s) in Change Coupling — start with REDACTED (2), user_correlation.py. — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 4 Change coupling finding(s) in Change Coupling — start with github_only_burnout_analyzer.py, PagerDutyIntegrationForm.tsx, pagerduty.py. — One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with UserAlertsCard.tsx. — One of this dimension's main actionable groups (1 warning-level).

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

D36 · Supply-chain Provenance & Signing2.5 / 10Weak✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

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

1/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

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

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 (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 34 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.7 / 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 <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. (×2) — frontend/src/app/dashboard/page.tsx:426, frontend/src/components/IntroGuide.tsx:60
  • 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. (×15) — frontend/src/app/dashboard/page.tsx:1429, frontend/src/app/dashboard/page.tsx:1543, frontend/src/app/dashboard/page.tsx:1632, …
  • This select is named only by the placeholder of its value part. Nothing is typed into a select, so the placeholder does not vanish on input: it is shown as the trigger's text until a value is chosen, and then the chosen value replaces it — so at no point does the control state what the choice is for, and the trigger's role (combobox) takes its name from the author, not from that text. Name it: an aria-label on the trigger, or an id on the trigger with a <label htmlFor> pointing at it. (×3) — frontend/src/app/dashboard/page.tsx:1556, frontend/src/app/integrations/dialogs/NewMappingDialog.tsx:48, frontend/src/app/integrations/dialogs/NewMappingDialog.tsx:65
  • This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. 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. (×2) — frontend/src/app/dashboard/page.tsx:1884, frontend/src/app/dashboard/page.tsx:2025
  • A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×6) — frontend/src/app/dashboard/page.tsx:1994, frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:509, frontend/src/app/management/components/UserMappingDrawer.tsx:257, …
  • A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label. (×2) — frontend/src/app/integrations/components/AIInsightsCard.tsx:477, REDACTED:3917
  • This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×2) — frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:557, REDACTED:3832
  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. (×8) — REDACTED:4148, REDACTED:4244, frontend/src/app/management/page.tsx:1570, …

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 structure6.6 / 10Adequate✓ 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>. — backend/digest_preview.html:2
  • A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope). (×3) — backend/digest_preview.html:18, backend/digest_preview.html:39, backend/digest_preview.html:60
  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. (×4) — frontend/src/app/dashboard/api-keys/page.tsx:106, frontend/src/app/management/page.tsx:1292, frontend/src/app/methodology/page.tsx:324, …
  • A page with no <title> gives no name in the tab, history or screen-reader page list. Declare it the way this router does — Next App Router `export const metadata = { title }`, React Router/Remix `export function meta`, TanStack Start `head`, or a Helmet/Head component. — frontend/src/app/layout.tsx:26

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 semantics3.1 / 10Weak✓ 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. (×4) — frontend/src/app/dashboard/page.tsx:426, frontend/src/components/IntroGuide.tsx:60, frontend/src/components/dashboard/GitHubAllMetricsPopup.tsx:103, …
  • This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus. (×2) — frontend/src/app/dashboard/page.tsx:1064, frontend/src/components/ui/tooltip.tsx:72
  • A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}. (×2) — frontend/src/app/integrations/components/IntegrationCardItem.tsx:81, REDACTED:2998

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.4 / 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.

  • <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:. (×9) — frontend/src/app/dashboard/page.tsx:538, frontend/src/app/dashboard/page.tsx:610, frontend/src/app/dashboard/page.tsx:1250, …
  • This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade. (×10) — frontend/src/app/dashboard/page.tsx:769, frontend/src/app/dashboard/page.tsx:1552, frontend/src/app/integrations/components/UnifiedSlackCard.tsx:388, …
  • <svg> 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:. — frontend/src/app/dashboard/page.tsx:1195
  • <div> moves — its `animate-bounce` 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:. (×3) — frontend/src/components/dashboard/AnalysisProgressSection.tsx:74, frontend/src/components/dashboard/AnalysisProgressSection.tsx:75, frontend/src/components/dashboard/AnalysisProgressSection.tsx:76
  • `.animate-shake` moves (`animation: shake 0.5s ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — frontend/src/app/globals.css:277

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 composition8.1 / 10Strong✓ 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.

AX2 · Stateful singletons10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.

Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.

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.

C2 · Access Controls10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.

Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.

C4 · Data Retention7.5 / 10Strong✓ Tool-verified

Other · Security — Whether data has a defined lifetime — retention periods, TTLs, cleanup jobs (storage limitation).

Method: Roslyn scan: retention/TTL configuration presence in schema; CascadeDelete detected but not scored as retention control. Deterministic, gated by PII presence.

  • A retention mechanism is present, but the data-lifecycle is not yet complete — missing: an expiry limit — a declared maximum age / TTL after which the data is no longer kept.

What to do

  • Complete the data-lifecycle story: an expiry limit (a declared maximum age for the stored data — a retention-age setting, or a store-level TTL where your storage offers one), a scheduled purge/cleanup job that enforces it, and a documented retention period covering the personal data.
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.
M1 · Documentation (README)8.7 / 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

  • 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 documentation2.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.

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

P2 · Observability6.5 / 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/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `frontend`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
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 bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 4 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:6
  • `REDACTED` schedules updates, but no `package-ecosystem` entry covers `bun`, 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: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
  • Dependabot is configured but does not watch `bun` — 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 & Rollback10.0 / 10Exemplary✓ 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.

P5 · DR & Backup0.0 / 10Critical✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

  • A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced — a volume that survives a container recreate is not a tested restore from catastrophic loss.
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.
P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×20) — backend/app/api/endpoints/github.py:245, backend/app/api/endpoints/github.py:471, backend/app/api/endpoints/github.py:705, …
  • `aiohttp.ClientSession(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×4) — backend/app/services/enhanced_github_collector.py:183, backend/app/services/slack_collector.py:172, backend/app/services/slack_collector.py:347, …

What to do

  • Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
P8 · Schema migrations3.0 / 10Weak✓ Tool-verified

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.

  • This repository versions its schema (versioned SQL), but SQLAlchemy create_all() here builds or alters the schema from the model as well, outside that history — the two paths can disagree about the shape, and a change made this way is never a reviewed migration. Turn it off and let versioned SQL own the schema. — backend/app/models/base.py:163

What to do

  • Turn off SQLAlchemy create_all() in production and let the versioned migrations own the schema.
PF3 · Async & latency hygiene10.0 / 10Exemplary✓ 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.

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.0 / 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.

  • 62 duplicated blocks under frontend/src/ have copies in at least two of the sibling directories app, components, contexts, hooks — 37 of them are reported below, and 25 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 62 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 62 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 62 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. — frontend/src/app/dashboard/page.tsx:178
  • 21 duplicated blocks under frontend/src/app/ have copies in at least two of the sibling directories auth, dashboard, disclaimer, integrations, management, methodology (+2 more sibling(s) not listed) — 13 of them are reported below, and 8 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 21 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 21 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 21 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. — frontend/src/app/disclaimer/page.tsx:135
  • frontend/src/components/dashboard/ObjectiveDataCard.tsx:244 · frontend/src/components/dashboard/UserObjectiveDataCard.tsx:182 — the two spans are one implementation copied and then locally edited — 2050 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. — frontend/src/components/dashboard/ObjectiveDataCard.tsx:244
  • frontend/src/components/integrations/github-integration-card.tsx:50 · frontend/src/components/integrations/slack-integration-card.tsx:49 — the two spans are one implementation copied and then locally edited — 1513 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. — frontend/src/components/integrations/github-integration-card.tsx:50
  • frontend/src/components/dashboard/AlertsCountCard.tsx:308 · frontend/src/components/dashboard/UserAlertsCard.tsx:234 — the two spans are one implementation copied and then locally edited — 2522 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. — frontend/src/components/dashboard/AlertsCountCard.tsx:308
  • frontend/src/app/integrations/handlers/jira-handlers.ts:7 · frontend/src/app/integrations/handlers/linear-handlers.ts:7 — the two spans are one implementation copied and then locally edited — 1073 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. — frontend/src/app/integrations/handlers/jira-handlers.ts:7
  • frontend/src/app/integrations/components/JiraConnectedCard.tsx:46 · frontend/src/app/integrations/components/LinearConnectedCard.tsx:39 — the two spans are one implementation copied and then locally edited — 634 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. — frontend/src/app/integrations/components/JiraConnectedCard.tsx:46
  • frontend/src/app/integrations/components/IntegrationCardItem.tsx:74 · REDACTED:2991 — the two spans are one implementation copied and then locally edited — 692 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. — frontend/src/app/integrations/components/IntegrationCardItem.tsx:74
  • frontend/src/components/dashboard/AnthropicUsageCard.tsx:3 · frontend/src/components/dashboard/OpenAIUsageCard.tsx:3 — these 2 files are line-for-line copies of one another — 109 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. — frontend/src/components/dashboard/AnthropicUsageCard.tsx:3
  • frontend/src/app/setup/jira/callback/page.tsx:9 · frontend/src/app/setup/linear/callback/page.tsx:9 — 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. — frontend/src/app/setup/jira/callback/page.tsx:9
  • frontend/src/components/ui/dialog.tsx:9 · frontend/src/components/ui/sheet.tsx:10 — the two spans are one implementation copied and then locally edited — 454 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. — frontend/src/components/ui/dialog.tsx:9
  • frontend/src/app/integrations/components/JiraManualSetupForm.tsx:181 · frontend/src/app/integrations/components/LinearManualSetupForm.tsx:134 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — frontend/src/app/integrations/components/JiraManualSetupForm.tsx:181
  • frontend/src/components/dashboard/ObjectiveDataCard.tsx:49 · frontend/src/components/dashboard/UserObjectiveDataCard.tsx:46 — the two spans are one implementation copied and then locally edited — 678 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. — frontend/src/components/dashboard/ObjectiveDataCard.tsx:49
  • REDACTED:434 · REDACTED:542 — 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:434
  • frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx:125 · frontend/src/app/integrations/components/RootlyIntegrationForm.tsx:215 — the 2 copies are spread across 2 files, 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. — frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx:125
  • frontend/src/components/integrations/jira-integration-card.tsx:243 · frontend/src/components/integrations/slack-integration-card.tsx:192 — 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. — frontend/src/components/integrations/jira-integration-card.tsx:243
  • frontend/src/app/integrations/components/AnthropicUsageConnectedCard.tsx:1 · frontend/src/app/integrations/components/OpenAIUsageConnectedCard.tsx:1 — these 2 files are line-for-line copies of one another — 62 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. — frontend/src/app/integrations/components/AnthropicUsageConnectedCard.tsx:1
  • REDACTED:3624 · REDACTED:3684 — 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:3624
  • frontend/src/components/BurnoutFactorsV0.tsx:74 · frontend/src/components/BurnoutFactorsV0.tsx:150 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — frontend/src/components/BurnoutFactorsV0.tsx:74
  • frontend/src/app/integrations/dialogs/JiraDisconnectDialog.tsx:12 · frontend/src/app/integrations/dialogs/LinearDisconnectDialog.tsx:12 — the two spans are one implementation copied and then locally edited — 218 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. — frontend/src/app/integrations/dialogs/JiraDisconnectDialog.tsx:12
  • frontend/src/app/integrations/handlers/integration-handlers.ts:116 · frontend/src/app/integrations/handlers/integration-handlers.ts:175 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — frontend/src/app/integrations/handlers/integration-handlers.ts:116
  • frontend/src/components/dashboard/GitHubAllMetricsPopup.tsx:20 · frontend/src/components/dashboard/RiskFactorsAllPopup.tsx:22 — the two spans are one implementation copied and then locally edited — 302 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. — frontend/src/components/dashboard/GitHubAllMetricsPopup.tsx:20
  • REDACTED:2489 · REDACTED:2557 — 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:2489
  • frontend/src/app/management/components/UserMappingDrawer.tsx:248 · frontend/src/app/management/components/UserMappingDrawer.tsx:331 · frontend/src/app/management/components/UserMappingDrawer.tsx:422 — all 3 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — frontend/src/app/management/components/UserMappingDrawer.tsx:248
  • frontend/src/components/dashboard/SurveyResultsCard.tsx:225 · frontend/src/components/dashboard/SurveyResultsCard.tsx:317 — 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. — frontend/src/components/dashboard/SurveyResultsCard.tsx:225
  • frontend/src/app/integrations/components/AnthropicUsageSetupCard.tsx:9 · frontend/src/app/integrations/components/OpenAIUsageSetupCard.tsx:9 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — frontend/src/app/integrations/components/AnthropicUsageSetupCard.tsx:9
  • frontend/src/app/integrations/components/JiraManualSetupForm.tsx:99 · frontend/src/app/integrations/components/LinearManualSetupForm.tsx:93 — 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. — frontend/src/app/integrations/components/JiraManualSetupForm.tsx:99
  • frontend/src/components/dashboard/AnthropicUsageCard.tsx:8 · frontend/src/components/dashboard/MemberOpenAIUsageCard.tsx:8 · frontend/src/components/dashboard/OpenAIUsageCard.tsx:8 — the 3 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. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — frontend/src/components/dashboard/AnthropicUsageCard.tsx:8
  • frontend/src/components/integrations/enhancement-cards.tsx:47 · frontend/src/components/integrations/enhancement-cards.tsx:160 — 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. — frontend/src/components/integrations/enhancement-cards.tsx:47
  • REDACTED:1183 · REDACTED:1279 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:1183
  • frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx:231 · frontend/src/app/integrations/components/RootlyIntegrationForm.tsx:443 — the 2 copies are spread across 2 files, 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. — frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx:231
  • frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx:82 · frontend/src/app/integrations/components/RootlyIntegrationForm.tsx:170 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx:82
  • frontend/src/app/integrations/components/GitHubConnectedCard.tsx:109 · frontend/src/app/integrations/components/JiraConnectedCard.tsx:62 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — frontend/src/app/integrations/components/GitHubConnectedCard.tsx:109
  • frontend/src/components/dashboard/TicketingCard.tsx:199 · frontend/src/components/dashboard/TicketingCard.tsx:300 · frontend/src/components/dashboard/TicketingCard.tsx:385 · frontend/src/components/dashboard/TicketingCard.tsx:486 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. — frontend/src/components/dashboard/TicketingCard.tsx:199
  • frontend/src/hooks/useDashboard.ts:473 · frontend/src/hooks/useDashboard.ts:1419 — 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. — frontend/src/hooks/useDashboard.ts:473
  • frontend/src/components/integrations/integrations-cards.tsx:169 · frontend/src/components/integrations/integrations-cards.tsx:209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — frontend/src/components/integrations/integrations-cards.tsx:169
  • frontend/src/app/dashboard/page.tsx:178 · frontend/src/hooks/useDashboard.ts:2769 — the 2 copies are spread across 2 files, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents. — frontend/src/app/dashboard/page.tsx:178
  • frontend/src/app/integrations/handlers/github-handlers.ts:7 · frontend/src/app/integrations/handlers/jira-handlers.ts:7 · frontend/src/app/integrations/handlers/linear-handlers.ts:7 — the 3 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. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — frontend/src/app/integrations/handlers/github-handlers.ts:7
  • REDACTED:4186 · REDACTED:4286 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — REDACTED:4186
  • frontend/src/components/ui/alert-dialog.tsx:43 · frontend/src/components/ui/dialog.tsx:51 · frontend/src/components/ui/sheet.tsx:72 — the 3 copies are spread across 3 files, 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. — frontend/src/components/ui/alert-dialog.tsx:43

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 Complexity3.0 / 10Weak✓ 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.

  • IntegrationsPage has cyclomatic complexity 129 and cognitive complexity 113; 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. — REDACTED:179
  • DashboardContent has cyclomatic complexity 127 and cognitive complexity 105; 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. — frontend/src/app/dashboard/page.tsx:133
  • addIntegration has cyclomatic complexity 63 and cognitive complexity 108; 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. — frontend/src/app/integrations/handlers/integration-handlers.ts:234
  • loadIntegrations has cyclomatic complexity 61 and cognitive complexity 97; 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. — frontend/src/hooks/useDashboard.ts:1411
  • UserAlertsCard has cyclomatic complexity 60 and cognitive complexity 56; 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. — frontend/src/components/dashboard/UserAlertsCard.tsx:150
  • RootlyIntegrationForm has cyclomatic complexity 55 and cognitive complexity 46; 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. — frontend/src/app/integrations/components/RootlyIntegrationForm.tsx:30
  • MappingDrawer has cyclomatic complexity 54 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 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. — frontend/src/components/mapping-drawer.tsx:71
  • TeamPageContent has cyclomatic complexity 53 and cognitive complexity 45; 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. — frontend/src/app/management/page.tsx:82
  • (anonymous) has cyclomatic complexity 51 and cognitive complexity 50; 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. — frontend/src/app/management/page.tsx:1528
  • DataRetentionSettings has cyclomatic complexity 50 and cognitive complexity 44; 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. — frontend/src/app/management/components/DataRetentionSettings.tsx:22
  • startAnalysis has cyclomatic complexity 45 and cognitive complexity 98; 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. — frontend/src/hooks/useDashboard.ts:1866
  • SlackSurveyTabs has cyclomatic complexity 43 and cognitive complexity 39; 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. — frontend/src/components/SlackSurveyTabs.tsx:43
  • AlertsCountCard has cyclomatic complexity 41 and cognitive complexity 39; 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. — frontend/src/components/dashboard/AlertsCountCard.tsx:623
  • pollAnalysis has cyclomatic complexity 36 and cognitive complexity 57; 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. — frontend/src/hooks/useDashboard.ts:2204
  • (anonymous) has cyclomatic complexity 34 and cognitive complexity 46; 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. — frontend/src/hooks/useDashboard.ts:823
  • OrganizationManagementDialog has cyclomatic complexity 34 and cognitive complexity 29; 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. — frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:82
  • (anonymous) has cyclomatic complexity 33 and cognitive complexity 55; 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. — frontend/e2e/data-retention.spec.ts:110
  • runAnalysisWithTimeRange has cyclomatic complexity 33 and cognitive complexity 38; 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. — frontend/src/hooks/useDashboard.ts:2027
  • (anonymous) has cyclomatic complexity 32 and cognitive complexity 30; 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. — REDACTED:2971
  • AIInsightsCard has cyclomatic complexity 32 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. — frontend/src/app/integrations/components/AIInsightsCard.tsx:35
  • selectDefaultAnalysis has cyclomatic complexity 30 and cognitive complexity 39; 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. — frontend/src/hooks/useDashboard.ts:1138
  • (anonymous) has cyclomatic complexity 29 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 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. — REDACTED:4142
  • fetchSyncedUsers has cyclomatic complexity 28 and cognitive complexity 37; 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. — frontend/src/app/integrations/handlers/team-handlers.ts:234
  • updateUserCorrelation has cyclomatic complexity 28 and cognitive complexity 33; 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. — frontend/src/app/management/handlers/user-mapping-handlers.ts:7
  • handleConnectAI has cyclomatic complexity 27 and cognitive complexity 39; 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. — frontend/src/app/integrations/handlers/ai-handlers.ts:44
  • (anonymous) has cyclomatic complexity 27 and cognitive complexity 34; 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. — frontend/e2e/data-retention-dashboard.spec.ts:98
  • UserMappingDrawer has cyclomatic complexity 27 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. — frontend/src/app/management/components/UserMappingDrawer.tsx:45
  • ObjectiveDataCard has cyclomatic complexity 27 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. — frontend/src/components/dashboard/ObjectiveDataCard.tsx:322
  • authenticateUser has cyclomatic complexity 27 and cognitive complexity 21; 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. — REDACTED:18
  • testConnection has cyclomatic complexity 26 and cognitive complexity 31; 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. — frontend/src/app/integrations/handlers/integration-handlers.ts:11
  • pollAnalysis has cyclomatic complexity 25 and cognitive complexity 42; 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. — frontend/src/hooks/useDashboard.ts:271
  • syncUsersToCorrelation has cyclomatic complexity 25 and cognitive complexity 40; 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. — frontend/src/app/integrations/handlers/team-handlers.ts:60
  • AlertBreakdownChart has cyclomatic complexity 25 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. — frontend/src/components/dashboard/AlertsCountCard.tsx:264
  • ManualSurveyDeliveryModal has cyclomatic complexity 25 and cognitive complexity 20; 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. — frontend/src/components/ManualSurveyDeliveryModal.tsx:44
  • runAutoMapping has cyclomatic complexity 24 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. — frontend/src/components/mapping-drawer.tsx:330
  • UserIncidentCard has cyclomatic complexity 24 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. — frontend/src/components/dashboard/UserIncidentCard.tsx:150
  • (anonymous) has cyclomatic complexity 24 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. — frontend/src/components/dashboard/MemberDetailModal.tsx:460
  • handleInvite has cyclomatic complexity 23 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. — frontend/src/app/integrations/handlers/organization-handlers.ts:7
  • getVulnerabilityTags has cyclomatic complexity 23 and cognitive complexity 32; 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. — frontend/src/lib/githubMetricUtils.ts:113
  • getAllVulnerabilityTags has cyclomatic complexity 23 and cognitive complexity 32; 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. — frontend/src/lib/githubMetricUtils.ts:199
R3 · Large Files4.4 / 10Weak✓ 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 4535 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
  • frontend/src/hooks/useDashboard.ts has 2504 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/hooks/useDashboard.ts:1
  • frontend/src/app/management/page.tsx has 2041 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/app/management/page.tsx:1
  • frontend/src/app/dashboard/page.tsx has 2019 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/app/dashboard/page.tsx:1
  • frontend/src/components/mapping-drawer.tsx has 1200 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/mapping-drawer.tsx:1
  • frontend/src/components/SlackSurveyTabs.tsx has 1008 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/SlackSurveyTabs.tsx:1
  • frontend/src/components/dashboard/AlertsCountCard.tsx has 773 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/dashboard/AlertsCountCard.tsx:1
  • frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx has 772 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:1
  • frontend/src/components/dashboard/ObjectiveDataCard.tsx has 717 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/dashboard/ObjectiveDataCard.tsx:1
  • frontend/src/components/dashboard/TeamMembersList.tsx has 651 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/dashboard/TeamMembersList.tsx:1
  • frontend/src/components/dashboard/UserObjectiveDataCard.tsx has 615 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/dashboard/UserObjectiveDataCard.tsx:1
  • frontend/src/app/integrations/handlers/integration-handlers.ts has 576 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/app/integrations/handlers/integration-handlers.ts:1
  • frontend/src/components/dashboard/UserAlertsCard.tsx has 576 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/dashboard/UserAlertsCard.tsx:1
  • frontend/src/components/landing-page.tsx has 573 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/landing-page.tsx:1
  • frontend/src/components/dashboard/TicketingCard.tsx has 554 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/dashboard/TicketingCard.tsx:1
  • frontend/src/app/management/components/UserMappingDrawer.tsx has 544 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/app/management/components/UserMappingDrawer.tsx:1
  • frontend/src/components/dashboard/MemberDetailModal.tsx has 540 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/dashboard/MemberDetailModal.tsx:1
  • frontend/src/app/methodology/page.tsx has 534 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/app/methodology/page.tsx:1
  • frontend/src/app/integrations/components/AIInsightsCard.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. — frontend/src/app/integrations/components/AIInsightsCard.tsx:1
  • frontend/src/app/integrations/components/UnifiedSlackCard.tsx has 502 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/app/integrations/components/UnifiedSlackCard.tsx:1
  • frontend/src/components/AccountSettingsDialog.tsx has 484 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/AccountSettingsDialog.tsx:1
  • frontend/src/app/integrations/handlers/mapping-handlers.ts has 480 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/app/integrations/handlers/mapping-handlers.ts:1
  • frontend/src/app/integrations/components/RootlyIntegrationForm.tsx has 479 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/app/integrations/components/RootlyIntegrationForm.tsx:1
  • frontend/src/components/dashboard/TeamHealthOverview.tsx has 463 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/dashboard/TeamHealthOverview.tsx:1
  • frontend/src/components/integrations/github-integration-card.tsx has 446 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/integrations/github-integration-card.tsx:1
  • frontend/src/lib/types.ts has 430 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/lib/types.ts:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage0.1 / 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, frontend/src/hooks/useDashboard.ts:1, frontend/src/app/management/page.tsx:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness5.8 / 10Adequate✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

  • 42 outdated package(s); JS/npm CVEs scored in D30
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json 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: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.

  • The package in `frontend` declares the lint script `lint` (`oxlint`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `frontend` (or the workspace's task runner). — frontend/package.json:9
R7 · Dead Code4.7 / 10Weak✓ 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.

  • Unreachable from the 28 application, 3 tooling and 10 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (28 application, 3 tooling, 10 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (frontend/src/components/integrations/enhancement-cards.tsx, frontend/src/components/integrations/integrations-cards.tsx, frontend/src/components/integrations/integrations-layout.tsx) — 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 — frontend/src/components/integrations/api-service.ts
  • no import path from any entry point (28 application, 3 tooling, 10 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 (×21) — frontend/src/components/jira-mapping-grid.tsx, frontend/src/components/integrations/jira-integration-card.tsx, frontend/src/components/InvitationAcceptanceModal.tsx, …
  • no import path from any entry point (28 application, 3 tooling, 10 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/components/integrations/integrations-layout.tsx) — 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 (×5) — frontend/src/components/integrations/enhancement-cards.tsx, frontend/src/hooks/use-integrations-state.ts, frontend/src/components/integrations/integrations-cards.tsx, …
  • no import path from any entry point (28 application, 3 tooling, 10 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/app/integrations/page-new.tsx) — 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 — frontend/src/components/integrations/integrations-layout.tsx
  • no import path from any entry point (28 application, 3 tooling, 10 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/hooks/use-backend-health.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 — frontend/src/lib/health-check.ts
  • no import path from any entry point (28 application, 3 tooling, 10 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/components/integrations/integrations-cards.tsx) — 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 — frontend/src/components/integrations/validation.ts
  • no import path from any entry point (28 application, 3 tooling, 10 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/components/simple-toast-display.tsx) — 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 — frontend/src/hooks/use-toast-simple.tsx
  • Nothing imports this binding — it is safe to review for removal. (×8) — frontend/src/app/integrations/handlers/ai-handlers.ts:154, frontend/src/app/integrations/handlers/jira-handlers.ts:224, frontend/src/app/integrations/handlers/jira-handlers.ts:246, …

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 Hygiene8.5 / 10Strong✓ 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.

  • Declared in the root package.json 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. — package.json:3
  • Declared in frontend/package.json 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) — frontend/package.json:19, frontend/package.json:45

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports10.0 / 10Exemplary✓ 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.

S1 · Web-Security Posture8.0 / 10Strong✓ Tool-verified

Other · Security — Only what this repository's own non-C# files could be read for was assessed — and because this repository commits the configuration that serves its own HTTP surface, that configuration could be read in full for the security response headers it sets. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. This is reported because `vercel.json` configures this repository's static hosting, including its response headers, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.) — backend/vercel.json:1

What to do

  • Set security response headers on the surface this repository serves: an `add_header` directive per header in the nginx/Caddy/Apache config, a `_headers` / `vercel.json` / `netlify.toml` entry for a static host, or `helmet()` in the HTTP server. `Content-Security-Policy` is the one that pays for itself first — it is what contains an injected script once one reaches the page — followed by `X-Content-Type-Options: nosniff` and a frame policy (`X-Frame-Options: DENY`, or CSP `frame-ancestors`). Where the app is served from a build container, the header configuration belongs in the image beside the built assets, so it ships with them rather than depending on where it lands.
X1 · Async correctness7.9 / 10Strong✓ Tool-verified

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.

  • The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception. (×4) — backend/app/services/auto_refresh_scheduler.py:392, REDACTED:512, backend/app/api/endpoints/linear.py:731, …

What to do

  • Task from `asyncio.create_task` is not kept
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.

X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

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 10/121 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.
  • `cancelRunningAnalysis` 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 })`. — frontend/src/hooks/useDashboard.ts:173
  • `loadAutoRefreshAnalysis` 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 })`. — frontend/src/hooks/useDashboard.ts:963
  • `saveCurrentAnalysis` 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 })`. — frontend/src/hooks/useDashboard.ts:983
  • `loadSpecificAnalysis` 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 })`. — frontend/src/hooks/useDashboard.ts:1008
  • `fetchFullAnalysisById` 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 })`. — frontend/src/hooks/useDashboard.ts:1098
  • `loadHistoricalTrends` 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 })`. — frontend/src/hooks/useDashboard.ts:1203
  • `confirmDeleteAnalysis` 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 })`. — frontend/src/hooks/useDashboard.ts:1272
  • `loadIntegrations` 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 })`. — frontend/src/hooks/useDashboard.ts:1411
  • `loadLlmConfig` 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 })`. (×2) — frontend/src/hooks/useDashboard.ts:1808, frontend/src/components/integrations/api-service.ts:344
  • `fetchTeamsForIntegration` 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 })`. — frontend/src/hooks/useDashboard.ts:1846
  • `refreshCurrentAnalysis` 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 })`. — frontend/src/hooks/useDashboard.ts:2449
  • `markAsRead` 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 })`. — frontend/src/hooks/useNotifications.ts:69
  • `dismiss` 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 })`. — frontend/src/hooks/useNotifications.ts:96
  • `markAllAsRead` 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 })`. — frontend/src/hooks/useNotifications.ts:123
  • `clearAll` 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 })`. — frontend/src/hooks/useNotifications.ts:150
  • `fetchDigestPreference` 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 })`. — frontend/src/components/AccountSettingsDialog.tsx:56
  • `fetchPromotableUsers` 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 })`. — frontend/src/components/AccountSettingsDialog.tsx:109
  • `fetchInvitation` 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 })`. — frontend/src/components/InvitationAcceptanceModal.tsx:48
  • `fetchPreview` 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 })`. — frontend/src/components/ManualSurveyDeliveryModal.tsx:67
  • `loadSurveyRecipients` 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 })`. — frontend/src/components/SlackSurveyTabs.tsx:287
  • `getAuthorizationUrl` 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 })`. — frontend/src/components/auth-provider-buttons.tsx:69
  • `loadRootlyIntegrations` 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 })`. — frontend/src/components/integrations/api-service.ts:82
  • `loadPagerDutyIntegrations` 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 })`. — frontend/src/components/integrations/api-service.ts:101
  • `loadGitHubIntegration` 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 })`. — frontend/src/components/integrations/api-service.ts:120
  • `loadSlackIntegration` 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 })`. — frontend/src/components/integrations/api-service.ts:138
  • `testConnection` 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 })`. — frontend/src/components/integrations/api-service.ts:200
  • `loadUserInfo` 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 })`. — frontend/src/components/integrations/api-service.ts:236
  • `createIntegration` 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 })`. — frontend/src/components/integrations/api-service.ts:254
  • `updateIntegration` 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 })`. — frontend/src/components/integrations/api-service.ts:288
  • `deleteIntegration` 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 })`. — frontend/src/components/integrations/api-service.ts:318
  • `saveLlmConfig` 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 })`. — frontend/src/components/integrations/api-service.ts:361
  • `deleteLlmConfig` 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 })`. — frontend/src/components/integrations/api-service.ts:392
  • `fetchDailyHealth` 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 })`. (×2) — frontend/src/components/dashboard/MemberDetailModal.tsx:69, frontend/src/components/dashboard/UserObjectiveDataCard.tsx:223
  • `fetchDailyCommits` 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 })`. — frontend/src/components/dashboard/MemberDetailModal.tsx:303
  • `loadLiveOpenAIMappings` 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 })`. — frontend/src/components/dashboard/TeamMembersList.tsx:200
  • `fetchTimelineData` 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 })`. — frontend/src/components/dashboard/charts/GitHubCommitsTimeline.tsx:21
  • `run` 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 })`. — frontend/src/app/setup/linear/callback/page.tsx:22

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.

X23 · Unguarded diagnostic materialisation7.9 / 10Strong✓ Tool-verified

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

  • `debug` at line 1782 is called with an argument built by `list(user.keys())` (line 1782), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on. — backend/app/services/unified_burnout_analyzer.py:1782

What to do

  • In Python, put the construction behind the logger's own check (`if logger.isEnabledFor(logging.DEBUG):`), or pass the collection itself with a `%s` placeholder (`logger.debug("Items %s", items)`) so the logging module renders it only when the record is emitted. The placeholder alone is not the fix when the argument is still built first: it defers the formatting, not a `json.dumps`, a `join` or a comprehension in the argument, and an f-string defers nothing at all.
X24 · Document value interpolated into markup unescaped6.4 / 10Adequate✓ 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.

  • `` window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(argum…` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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. — frontend/src/app/layout.tsx:43
  • `siX.svg.replace(/<svg/,'<svg fill="currentColor" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round" str…` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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. — frontend/src/components/landing-page.tsx:592

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.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X3 · Exception handling6.6 / 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. (×26) — frontend/src/hooks/useDashboard.ts:629, frontend/src/hooks/useDashboard.ts:977, frontend/src/hooks/useDashboard.ts:1082, …
  • `.catch(error => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — REDACTED:865
  • `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×10) — backend/migrations/migration_runner.py:76, backend/app/services/api_key_service.py:60, backend/app/services/unified_burnout_analyzer.py:2245, …
  • `except` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×3) — backend/app/services/unified_burnout_analyzer.py:2905, backend/app/services/unified_burnout_analyzer.py:5512, backend/app/services/unified_burnout_analyzer.py:5863

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.

X4 · Structured logging1.8 / 10Critical✓ Tool-verified

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

  • `error` at line 75 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — backend/mock_data_helpers/manage_demo_analyses.py:75
  • `error` at line 81 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — backend/mock_data_helpers/manage_demo_analyses.py:81
  • `error` at line 82 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — backend/mock_data_helpers/manage_demo_analyses.py:82
  • `info` at line 86 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — backend/mock_data_helpers/manage_demo_analyses.py:86
  • `error` at line 203 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — backend/mock_data_helpers/manage_demo_analyses.py:203
  • `error` at line 204 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — backend/mock_data_helpers/manage_demo_analyses.py:204
  • `info` at line 213 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — backend/mock_data_helpers/manage_demo_analyses.py:213
  • `info` at line 214 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — backend/mock_data_helpers/manage_demo_analyses.py:214
  • `info` at line 218 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — backend/mock_data_helpers/manage_demo_analyses.py:218
  • `warning` at line 221 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — backend/mock_data_helpers/manage_demo_analyses.py:221
  • `warning` at line 256 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — backend/mock_data_helpers/manage_demo_analyses.py:256
  • `info` at line 259 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — backend/mock_data_helpers/manage_demo_analyses.py:259
  • `error` at line 263 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — backend/mock_data_helpers/manage_demo_analyses.py:263
  • `error` at line 267 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — backend/mock_data_helpers/manage_demo_analyses.py:267
  • `error` at line 64 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — backend/migrations/migration_runner.py:64
  • `info` at line 90 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — backend/migrations/migration_runner.py:90
  • `error` at line 92 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — backend/migrations/migration_runner.py:92
  • `info` at line 105 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — backend/migrations/migration_runner.py:105
  • `error` at line 112 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — backend/migrations/migration_runner.py:112
  • `info` at line 115 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — backend/migrations/migration_runner.py:115
  • `info` at line 123 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — backend/migrations/migration_runner.py:123
  • `error` at line 127 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — backend/migrations/migration_runner.py:127
  • `warning` at line 163 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — backend/migrations/migration_runner.py:163
  • `error` at line 166 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — backend/migrations/migration_runner.py:166
  • `info` at line 1448 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — backend/migrations/migration_runner.py:1448
  • `error` at line 1453 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — backend/migrations/migration_runner.py:1453
  • `info` at line 1457 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — backend/migrations/migration_runner.py:1457
  • `warning` at line 1463 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — backend/migrations/migration_runner.py:1463
  • `info` at line 1483 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — backend/migrations/migration_runner.py:1483
  • `info` at line 1485 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — backend/migrations/migration_runner.py:1485
  • `error` at line 1490 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — backend/migrations/migration_runner.py:1490
  • `error` at line 1508 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — backend/migrations/migration_runner.py:1508
  • `info` at line 126 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — backend/app/main.py:126
  • `warning` at line 159 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — backend/app/utils/incident_utils.py:159
  • `warning` at line 296 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — backend/app/utils/incident_utils.py:296
  • `warning` at line 313 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — backend/app/utils/incident_utils.py:313
  • `info` at line 320 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — backend/app/utils/incident_utils.py:320
  • `warning` at line 396 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — backend/app/utils/incident_utils.py:396
  • `debug` at line 428 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — backend/app/utils/incident_utils.py:428
  • `info` at line 69 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — backend/app/utils/visual_logger.py:69

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types2.0 / 10Critical✓ 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/1 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
  • ~0.3 `!` null assertions per 1k TypeScript source lines — 15 assertion(s) across the 49127 source line(s) of the 186 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: frontend/src/app/management/page.tsx (3), frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx (2), frontend/src/app/integrations/handlers/team-handlers.ts (2). 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 Health25.4Weak — gated by D1, D2, R10, R2, X4, X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture87.7Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity65.2Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness19.1Critical — gated by D12, R4, P3, P5, P7, P8Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security63.9Adequate — gated by D28, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility54.8Adequate — gated by AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance100.0ExemplaryStrongest area.
Unscored — 8 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.

  • AXA1 Runtime unauthenticated reachability — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXH1 Runtime security headers — 11 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXI1 Runtime container hardening — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXO1 Runtime API surface — 26 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • AXP1 Runtime third-party data flows — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 26 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • C3 Audit Trail — Repo shows no audit-logging mechanism (an audit-log table or model — a class or table named for it — django-simple-history, django-auditlog, django-reversion, django-pghistory or SQLAlchemy-Continuum recording each change, or an event-sourced store beside one) for sensitive changes — absence of evidence is not evidence of a working control. Record an audit trail in code (or document where it lives) so this dimension can be scored.
Not included — 44 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • 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 (rendered) — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXS1 Runtime exposed surface — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D11 Test Reliability — Test reliability not scored — polyglot repository, one half has no runner
  • 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.
  • D21 Naming Consistency — D21 withholds its sibling role token rows: 2 candidate(s) found and not reported.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • 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 — JavaScript/TypeScript suite
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (2 value object(s))
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — 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'.
  • 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 a pytest-benchmark or pytest-codspeed dependency with tests taking the `benchmark` fixture, an asv.conf.json with its `time_`/`mem_`/`peakmem_` benchmarks, or a pyperf Runner, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not 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.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop — X16 reached only 43% of this repository's production lines — python (59,032 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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
  • 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
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X29 Per-element action decided by a fixed element — X29 reached only 43% of this repository's production lines — python (59,032 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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.
  • 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 — 92 finding(s)
D28 · Secrets (history) · High secret · ×34
  • 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
  • + 9 more in this group — see findings.md.
AC2 · Forms & labels · <label> that labels no control · ×15
  • <label> that labels no control frontend/src/app/dashboard/page.tsx:1429 — 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.
  • <label> that labels no control frontend/src/app/dashboard/page.tsx:1543 — 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.
  • <label> that labels no control frontend/src/app/dashboard/page.tsx:1632 — 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.
  • <label> that labels no control frontend/src/app/dashboard/page.tsx:1837 — 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.
  • <label> that labels no control frontend/src/app/dashboard/page.tsx:1879 — 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.
  • <label> that labels no control frontend/src/app/integrations/components/AnthropicUsageSetupCard.tsx:32 — 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.
  • <label> that labels no control frontend/src/app/integrations/components/OpenAIUsageSetupCard.tsx:32 — 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.
  • <label> that labels no control frontend/src/app/integrations/dialogs/NewMappingDialog.tsx:47 — 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.
  • <label> that labels no control frontend/src/app/integrations/dialogs/NewMappingDialog.tsx:64 — 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.
  • <label> that labels no control frontend/src/app/integrations/dialogs/NewMappingDialog.tsx:81 — 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.
  • <label> that labels no control frontend/src/app/integrations/dialogs/NewMappingDialog.tsx:93 — 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.
  • <label> that labels no control frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:391 — 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.
  • <label> that labels no control REDACTED:3829 — 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.
  • <label> that labels no control REDACTED:3847 — 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.
  • <label> that labels no control frontend/src/app/management/page.tsx:1212 — 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.
AC2 · Forms & labels · <input> without a programmatic label · ×7
  • <input> without a programmatic label REDACTED:4148 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label REDACTED:4244 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label frontend/src/app/management/page.tsx:1570 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label frontend/src/app/management/page.tsx:1637 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label frontend/src/app/management/page.tsx:1710 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label frontend/src/app/management/page.tsx:1775 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label frontend/src/app/management/page.tsx:1853 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
AC2 · Forms & labels · <button> with no accessible text · ×6
  • <button> with no accessible text frontend/src/app/dashboard/page.tsx:1994 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:509 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text frontend/src/app/management/components/UserMappingDrawer.tsx:257 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text frontend/src/app/management/components/UserMappingDrawer.tsx:340 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text frontend/src/app/management/components/UserMappingDrawer.tsx:431 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text frontend/src/app/management/components/UserMappingDrawer.tsx:512 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×5
  • Click handler on a non-interactive <div> frontend/src/app/dashboard/page.tsx:426 — 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 <div> frontend/src/app/integrations/components/IntegrationCardItem.tsx:81 — A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}.
  • Click handler on a non-interactive <div> REDACTED:2998 — A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}.
  • Click handler on a non-interactive <div> frontend/src/components/IntroGuide.tsx:60 — 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 <div> frontend/src/components/dashboard/GitHubAllMetricsPopup.tsx:103 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
D28 · Secrets (history) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Boundary-crossing change coupling · ×3
  • Boundary-crossing change coupling: user_correlation.py ↔ migration_runner.py backend/app/models/user_correlation.py:1 — `backend/app/models/user_correlation.py` (context models) and `backend/migrations/migration_runner.py` (context migrations) sit in DIFFERENT parts of the tree yet change together 60% of the time (9 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) — 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 9 shared commits counted here, the most recent 3 are `87daf807` feat: sync PagerDuty team memberships during org sync; `0f654c98` Add avatar_url support for user profile images; `0349fcca` Add user timezone support and configurable working hours — run `git show` on any of them.
  • Boundary-crossing change coupling: REDACTED ↔ GitHubCommitsTimeline.tsx frontend/src/app/dashboard/page.tsx:1 — `frontend/src/app/dashboard/page.tsx` (context dashboard) and `frontend/src/components/dashboard/charts/GitHubCommitsTimeline.tsx` (context components) sit in DIFFERENT parts of the tree yet 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) — 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 6 shared commits counted here, the most recent 3 are `a779c0a2` additional coloring changes; `5850e426` Reapply "Merge pull request #29 from Rootly-AI-Labs/dev"; `6012ed3f` Revert "Merge pull request #29 from Rootly-AI-Labs/dev" — run `git show` on any of them.
  • Boundary-crossing change coupling: REDACTED ↔ UserAlertsCard.tsx frontend/src/app/dashboard/page.tsx:1 — `frontend/src/app/dashboard/page.tsx` (context dashboard) and `frontend/src/components/dashboard/UserAlertsCard.tsx` (context components) 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 `6ddb7dd8` updated user alert card and tema alert card to show placeholder text …; `85547f3d` seperated leaderboard card, cleaned up alerts card for user popup; `112b5fde` fixed ui components in alerts leaderboard and alert team/user cards, … — run `git show` on any of them.
AC2 · Forms & labels · Custom control with no accessible name on <div> · ×2
  • Custom control with no accessible name on <div> frontend/src/app/dashboard/page.tsx:426 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> frontend/src/components/IntroGuide.tsx:60 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC2 · Forms & labels · Link with no accessible name · ×2
  • Link with no accessible name frontend/src/app/integrations/components/AIInsightsCard.tsx:477 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
  • Link with no accessible name REDACTED:3917 — A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
AC2 · Forms & labels · <select> without a programmatic label · ×2
  • <select> without a programmatic label frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:557 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label REDACTED:3832 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC4 · Keyboard semantics · Hover-only interaction on <div> · ×2
  • Hover-only interaction on <div> frontend/src/app/dashboard/page.tsx:1064 — This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
  • Hover-only interaction on <div> frontend/src/components/ui/tooltip.tsx:72 — This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
D31 · IaC & Container Security · High IaC · ×2
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <textarea> without a programmatic label · ×1
  • <textarea> without a programmatic label frontend/src/app/unsubscribe/page.tsx:174 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
AC3 · Page structure · Document without a <title> · ×1
  • Document without a <title> frontend/src/app/layout.tsx:26 — A page with no <title> gives no name in the tab, history or screen-reader page list. Declare it the way this router does — Next App Router `export const metadata = { title }`, React Router/Remix `export function meta`, TanStack Start `head`, or a Helmet/Head component.
AC4 · Keyboard semantics · Click handler on a non-interactive <tr> · ×1
  • Click handler on a non-interactive <tr> frontend/src/components/dashboard/TeamMembersList.tsx:321 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
D14 · License Compliance · Banned license · ×1
  • Banned license: psycopg — `psycopg` 3.3.9 is published on PyPI under `LGPL-3.0-only`, which this policy bans, and it is in the SHIPPED closure of this repository — so it is installed by everything that depends on this repository, not just by its test environment. A distribution offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package, 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×1
  • Orphaned knowledge backend/app/agents/workflows/comprehensive_analysis.py:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Serious — 1277 finding(s)
D3 · God Classes · FunctionTooLong · ×66
  • FunctionTooLong: page.IntegrationsPage REDACTED:179 — FunctionTooLong — IntegrationsPage runs 3608 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3508 over it, 36.08× 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: useDashboard.useDashboard frontend/src/hooks/useDashboard.ts:29 — FunctionTooLong — useDashboard runs 1852 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1752 over it, 18.52× 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: page.TeamPageContent frontend/src/app/management/page.tsx:82 — FunctionTooLong — TeamPageContent runs 1615 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1515 over it, 16.15× 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: mapping-drawer.MappingDrawer frontend/src/components/mapping-drawer.tsx:71 — FunctionTooLong — MappingDrawer runs 956 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 856 over it, 9.56× 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: SlackSurveyTabs.SlackSurveyTabs frontend/src/components/SlackSurveyTabs.tsx:43 — FunctionTooLong — SlackSurveyTabs runs 835 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 735 over it, 8.35× 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: OrganizationManagementDialog.OrganizationManagementDialog frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:82 — FunctionTooLong — OrganizationManagementDialog runs 621 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 521 over it, 6.21× 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: UserMappingDrawer.UserMappingDrawer frontend/src/app/management/components/UserMappingDrawer.tsx:45 — FunctionTooLong — UserMappingDrawer runs 438 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 338 over it, 4.38× 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: TeamMembersList.TeamMembersList frontend/src/components/dashboard/TeamMembersList.tsx:176 — FunctionTooLong — TeamMembersList runs 428 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 328 over it, 4.28× 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: AIInsightsCard.AIInsightsCard frontend/src/app/integrations/components/AIInsightsCard.tsx:35 — FunctionTooLong — AIInsightsCard runs 422 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 322 over it, 4.22× 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: UnifiedSlackCard.UnifiedSlackCard frontend/src/app/integrations/components/UnifiedSlackCard.tsx:50 — FunctionTooLong — UnifiedSlackCard runs 399 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 299 over it, 3.99× 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: AccountSettingsDialog.AccountSettingsDialog frontend/src/components/AccountSettingsDialog.tsx:38 — FunctionTooLong — AccountSettingsDialog runs 399 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 299 over it, 3.99× 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: UserAlertsCard.UserAlertsCard frontend/src/components/dashboard/UserAlertsCard.tsx:150 — FunctionTooLong — UserAlertsCard runs 399 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 299 over it, 3.99× 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: ObjectiveDataCard.ObjectiveDataCard frontend/src/components/dashboard/ObjectiveDataCard.tsx:322 — FunctionTooLong — ObjectiveDataCard runs 397 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 297 over it, 3.97× 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: RootlyIntegrationForm.RootlyIntegrationForm frontend/src/app/integrations/components/RootlyIntegrationForm.tsx:30 — FunctionTooLong — RootlyIntegrationForm runs 396 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 296 over it, 3.96× 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: UserObjectiveDataCard.UserObjectiveDataCard frontend/src/components/dashboard/UserObjectiveDataCard.tsx:207 — FunctionTooLong — UserObjectiveDataCard runs 395 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 295 over it, 3.95× 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: github-integration-card.GitHubIntegrationCard frontend/src/components/integrations/github-integration-card.tsx:57 — FunctionTooLong — GitHubIntegrationCard runs 360 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 260 over it, 3.60× 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: TeamHealthOverview.TeamHealthOverview frontend/src/components/dashboard/TeamHealthOverview.tsx:107 — FunctionTooLong — TeamHealthOverview runs 333 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 233 over it, 3.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: slack-integration-card.SlackIntegrationCard frontend/src/components/integrations/slack-integration-card.tsx:56 — FunctionTooLong — SlackIntegrationCard runs 314 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 214 over it, 3.14× 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: AlertsCountCard.AlertBreakdownChart frontend/src/components/dashboard/AlertsCountCard.tsx:264 — FunctionTooLong — AlertBreakdownChart runs 304 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 204 over it, 3.04× 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: ManualSurveyDeliveryModal.ManualSurveyDeliveryModal frontend/src/components/ManualSurveyDeliveryModal.tsx:44 — FunctionTooLong — ManualSurveyDeliveryModal runs 288 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 188 over it, 2.88× 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: useDashboard.useDashboard.runAnalysisWithTimeRange frontend/src/hooks/useDashboard.ts:2027 — FunctionTooLong — useDashboard.runAnalysisWithTimeRange runs 273 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 173 over it, 2.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.
  • FunctionTooLong: page.MethodologyPage frontend/src/app/methodology/page.tsx:258 — FunctionTooLong — MethodologyPage runs 272 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 172 over it, 2.72× 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: jira-integration-card.JiraIntegrationCard frontend/src/components/integrations/jira-integration-card.tsx:66 — FunctionTooLong — JiraIntegrationCard runs 271 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 171 over it, 2.71× 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: jira-mapping-grid.JiraMapppingGrid frontend/src/components/jira-mapping-grid.tsx:45 — FunctionTooLong — JiraMapppingGrid runs 269 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 169 over it, 2.69× 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: TopPanel.TopPanel frontend/src/components/TopPanel.tsx:44 — FunctionTooLong — TopPanel runs 258 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 158 over it, 2.58× 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.
  • + 41 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 frontend/src/hooks/useDashboard.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 frontend/src/app/management/page.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 frontend/src/app/dashboard/page.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 frontend/src/components/mapping-drawer.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 frontend/src/components/SlackSurveyTabs.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 frontend/src/components/dashboard/AlertsCountCard.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 frontend/src/app/integrations/dialogs/OrganizationManagementDialog.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 frontend/src/components/dashboard/ObjectiveDataCard.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 frontend/src/components/dashboard/TeamMembersList.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 frontend/src/components/dashboard/UserObjectiveDataCard.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 frontend/src/app/integrations/handlers/integration-handlers.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 frontend/src/components/dashboard/UserAlertsCard.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 frontend/src/components/landing-page.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 frontend/src/components/dashboard/TicketingCard.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 frontend/src/components/dashboard/MemberDetailModal.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 frontend/src/app/management/components/UserMappingDrawer.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 frontend/src/app/methodology/page.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 frontend/src/app/integrations/components/UnifiedSlackCard.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 frontend/src/app/integrations/components/AIInsightsCard.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 frontend/src/app/integrations/handlers/mapping-handlers.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 frontend/src/components/AccountSettingsDialog.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 frontend/src/components/dashboard/TeamHealthOverview.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 frontend/src/app/integrations/components/RootlyIntegrationForm.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 frontend/src/components/integrations/github-integration-card.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.
X2 · Cancellation propagation · Async function without AbortSignal · ×39
  • Async function without AbortSignal: cancelRunningAnalysis frontend/src/hooks/useDashboard.ts:173 — `cancelRunningAnalysis` 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: loadAutoRefreshAnalysis frontend/src/hooks/useDashboard.ts:963 — `loadAutoRefreshAnalysis` 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: saveCurrentAnalysis frontend/src/hooks/useDashboard.ts:983 — `saveCurrentAnalysis` 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: loadSpecificAnalysis frontend/src/hooks/useDashboard.ts:1008 — `loadSpecificAnalysis` 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: fetchFullAnalysisById frontend/src/hooks/useDashboard.ts:1098 — `fetchFullAnalysisById` 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: loadHistoricalTrends frontend/src/hooks/useDashboard.ts:1203 — `loadHistoricalTrends` 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: confirmDeleteAnalysis frontend/src/hooks/useDashboard.ts:1272 — `confirmDeleteAnalysis` 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: loadIntegrations frontend/src/hooks/useDashboard.ts:1411 — `loadIntegrations` 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: loadLlmConfig frontend/src/hooks/useDashboard.ts:1808 — `loadLlmConfig` 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: fetchTeamsForIntegration frontend/src/hooks/useDashboard.ts:1846 — `fetchTeamsForIntegration` 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: refreshCurrentAnalysis frontend/src/hooks/useDashboard.ts:2449 — `refreshCurrentAnalysis` 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: markAsRead frontend/src/hooks/useNotifications.ts:69 — `markAsRead` 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: dismiss frontend/src/hooks/useNotifications.ts:96 — `dismiss` 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: markAllAsRead frontend/src/hooks/useNotifications.ts:123 — `markAllAsRead` 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: clearAll frontend/src/hooks/useNotifications.ts:150 — `clearAll` 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: fetchDigestPreference frontend/src/components/AccountSettingsDialog.tsx:56 — `fetchDigestPreference` 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: fetchPromotableUsers frontend/src/components/AccountSettingsDialog.tsx:109 — `fetchPromotableUsers` 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: fetchInvitation frontend/src/components/InvitationAcceptanceModal.tsx:48 — `fetchInvitation` 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: fetchPreview frontend/src/components/ManualSurveyDeliveryModal.tsx:67 — `fetchPreview` 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: loadSurveyRecipients frontend/src/components/SlackSurveyTabs.tsx:287 — `loadSurveyRecipients` 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: getAuthorizationUrl frontend/src/components/auth-provider-buttons.tsx:69 — `getAuthorizationUrl` 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: loadRootlyIntegrations frontend/src/components/integrations/api-service.ts:82 — `loadRootlyIntegrations` 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: loadPagerDutyIntegrations frontend/src/components/integrations/api-service.ts:101 — `loadPagerDutyIntegrations` 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: loadGitHubIntegration frontend/src/components/integrations/api-service.ts:120 — `loadGitHubIntegration` 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: loadSlackIntegration frontend/src/components/integrations/api-service.ts:138 — `loadSlackIntegration` 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 })`.
  • + 14 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×35
  • FileTooLong: services/unified_burnout_analyzer.py backend/app/services/unified_burnout_analyzer.py — FileTooLong — 4168 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3668 over it, 8.34× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 3781 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: IntegrationsPage (179-4932). The bar is 500 significant lines; this is 3281 over it, 7.56× 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 — 3088 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2588 over it, 6.18× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: endpoints/rootly.py backend/app/api/endpoints/rootly.py — FileTooLong — 1915 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1415 over it, 3.83× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: hooks/useDashboard.ts frontend/src/hooks/useDashboard.ts — FileTooLong — 1875 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: useDashboard (29-2876). The bar is 500 significant lines; this is 1375 over it, 3.75× 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: dashboard/page.tsx frontend/src/app/dashboard/page.tsx — FileTooLong — 1805 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1305 over it, 3.61× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: management/page.tsx frontend/src/app/management/page.tsx — FileTooLong — 1695 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: TeamPageContent (82-2217). The bar is 500 significant lines; this is 1195 over it, 3.39× 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: core/rootly_client.py backend/app/core/rootly_client.py — FileTooLong — 1662 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1162 over it, 3.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1605 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1105 over it, 3.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: services/user_sync_service.py backend/app/services/user_sync_service.py — FileTooLong — 1128 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 628 over it, 2.26× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: core/pagerduty_client.py backend/app/core/pagerduty_client.py — FileTooLong — 1089 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 589 over it, 2.18× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: endpoints/linear.py backend/app/api/endpoints/linear.py — FileTooLong — 1050 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 550 over it, 2.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: endpoints/manual_mappings.py backend/app/api/endpoints/manual_mappings.py — FileTooLong — 1024 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 524 over it, 2.05× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: components/mapping-drawer.tsx frontend/src/components/mapping-drawer.tsx — FileTooLong — 1017 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: MappingDrawer (71-1320). The bar is 500 significant lines; this is 517 over it, 2.03× 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 — 982 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 482 over it, 1.96× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: services/ai_burnout_analyzer.py backend/app/services/ai_burnout_analyzer.py — FileTooLong — 950 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 450 over it, 1.90× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: components/SlackSurveyTabs.tsx frontend/src/components/SlackSurveyTabs.tsx — FileTooLong — 871 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: SlackSurveyTabs (43-1088). The bar is 500 significant lines; this is 371 over it, 1.74× 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: services/weekly_digest_service.py backend/app/services/weekly_digest_service.py — FileTooLong — 861 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 361 over it, 1.72× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: services/slack_collector.py backend/app/services/slack_collector.py — FileTooLong — 767 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 267 over it, 1.53× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 761 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 261 over it, 1.52× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: services/survey_scheduler.py backend/app/services/survey_scheduler.py — FileTooLong — 731 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 231 over it, 1.46× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: services/github_only_burnout_analyzer.py backend/app/services/github_only_burnout_analyzer.py — FileTooLong — 728 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 228 over it, 1.46× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: services/github_collector.py backend/app/services/github_collector.py — FileTooLong — 721 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 221 over it, 1.44× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: dialogs/OrganizationManagementDialog.tsx frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx — FileTooLong — 684 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: OrganizationManagementDialog (82-820). The bar is 500 significant lines; this is 184 over it, 1.37× 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: dashboard/AlertsCountCard.tsx frontend/src/components/dashboard/AlertsCountCard.tsx — FileTooLong — 682 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 182 over it, 1.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 10 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×27
  • Swallowed exception (empty catch) frontend/src/hooks/useDashboard.ts:629 — 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) frontend/src/hooks/useDashboard.ts:977 — 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) frontend/src/hooks/useDashboard.ts:1082 — 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) frontend/src/hooks/useDashboard.ts:1236 — 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) frontend/src/hooks/useDashboard.ts:1366 — 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) frontend/src/hooks/useDashboard.ts:1477 — 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) frontend/src/hooks/useDashboard.ts:1986 — 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) frontend/src/hooks/useDashboard.ts:1993 — 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) frontend/src/hooks/useDashboard.ts:2104 — 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) frontend/src/components/mapping-drawer.tsx:217 — 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) frontend/src/components/mapping-drawer.tsx:417 — 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) frontend/src/app/setup/linear/callback/page.tsx:73 — 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) frontend/src/app/setup/jira/callback/page.tsx:73 — 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) frontend/src/app/management/page.tsx:191 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:865 — `.catch(error => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) REDACTED:1462 — 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) frontend/src/app/integrations/handlers/github-handlers.ts:20 — 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) frontend/src/app/integrations/handlers/integration-handlers.ts:134 — 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) frontend/src/app/integrations/handlers/integration-handlers.ts:193 — 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) frontend/src/app/integrations/handlers/jira-handlers.ts:20 — 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) frontend/src/app/integrations/handlers/linear-handlers.ts:20 — 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) frontend/src/app/integrations/handlers/slack-handlers.ts:20 — 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) frontend/src/app/integrations/handlers/slack-handlers.ts:226 — 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) frontend/src/app/integrations/components/AIInsightsCard.tsx:184 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:128 — 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 more in this group — see findings.md.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×24
  • Outbound HTTP without resilience backend/app/api/endpoints/github.py:245 — `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience backend/app/api/endpoints/github.py:471 — `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience backend/app/api/endpoints/github.py:705 — `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:265 — `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:504 — `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:884 — `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:1105 — `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:1253 — `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:1383 — `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:1459 — `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:1624 — `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience backend/app/auth/oauth.py:69 — `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience backend/app/auth/oauth.py:87 — `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience backend/app/auth/oauth.py:135 — `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience backend/app/auth/oauth.py:153 — `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience backend/app/auth/oauth.py:171 — `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience backend/app/auth/oauth.py:252 — `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience backend/app/auth/oauth.py:271 — `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience backend/app/services/enhanced_github_collector.py:183 — `aiohttp.ClientSession(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience backend/app/services/jira_user_sync_service.py:111 — `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience backend/app/services/slack_collector.py:172 — `aiohttp.ClientSession(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience backend/app/services/slack_collector.py:347 — `aiohttp.ClientSession(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience backend/app/services/slack_collector.py:620 — `aiohttp.ClientSession(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience backend/app/services/slack_dm_sender.py:95 — `httpx.AsyncClient(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
AXO1 · Runtime API surface · Served but not documented in the repository · ×23
  • Served but not documented in the repository: GET /auth/okta backend/openapi.json — The running application's own API description declares GET /auth/okta, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: GET /auth/okta/callback backend/openapi.json — The running application's own API description declares GET /auth/okta/callback, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: GET /auth/organizations/retention backend/openapi.json — The running application's own API description declares GET /auth/organizations/retention, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: PUT /auth/organizations/retention backend/openapi.json — The running application's own API description declares PUT /auth/organizations/retention, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: POST /auth/organizations/retention/preview backend/openapi.json — The running application's own API description declares POST /auth/organizations/retention/preview, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: POST /rootly/token/teams backend/openapi.json — The running application's own API description declares POST /rootly/token/teams, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: GET /rootly/integrations/{integration_id}/teams backend/openapi.json — The running application's own API description declares GET /rootly/integrations/{integration_id}/teams, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: PATCH /rootly/user-correlation/{correlation_id}/openai-mapping backend/openapi.json — The running application's own API description declares PATCH /rootly/user-correlation/{correlation_id}/openai-mapping, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: GET /analyses/auto-refresh backend/openapi.json — The running application's own API description declares GET /analyses/auto-refresh, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: POST /analyses/{analysis_id}/save backend/openapi.json — The running application's own API description declares POST /analyses/{analysis_id}/save, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: GET /analyses/users/{user_email}/openai-daily-usage backend/openapi.json — The running application's own API description declares GET /analyses/users/{user_email}/openai-daily-usage, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: GET /integrations/ai-usage/status backend/openapi.json — The running application's own API description declares GET /integrations/ai-usage/status, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: POST /integrations/ai-usage/connect backend/openapi.json — The running application's own API description declares POST /integrations/ai-usage/connect, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: POST /integrations/ai-usage/test backend/openapi.json — The running application's own API description declares POST /integrations/ai-usage/test, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: DELETE /integrations/ai-usage/disconnect backend/openapi.json — The running application's own API description declares DELETE /integrations/ai-usage/disconnect, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: GET /integrations/ai-usage/openai-members backend/openapi.json — The running application's own API description declares GET /integrations/ai-usage/openai-members, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: GET /integrations/ai-usage/usage backend/openapi.json — The running application's own API description declares GET /integrations/ai-usage/usage, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: POST /integrations/manual-mappings/run-openai-mapping backend/openapi.json — The running application's own API description declares POST /integrations/manual-mappings/run-openai-mapping, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: GET /api/digests/weekly/preference backend/openapi.json — The running application's own API description declares GET /api/digests/weekly/preference, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: PATCH /api/digests/weekly/preference backend/openapi.json — The running application's own API description declares PATCH /api/digests/weekly/preference, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: GET /api/digests/weekly/unsubscribe backend/openapi.json — The running application's own API description declares GET /api/digests/weekly/unsubscribe, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: POST /api/digests/weekly/unsubscribe backend/openapi.json — The running application's own API description declares POST /api/digests/weekly/unsubscribe, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
  • Served but not documented in the repository: POST /api/digests/weekly/test backend/openapi.json — The running application's own API description declares POST /api/digests/weekly/test, and backend/openapi.json does not. The set is exact — it is the app's own document diffed against yours, not a guess at endpoint names. Observed in our sandbox, which boots the stack from the repository's own boot declaration — that configuration is frequently a development one, so this does NOT establish that the operation is exposed in your deployed environment. Advisory evidence for CRA Annex I (2)(j).
D15 · Churn × Complexity Hotspots · Hotspot · ×18
  • Hotspot: REDACTED REDACTED:3241 — REDACTED changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 246 in analyses.run_analysis_task at line 3241. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 11:39:46 -08:00' --until='2026-11-10 11:39:46 -08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: frontend/src/app/management/page.tsx frontend/src/app/management/page.tsx:82 — frontend/src/app/management/page.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 377 in page.TeamPageContent at line 82. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 11:39:46 -08:00' --until='2026-11-10 11:39:46 -08:00' --full-history --no-merges -- frontend/src/app/management/page.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: frontend/src/app/dashboard/page.tsx frontend/src/app/dashboard/page.tsx:133 — frontend/src/app/dashboard/page.tsx changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 244 in page.DashboardContent at line 133. 1 of those changes was a fix/bug commit, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 11:39:46 -08:00' --until='2026-11-10 11:39:46 -08:00' --full-history --no-merges -- frontend/src/app/dashboard/page.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: frontend/src/hooks/useDashboard.ts frontend/src/hooks/useDashboard.ts:29 — frontend/src/hooks/useDashboard.ts changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 97 in useDashboard.useDashboard at line 29. 7 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 11:39:46 -08:00' --until='2026-11-10 11:39:46 -08:00' --full-history --no-merges -- frontend/src/hooks/useDashboard.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: frontend/src/app/management/components/DataRetentionSettings.tsx frontend/src/app/management/components/DataRetentionSettings.tsx:22 — frontend/src/app/management/components/DataRetentionSettings.tsx changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 93 in DataRetentionSettings.DataRetentionSettings at line 22. 2 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 11:39:46 -08:00' --until='2026-11-10 11:39:46 -08:00' --full-history --no-merges -- frontend/src/app/management/components/DataRetentionSettings.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: backend/app/services/unified_burnout_analyzer.py backend/app/services/unified_burnout_analyzer.py:1184 — backend/app/services/unified_burnout_analyzer.py changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in UnifiedBurnoutAnalyzer._fetch_analysis_data at line 1184. 3 of those changes were fix/bug commits, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 11:39:46 -08:00' --until='2026-11-10 11:39:46 -08:00' --full-history --no-merges -- backend/app/services/unified_burnout_analyzer.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: backend/app/services/auto_refresh_scheduler.py backend/app/services/auto_refresh_scheduler.py:54 — backend/app/services/auto_refresh_scheduler.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in auto_refresh_scheduler.check_and_run_auto_refresh_analyses at line 54. 2 of those changes were fix/bug commits, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 11:39:46 -08:00' --until='2026-11-10 11:39:46 -08:00' --full-history --no-merges -- backend/app/services/auto_refresh_scheduler.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: backend/app/services/retention_preview.py backend/app/services/retention_preview.py:254 — backend/app/services/retention_preview.py changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in retention_preview.build_retention_preview at line 254. 3 of those changes were fix/bug commits, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 11:39:46 -08:00' --until='2026-11-10 11:39:46 -08:00' --full-history --no-merges -- backend/app/services/retention_preview.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: backend/app/core/pagerduty_client.py backend/app/core/pagerduty_client.py:457 — backend/app/core/pagerduty_client.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in PagerDutyAPIClient.get_analytics_incidents at line 457. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 11:39:46 -08:00' --until='2026-11-10 11:39:46 -08:00' --full-history --no-merges -- backend/app/core/pagerduty_client.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: backend/app/services/retention_cleanup.py backend/app/services/retention_cleanup.py:116 — backend/app/services/retention_cleanup.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in retention_cleanup.cleanup_organization_data at line 116. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 11:39:46 -08:00' --until='2026-11-10 11:39:46 -08:00' --full-history --no-merges -- backend/app/services/retention_cleanup.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: backend/app/api/endpoints/rootly.py backend/app/api/endpoints/rootly.py:1637 — backend/app/api/endpoints/rootly.py changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in rootly.get_synced_users at line 1637. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 11:39:46 -08:00' --until='2026-11-10 11:39:46 -08:00' --full-history --no-merges -- backend/app/api/endpoints/rootly.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: frontend/src/components/dashboard/MemberDetailModal.tsx frontend/src/components/dashboard/MemberDetailModal.tsx:288 — frontend/src/components/dashboard/MemberDetailModal.tsx changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in MemberDetailModal.MemberDetailModal at line 288. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 11:39:46 -08:00' --until='2026-11-10 11:39:46 -08:00' --full-history --no-merges -- frontend/src/components/dashboard/MemberDetailModal.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: frontend/src/components/integrations/github-integration-card.tsx frontend/src/components/integrations/github-integration-card.tsx:57 — frontend/src/components/integrations/github-integration-card.tsx changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in github-integration-card.GitHubIntegrationCard at line 57. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 11:39:46 -08:00' --until='2026-11-10 11:39:46 -08:00' --full-history --no-merges -- frontend/src/components/integrations/github-integration-card.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: backend/app/api/endpoints/analysis.py backend/app/api/endpoints/analysis.py:326 — backend/app/api/endpoints/analysis.py changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in analysis._run_analysis_task_impl at line 326. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 11:39:46 -08:00' --until='2026-11-10 11:39:46 -08:00' --full-history --no-merges -- backend/app/api/endpoints/analysis.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: frontend/src/components/landing-page.tsx frontend/src/components/landing-page.tsx:86 — frontend/src/components/landing-page.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in landing-page.LandingPage at line 86. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 11:39:46 -08:00' --until='2026-11-10 11:39:46 -08:00' --full-history --no-merges -- frontend/src/components/landing-page.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: frontend/src/components/dashboard/charts/GitHubCommitsTimeline.tsx frontend/src/components/dashboard/charts/GitHubCommitsTimeline.tsx:15 — frontend/src/components/dashboard/charts/GitHubCommitsTimeline.tsx changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in GitHubCommitsTimeline.GitHubCommitsTimeline at line 15. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 11:39:46 -08:00' --until='2026-11-10 11:39:46 -08:00' --full-history --no-merges -- frontend/src/components/dashboard/charts/GitHubCommitsTimeline.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: backend/app/services/weekly_digest_service.py backend/app/services/weekly_digest_service.py:902 — backend/app/services/weekly_digest_service.py changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in weekly_digest_service.check_and_send_weekly_digests at line 902. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 11:39:46 -08:00' --until='2026-11-10 11:39:46 -08:00' --full-history --no-merges -- backend/app/services/weekly_digest_service.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: backend/app/api/endpoints/admin.py backend/app/api/endpoints/admin.py:125 — backend/app/api/endpoints/admin.py changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in admin.refresh_demo_analyses at line 125. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 11:39:46 -08:00' --until='2026-11-10 11:39:46 -08:00' --full-history --no-merges -- backend/app/api/endpoints/admin.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D10 · Test Quality · Skipped test · ×16
  • Skipped test: should show login page frontend/e2e/auth.spec.ts:9 — Skipped — switched off by test.skip
  • Skipped test: should validate required fields frontend/e2e/auth.spec.ts:23 — Skipped — switched off by test.skip
  • Skipped test: should not have critical console errors frontend/e2e/integrations.spec.ts:115 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) frontend/e2e/integrations.spec.ts:176 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) frontend/e2e/integrations.spec.ts:191 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) frontend/e2e/integrations.spec.ts:203 — Skipped — switched off by test.skip
  • Skipped test: should connect Rootly integration with valid API key frontend/e2e/integrations.spec.ts:212 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) frontend/e2e/integrations.spec.ts:213 — Skipped — switched off by test.skip
  • Skipped test: should have working navigation frontend/e2e/landing-page.spec.ts:44 — Skipped — switched off by test.skip
  • Skipped test: should display call-to-action buttons frontend/e2e/landing-page.spec.ts:56 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) frontend/e2e/org-management.spec.ts:78 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) frontend/e2e/org-management.spec.ts:96 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) frontend/e2e/org-management.spec.ts:114 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) frontend/e2e/org-management.spec.ts:139 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) frontend/e2e/org-management.spec.ts:161 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) frontend/e2e/org-management.spec.ts:170 — Skipped — switched off by test.skip
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×14
  • Animation without a prefers-reduced-motion guard frontend/src/app/dashboard/page.tsx:538 — <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 frontend/src/app/dashboard/page.tsx:610 — <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 frontend/src/app/dashboard/page.tsx:1195 — <svg> 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 frontend/src/app/dashboard/page.tsx:1250 — <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 frontend/src/app/dashboard/page.tsx:1548 — <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 frontend/src/app/dashboard/page.tsx:1597 — <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 frontend/src/components/dashboard/AnalysisProgressSection.tsx:74 — <div> moves — its `animate-bounce` 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 frontend/src/components/dashboard/AnalysisProgressSection.tsx:75 — <div> moves — its `animate-bounce` 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 frontend/src/components/dashboard/AnalysisProgressSection.tsx:76 — <div> moves — its `animate-bounce` 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 frontend/src/components/dashboard/HealthTrendsChart.tsx:140 — <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 frontend/src/components/dashboard/ObjectiveDataCard.tsx:357 — <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 frontend/src/components/dashboard/TrendsCard.tsx:31 — <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 frontend/src/components/dashboard/UserObjectiveDataCard.tsx:353 — <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 frontend/src/app/globals.css:277 — `.animate-shake` moves (`animation: shake 0.5s ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×13
  • Swallowed exception (caught, then discarded) backend/migrations/migration_runner.py:76 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) backend/app/services/api_key_service.py:60 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) backend/app/services/unified_burnout_analyzer.py:2245 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) backend/app/services/unified_burnout_analyzer.py:2254 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) backend/app/services/unified_burnout_analyzer.py:2905 — `except` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) backend/app/services/unified_burnout_analyzer.py:5512 — `except` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) backend/app/services/unified_burnout_analyzer.py:5863 — `except` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) backend/app/services/unified_burnout_analyzer.py:6157 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) backend/app/services/unified_burnout_analyzer.py:6205 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) backend/app/services/unified_burnout_analyzer.py:6221 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) backend/app/services/unified_burnout_analyzer.py:6249 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) backend/app/services/weekly_digest_service.py:43 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) backend/app/services/weekly_digest_service.py:89 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
AXH1 · Runtime security headers · Runtime security header not set · ×11
  • Runtime security header not set: content-security-policy — The live app's responses did not include content-security-policy (restricts the sources a page may load — mitigates XSS/injection). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
  • Runtime security header not set: cross-origin-embedder-policy — The live app's responses did not include cross-origin-embedder-policy (recommended by the OWASP Secure Headers Project (value: require-corp)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
  • Runtime security header not set: cross-origin-opener-policy — The live app's responses did not include cross-origin-opener-policy (recommended by the OWASP Secure Headers Project (value: same-origin)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
  • Runtime security header not set: cross-origin-resource-policy — The live app's responses did not include cross-origin-resource-policy (recommended by the OWASP Secure Headers Project (value: same-origin)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
  • Runtime security header not set: permissions-policy — The live app's responses did not include permissions-policy (restricts powerful browser features (camera, geolocation, …)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
  • Runtime security header not set: referrer-policy — The live app's responses did not include referrer-policy (limits referrer leakage to third parties). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
  • Runtime security header not set: strict-transport-security — The live app's responses did not include strict-transport-security (forces HTTPS on subsequent requests — mitigates downgrade/MITM). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
  • Runtime security header not set: x-content-type-options — The live app's responses did not include x-content-type-options (stops MIME-sniffing (expects 'nosniff')). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
  • Runtime security header not set: x-dns-prefetch-control — The live app's responses did not include x-dns-prefetch-control (recommended by the OWASP Secure Headers Project (value: off)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
  • Runtime security header not set: x-frame-options — The live app's responses did not include x-frame-options (blocks clickjacking via framing (or use CSP frame-ancestors)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
  • Runtime security header not set: x-permitted-cross-domain-policies — The live app's responses did not include x-permitted-cross-domain-policies (recommended by the OWASP Secure Headers Project (value: none)). Observed by booting the app in-sandbox — advisory evidence for AppSec / CRA / NIS2 runtime secure-defaults. Set it at your reverse proxy or in the app.
D17 · Explicit Debt · TodoComment · ×8
  • TodoComment frontend/src/components/landing-page.tsx:84 — // TODO: set the meta title and description - what's the right way of doing it? — 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 frontend/e2e/auth.spec.ts:10 — // TODO: Enable this test once login UI is implemented — 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 frontend/e2e/auth.spec.ts:24 — // TODO: Enable this test once login validation is implemented — 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 frontend/e2e/landing-page.spec.ts:45 — // TODO: Enable this test once navigation is implemented — 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 frontend/e2e/landing-page.spec.ts:57 — // TODO: Enable this test and customize selectors for your CTA buttons — 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:753 — # TODO: Re-enable organization_id filtering after multi-tenant migration is stable — 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 backend/app/api/endpoints/manual_mappings.py:330 — # TODO: Implement actual validation against GitHub/Slack APIs — 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 backend/app/api/endpoints/manual_mappings.py:624 — # TODO: Add PagerDuty support — 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.
D31 · IaC & Container Security · Medium IaC · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · ClassTooLong · ×6
  • ClassTooLong: useDashboard frontend/src/hooks/useDashboard.ts:1 — ClassTooLong — 1852 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 400 significant lines; this is 1452 over it, 4.63× 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: SlackSurveyTabs frontend/src/components/SlackSurveyTabs.tsx:1 — ClassTooLong — 835 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 435 over it, 2.09× 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: OrganizationManagementDialog frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:1 — ClassTooLong — 621 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 221 over it, 1.55× 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: UserMappingDrawer frontend/src/app/management/components/UserMappingDrawer.tsx:1 — ClassTooLong — 438 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 38 over it, 1.10× 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: TeamMembersList frontend/src/components/dashboard/TeamMembersList.tsx:1 — ClassTooLong — 428 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods. The bar is 400 significant lines; this is 28 over it, 1.07× 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: AIInsightsCard frontend/src/app/integrations/components/AIInsightsCard.tsx:1 — ClassTooLong — 422 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 22 over it, 1.06× 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.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×6
  • Duplicated block (12 lines × 2) backend/app/agents/tools/workload_analyzer.py:158 — backend/app/agents/tools/workload_analyzer.py:158-169 | backend/app/agents/tools/workload_analyzer.py:180-191 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) backend/app/api/endpoints/linear.py:756 — backend/app/api/endpoints/linear.py:756-767 | backend/app/api/endpoints/linear.py:879-890 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) backend/app/services/enhanced_github_matcher.py:386 — backend/app/services/enhanced_github_matcher.py:386-397 | backend/app/services/enhanced_github_matcher.py:644-655 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) backend/app/services/integration_validator.py:593 — backend/app/services/integration_validator.py:593-604 | backend/app/services/integration_validator.py:780-791 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/services/integration_validator.py:593` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `integration` to `LinearIntegration` in one and `JiraIntegration` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (12 lines × 2) backend/app/services/unified_burnout_analyzer.py:5197 — backend/app/services/unified_burnout_analyzer.py:5197-5208 | backend/app/services/unified_burnout_analyzer.py:5612-5623 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) backend/mock_data_helpers/load_demo_analyses.py:31 — backend/mock_data_helpers/load_demo_analyses.py:31-42 | backend/mock_data_helpers/manage_demo_analyses.py:91-102 — before extracting anything, compare `backend/mock_data_helpers/load_demo_analyses.py` and `backend/mock_data_helpers/manage_demo_analyses.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
AC2 · Forms & labels · <Select> field component without a label · ×5
  • <Select> field component without a label frontend/src/app/dashboard/page.tsx:1556 — This select is named only by the placeholder of its value part. Nothing is typed into a select, so the placeholder does not vanish on input: it is shown as the trigger's text until a value is chosen, and then the chosen value replaces it — so at no point does the control state what the choice is for, and the trigger's role (combobox) takes its name from the author, not from that text. Name it: an aria-label on the trigger, or an id on the trigger with a <label htmlFor> pointing at it.
  • <Select> field component without a label frontend/src/app/dashboard/page.tsx:1884 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. 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 frontend/src/app/dashboard/page.tsx:2025 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. 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 frontend/src/app/integrations/dialogs/NewMappingDialog.tsx:48 — This select is named only by the placeholder of its value part. Nothing is typed into a select, so the placeholder does not vanish on input: it is shown as the trigger's text until a value is chosen, and then the chosen value replaces it — so at no point does the control state what the choice is for, and the trigger's role (combobox) takes its name from the author, not from that text. Name it: an aria-label on the trigger, or an id on the trigger with a <label htmlFor> pointing at it.
  • <Select> field component without a label frontend/src/app/integrations/dialogs/NewMappingDialog.tsx:65 — This select is named only by the placeholder of its value part. Nothing is typed into a select, so the placeholder does not vanish on input: it is shown as the trigger's text until a value is chosen, and then the chosen value replaces it — so at no point does the control state what the choice is for, and the trigger's role (combobox) takes its name from the author, not from that text. Name it: an aria-label on the trigger, or an id on the trigger with a <label htmlFor> pointing at it.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×5
  • Duplicated block (14 lines × 2) REDACTED:1126 — REDACTED:1126-1139 | backend/app/api/endpoints/linear.py:1348-1361 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (14 lines × 2) backend/app/api/endpoints/manual_mappings.py:901 — backend/app/api/endpoints/manual_mappings.py:901-914 | backend/app/api/endpoints/manual_mappings.py:1149-1162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) backend/app/services/integration_validator.py:270 — backend/app/services/integration_validator.py:270-283 | backend/app/services/integration_validator.py:345-358 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) backend/app/services/integration_validator.py:551 — backend/app/services/integration_validator.py:551-565 | backend/app/services/integration_validator.py:739-752 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `integration` to `LinearIntegration` in one and `JiraIntegration` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (14 lines × 2) backend/app/services/unified_burnout_analyzer.py:2531 — backend/app/services/unified_burnout_analyzer.py:2531-2544 | backend/app/services/unified_burnout_analyzer.py:2670-2683 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×5
  • Duplicated block (13 lines × 2) backend/app/api/endpoints/linear.py:1281 — backend/app/api/endpoints/linear.py:1281-1293 | backend/app/api/endpoints/linear.py:1525-1537 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) backend/app/api/endpoints/rootly.py:2349 — backend/app/api/endpoints/rootly.py:2349-2363 | backend/app/api/endpoints/rootly.py:2462-2474 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/api/endpoints/rootly.py:2349` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) backend/app/auth/oauth.py:81 — backend/app/auth/oauth.py:81-93 | backend/app/auth/oauth.py:264-276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/auth/oauth.py:81` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (13 lines × 2) backend/app/core/rootly_client.py:1143 — backend/app/core/rootly_client.py:1143-1155 | backend/app/core/rootly_client.py:1157-1169 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) backend/app/services/demo_analysis_service.py:143 — backend/app/services/demo_analysis_service.py:143-162 | backend/mock_data_helpers/load_demo_analyses.py:122-134 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `Analysis` names `..models.analysis` in one and `app.models.analysis` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×5
  • Duplicated block (11 lines × 2) REDACTED:2233 — REDACTED:2233-2243 | REDACTED:2435-2445 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) REDACTED:1581 — REDACTED:1581-1591 | REDACTED:1708-1718 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) backend/app/auth/integration_oauth.py:650 — backend/app/auth/integration_oauth.py:650-660 | backend/app/auth/integration_oauth.py:670-680 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (11 lines × 2) backend/app/services/integration_validator.py:538 — backend/app/services/integration_validator.py:538-548 | backend/app/services/integration_validator.py:845-855 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (11 lines × 2) backend/app/core/distributed_lock.py:22 — backend/app/core/distributed_lock.py:22-32 | backend/app/services/token_refresh_coordinator.py:25-35 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×5
  • Duplicated block (8 lines × 2) REDACTED:910 — REDACTED:910-917 | backend/app/services/user_sync_service.py:1258-1265 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:919` calls `debug` and `backend/app/services/user_sync_service.py:1267` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) backend/app/services/github_collector.py:1084 — backend/app/services/github_collector.py:1084-1091 | backend/app/services/slack_collector.py:883-890 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) backend/app/services/organization_auto_assignment.py:147 — backend/app/services/organization_auto_assignment.py:147-154 | backend/app/services/organization_auto_assignment.py:159-166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) backend/app/services/unified_burnout_analyzer.py:1962 — backend/app/services/unified_burnout_analyzer.py:1962-1969 | backend/app/services/unified_burnout_analyzer.py:1982-1989 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) backend/app/services/enhanced_jira_matcher.py:182 — backend/app/services/enhanced_jira_matcher.py:182-189 | backend/app/services/enhanced_linear_matcher.py:182-189 — before extracting anything, compare `backend/app/services/enhanced_jira_matcher.py` and `backend/app/services/enhanced_linear_matcher.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
AXI1 · Runtime container hardening · Container process runs as root · ×4
  • Container process runs as root: .-backend-1 — '.-backend-1' (.-backend) runs as uid 0 — no user was specified, or one resolving to root was. Observed on the running container, which is the only place the answer is settled: an image's own USER, a base image's inherited one and a compose override are all invisible to a REDACTED reader. Advisory evidence for CRA Annex I (2)(b).
  • Container process runs as root: .-frontend-1 — '.-frontend-1' (.-frontend) runs as uid 0 — no user was specified, or one resolving to root was. Observed on the running container, which is the only place the answer is settled: an image's own USER, a base image's inherited one and a compose override are all invisible to a REDACTED reader. Advisory evidence for CRA Annex I (2)(b).
  • Container process runs as root: .-postgres-1 — '.-postgres-1' (postgres:15) runs as uid 0 — no user was specified, or one resolving to root was. Observed on the running container, which is the only place the answer is settled: an image's own USER, a base image's inherited one and a compose override are all invisible to a REDACTED reader. Advisory evidence for CRA Annex I (2)(b).
  • Container process runs as root: .-redis-1 — '.-redis-1' (redis:7-alpine) runs as uid 0 — no user was specified, or one resolving to root was. Observed on the running container, which is the only place the answer is settled: an image's own USER, a base image's inherited one and a compose override are all invisible to a REDACTED reader. Advisory evidence for CRA Annex I (2)(b).
D35 · Change Coupling · Change coupling · ×4
  • Change coupling: github_only_burnout_analyzer.py ↔ unified_burnout_analyzer.py backend/app/services/github_only_burnout_analyzer.py:1 — `backend/app/services/github_only_burnout_analyzer.py` and `backend/app/services/unified_burnout_analyzer.py` change together 84% of the time (16 of the 19 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 16 shared commits counted here, the most recent 3 are `c471bc7c` refactor: drop unused scoring payload fields; `8ce77fde` refactor: drop unused scoring payload fields; `8f609d46` Update methodology references across codebase — run `git show` on any of them.
  • Change coupling: PagerDutyIntegrationForm.tsx ↔ RootlyIntegrationForm.tsx frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx:1 — `frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx` and `frontend/src/app/integrations/components/RootlyIntegrationForm.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 `22b3dcc0` Add remaining integration and management updates; `e3372d9a` resolve SQL injection, info exposure, and race conditions in integr…; `a183e58a` strip white space before and after key when pasting, better user expi… — run `git show` on any of them.
  • Change coupling: pagerduty.py ↔ rootly.py backend/app/api/endpoints/pagerduty.py:1 — `backend/app/api/endpoints/pagerduty.py` and `backend/app/api/endpoints/rootly.py` change together 61% of the time (11 of the 18 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 11 shared commits counted here, the most recent 3 are `e3372d9a` resolve SQL injection, info exposure, and race conditions in integr…; `d4fb97d8` reduced reduntant api calls when saving integration, instead did all …; `0c3556eb` Add 60-second caching for integration permission checks — run `git show` on any of them.
  • Change coupling: HealthTrendsChart.tsx ↔ MemberDetailModal.tsx frontend/src/components/dashboard/HealthTrendsChart.tsx:1 — `frontend/src/components/dashboard/HealthTrendsChart.tsx` and `frontend/src/components/dashboard/MemberDetailModal.tsx` 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 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 5 shared commits counted here, the most recent 3 are `590f0e76` Code simplification and README update; `ea2c0f21` Moving away from burnout to risk of overwork wording; `14034c38` replaced CBI references with On-Call Burnout (OCB) in frontend, codeb… — run `git show` on any of them.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (5 members, 50+ identical tokens) backend/app/api/endpoints/linear.py:1189 — backend/app/api/endpoints/linear.py:1189-1220 | backend/app/services/integration_validator.py:538-548 | backend/app/services/integration_validator.py:845-855 | backend/app/services/token_manager.py:144-200 | backend/app/services/token_manager.py:205-297 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) backend/app/api/endpoints/rootly.py:2152 — backend/app/api/endpoints/rootly.py:2152-2301 | backend/app/api/endpoints/rootly.py:2312-2412 | backend/app/api/endpoints/rootly.py:2423-2524 | backend/app/api/endpoints/rootly.py:2534-2650 | backend/app/api/endpoints/rootly.py:2660-2722 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) backend/app/auth/integration_oauth.py:41 — backend/app/auth/integration_oauth.py:41-59 | backend/app/auth/integration_oauth.py:187-213 | backend/app/auth/integration_oauth.py:637-660 | backend/app/auth/integration_oauth.py:663-680 | backend/app/auth/oauth.py:126-144 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) backend/app/services/jira_user_sync_service.py:178 — backend/app/services/jira_user_sync_service.py:178-301 | backend/app/services/user_sync_service.py:1015-1144 | backend/app/services/user_sync_service.py:1196-1362 | backend/app/services/user_sync_service.py:1365-1493 | backend/app/services/user_sync_service.py:1496-1658 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×4
  • Duplicated block (17 lines × 2) REDACTED:2170 — REDACTED:2170-2186 | REDACTED:2315-2332 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) backend/app/api/endpoints/invitations.py:385 — backend/app/api/endpoints/invitations.py:385-401 | backend/app/api/endpoints/invitations.py:543-559 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) REDACTED:204 — REDACTED:204-220 | backend/app/api/endpoints/linear.py:249-265 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:204` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `backend/app/api/endpoints/linear.py:248` calls `join` and `REDACTED:203` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 2) backend/mock_data_helpers/load_demo_analyses.py:94 — backend/mock_data_helpers/load_demo_analyses.py:94-110 | backend/mock_data_helpers/manage_demo_analyses.py:238-254 — before extracting anything, compare `backend/mock_data_helpers/load_demo_analyses.py` and `backend/mock_data_helpers/manage_demo_analyses.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×4
  • Duplicated block (16 lines × 2) backend/app/api/endpoints/linear.py:243 — backend/app/api/endpoints/linear.py:243-258 | backend/app/api/endpoints/linear.py:605-620 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/api/endpoints/linear.py:243` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `db` to `Session` in one and `Session = Depends(get_db)` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (16 lines × 2) backend/app/services/integration_validator.py:608 — backend/app/services/integration_validator.py:608-623 | backend/app/services/integration_validator.py:795-810 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/services/integration_validator.py:608` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) backend/app/services/unified_burnout_analyzer.py:3622 — backend/app/services/unified_burnout_analyzer.py:3622-3637 | backend/app/services/unified_burnout_analyzer.py:3656-3671 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) backend/app/auth/integration_oauth.py:62 — backend/app/auth/integration_oauth.py:62-77 | backend/app/auth/oauth.py:147-162 — before extracting anything, compare `backend/app/auth/integration_oauth.py` and `backend/app/auth/oauth.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×4
  • Duplicated block (14 lines × 3) backend/app/api/endpoints/invitations.py:286 — backend/app/api/endpoints/invitations.py:286-300 | backend/app/api/endpoints/invitations.py:381-394 | backend/app/api/endpoints/invitations.py:539-552 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (14 lines × 3) backend/app/api/endpoints/linear.py:1248 — backend/app/api/endpoints/linear.py:1248-1261 | backend/app/api/endpoints/manual_mappings.py:1115-1128 | backend/app/services/user_sync_service.py:1535-1548 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 3) backend/app/services/demo_analysis_service.py:273 — backend/app/services/demo_analysis_service.py:273-286 | backend/mock_data_helpers/load_demo_analyses.py:95-108 | backend/mock_data_helpers/manage_demo_analyses.py:239-252 — before extracting anything, compare `backend/mock_data_helpers/load_demo_analyses.py` and `backend/mock_data_helpers/manage_demo_analyses.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/services/demo_analysis_service.py:273` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 3) backend/app/services/unified_burnout_analyzer.py:3614 — backend/app/services/unified_burnout_analyzer.py:3614-3627 | backend/app/services/unified_burnout_analyzer.py:3639-3652 | backend/app/services/unified_burnout_analyzer.py:3673-3686 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
X1 · Async correctness · Task from `asyncio.create_task` is not kept · ×4
  • Task from `asyncio.create_task` is not kept backend/app/services/auto_refresh_scheduler.py:392 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept REDACTED:512 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept backend/app/api/endpoints/linear.py:731 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
  • Task from `asyncio.create_task` is not kept backend/app/api/endpoints/rootly.py:529 — The task this creates is not kept anywhere. The event loop holds only a weak reference to its tasks, so a task nobody references can be garbage-collected before it finishes (Python's documentation for `asyncio.create_task`: save a reference to the result); and nothing ever awaits it, so an exception it raises is never handled — it surfaces, if at all, as "Task exception was never retrieved" in a log. Keep the task: `await` it, gather it, start it in an `asyncio.TaskGroup` (`async with asyncio.TaskGroup() as tg: tg.create_task(…)`), or, for genuine fire-and-forget, add it to a set and `task.add_done_callback(tasks.discard)` with a callback that also reads its exception.
AC3 · Page structure · Data table has no header cells · ×3
  • Data table has no header cells backend/digest_preview.html:18 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells backend/digest_preview.html:39 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
  • Data table has no header cells backend/digest_preview.html:60 — A <table> with data cells but no <th> gives assistive technology no way to associate cells with their headers. Mark the header row/column cells as <th> (with a scope).
AC6 · Visual & motion safety · Low contrast Tailwind colour pair (4.3 · ×3
  • Low contrast Tailwind colour pair (4.3:1) frontend/src/app/dashboard/page.tsx:1552 — This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
  • Low contrast Tailwind colour pair (4.3:1) frontend/src/components/ManualSurveyDeliveryModal.tsx:279 — This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
  • Low contrast Tailwind colour pair (4.3:1) frontend/src/components/dashboard/SurveyResultsCard.tsx:282 — This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
AC6 · Visual & motion safety · Low contrast Tailwind colour pair (3.8 · ×3
  • Low contrast Tailwind colour pair (3.8:1) frontend/src/app/integrations/components/UnifiedSlackCard.tsx:388 — This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
  • Low contrast Tailwind colour pair (3.8:1) frontend/src/app/integrations/dialogs/JiraWorkspaceSelector.tsx:176 — This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
  • Low contrast Tailwind colour pair (3.8:1) frontend/src/app/unsubscribe/page.tsx:195 — This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
AXO1 · Runtime API surface · API operation answered with no credentials · ×3
  • API operation answered with no credentials: GET / — http://127.0.0.1:8000/ returned HTTP 200 to two GET requests carrying nothing. Observed on the live app. We do not decide whether this operation is meant to be public. Advisory evidence for CRA Annex I (2)(d) and NIS2 IR.4.1.
  • API operation answered with no credentials: GET /health — http://127.0.0.1:8000/health returned HTTP 200 to two GET requests carrying nothing. Observed on the live app. We do not decide whether this operation is meant to be public. Advisory evidence for CRA Annex I (2)(d) and NIS2 IR.4.1.
  • API operation answered with no credentials: GET /integrations/slack/test-endpoint — http://127.0.0.1:8000/integrations/slack/test-endpoint returned HTTP 200 to two GET requests carrying nothing. Observed on the live app. We do not decide whether this operation is meant to be public. Advisory evidence for CRA Annex I (2)(d) and NIS2 IR.4.1.
D2 · Cognitive Complexity · mapping-drawer.MappingDrawer · ×3
  • mapping-drawer.MappingDrawer::runAutoMapping (cognitive 26) frontend/src/components/mapping-drawer.tsx:330 — mapping-drawer.MappingDrawer::runAutoMapping has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 5 (10 pts), boolean chains 3, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (mapping-drawer.MappingDrawer, mapping-drawer.MappingDrawer::removeMapping, mapping-drawer.MappingDrawer::saveInlineMapping) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • mapping-drawer.MappingDrawer::removeMapping (cognitive 17) frontend/src/components/mapping-drawer.tsx:467 — mapping-drawer.MappingDrawer::removeMapping has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: 3 other methods here (mapping-drawer.MappingDrawer, mapping-drawer.MappingDrawer::runAutoMapping, mapping-drawer.MappingDrawer::saveInlineMapping) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • mapping-drawer.MappingDrawer::saveInlineMapping (cognitive 17) frontend/src/components/mapping-drawer.tsx:540 — mapping-drawer.MappingDrawer::saveInlineMapping has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, boolean chains 5, ternaries 2 (4 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: 3 other methods here (mapping-drawer.MappingDrawer, mapping-drawer.MappingDrawer::runAutoMapping, mapping-drawer.MappingDrawer::removeMapping) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (4 members, 50+ identical tokens) backend/app/api/endpoints/rootly.py:1054 — backend/app/api/endpoints/rootly.py:1054-1293 | backend/app/api/endpoints/rootly.py:1552-1633 | backend/app/api/endpoints/rootly.py:1977-2078 | backend/app/api/endpoints/rootly.py:2087-2142 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) backend/app/services/enhanced_jira_matcher.py:35 — backend/app/services/enhanced_jira_matcher.py:35-113 | backend/app/services/enhanced_jira_matcher.py:121-170 | backend/app/services/enhanced_linear_matcher.py:35-113 | backend/app/services/enhanced_linear_matcher.py:121-170 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) backend/app/services/integration_validator.py:551 — backend/app/services/integration_validator.py:551-572 | backend/app/services/integration_validator.py:575-623 | backend/app/services/integration_validator.py:739-759 | backend/app/services/integration_validator.py:762-810 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×3
  • Duplicated block (43 lines × 2) REDACTED:700 — REDACTED:700-742 | REDACTED:765-807 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:700` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:699` calls `isnot` and `REDACTED:764` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (43 lines × 2) REDACTED:238 — REDACTED:238-280 | REDACTED:368-410 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (43 lines × 2) backend/app/core/rootly_client.py:1192 — backend/app/core/rootly_client.py:1192-1234 | backend/app/core/rootly_client.py:1236-1278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×3
  • Duplicated block (21 lines × 2) REDACTED:1279 — REDACTED:1279-1299 | REDACTED:1439-1459 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1279` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) REDACTED:3058 — REDACTED:3058-3078 | backend/app/services/unified_burnout_analyzer.py:6062-6082 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (21 lines × 2) REDACTED:1181 — REDACTED:1181-1201 | backend/app/services/unified_burnout_analyzer.py:608-628 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1181` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×3
  • Duplicated block (19 lines × 2) backend/app/api/endpoints/analysis.py:431 — backend/app/api/endpoints/analysis.py:431-449 | backend/app/api/endpoints/analysis.py:636-654 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) backend/app/services/jira_mapping_service.py:190 — backend/app/services/jira_mapping_service.py:190-208 | backend/app/services/linear_mapping_service.py:190-208 — before extracting anything, compare `backend/app/services/jira_mapping_service.py` and `backend/app/services/linear_mapping_service.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (19 lines × 2) backend/app/services/user_sync_service.py:1475 — backend/app/services/user_sync_service.py:1475-1493 | backend/app/services/user_sync_service.py:1640-1658 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/services/user_sync_service.py:1475` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×3
  • Duplicated block (18 lines × 2) backend/app/api/endpoints/analysis.py:451 — backend/app/api/endpoints/analysis.py:451-468 | backend/app/api/endpoints/analysis.py:658-675 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) backend/app/services/manual_mapping_service.py:213 — backend/app/services/manual_mapping_service.py:213-230 | backend/app/services/manual_mapping_service.py:259-276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/services/manual_mapping_service.py:213` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) backend/app/services/unified_burnout_analyzer.py:4356 — backend/app/services/unified_burnout_analyzer.py:4356-4373 | backend/app/services/unified_burnout_analyzer.py:4443-4460 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `backend/app/services/unified_burnout_analyzer.py:4376` calls `_get_severity_level` and `backend/app/services/unified_burnout_analyzer.py:4463` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×3
  • Duplicated block (12 lines × 3) backend/app/api/endpoints/github.py:413 — backend/app/api/endpoints/github.py:413-424 | REDACTED:545-556 | backend/app/api/endpoints/linear.py:375-386 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Note first that the copies are not typed on the same thing: `IntegrationValidator` names `...services.integration_validator` in one and `app.services.integration_validator` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (12 lines × 3) REDACTED:1177 — REDACTED:1177-1188 | backend/app/services/unified_burnout_analyzer.py:604-615 | backend/app/services/unified_burnout_analyzer.py:5223-5234 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1177` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) backend/app/services/github_mapping_service.py:89 — backend/app/services/github_mapping_service.py:89-100 | backend/app/services/jira_mapping_service.py:85-97 | backend/app/services/linear_mapping_service.py:85-97 — before extracting anything, compare `backend/app/services/jira_mapping_service.py` and `backend/app/services/linear_mapping_service.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/services/github_mapping_service.py:89` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×3
  • Duplicated block (10 lines × 2) backend/app/api/endpoints/rootly.py:931 — backend/app/api/endpoints/rootly.py:931-940 | backend/app/services/unified_burnout_analyzer.py:2401-2410 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) backend/app/services/enhanced_slack_collector.py:92 — backend/app/services/enhanced_slack_collector.py:92-101 | backend/app/services/enhanced_slack_collector.py:116-125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/services/enhanced_slack_collector.py:92` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) backend/app/services/jira_mapping_service.py:109 — backend/app/services/jira_mapping_service.py:109-118 | backend/app/services/linear_mapping_service.py:109-118 — before extracting anything, compare `backend/app/services/jira_mapping_service.py` and `backend/app/services/linear_mapping_service.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×3
  • Duplicated block (7 lines × 2) REDACTED:2676 — REDACTED:2676-2682 | REDACTED:2916-2923 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) backend/app/core/rootly_client.py:1231 — backend/app/core/rootly_client.py:1231-1237 | backend/app/core/rootly_client.py:1275-1281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) backend/app/models/jira_integration.py:70 — backend/app/models/jira_integration.py:70-76 | backend/app/models/linear_integration.py:77-83 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
AC3 · Page structure · Heading level jumps from h1 to h3 · ×2
  • Heading level jumps from h1 to h3 frontend/src/app/dashboard/api-keys/page.tsx:106 — 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 frontend/src/app/management/page.tsx:1292 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC3 · Page structure · Heading level jumps from h2 to h4 · ×2
  • Heading level jumps from h2 to h4 frontend/src/app/methodology/page.tsx:324 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h2 to h4 frontend/src/app/methodology/page.tsx:521 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC6 · Visual & motion safety · Low contrast Tailwind colour pair (2.6 · ×2
  • Low contrast Tailwind colour pair (2.6:1) frontend/src/components/dashboard/AlertsCountCard.tsx:444 — This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
  • Low contrast Tailwind colour pair (2.6:1) frontend/src/components/dashboard/UserAlertsCard.tsx:434 — This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
D1 · Cyclomatic Complexity · TeamMembersList.TeamMembersList · ×2
  • TeamMembersList.TeamMembersList::handleMemberClick (cyclomatic 20) frontend/src/components/dashboard/TeamMembersList.tsx:286 — TeamMembersList.TeamMembersList::handleMemberClick has cyclomatic complexity 20 (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. This shape REPEATS in the file: one other method here (TeamMembersList.TeamMembersList::renderMemberRow) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • TeamMembersList.TeamMembersList::renderMemberRow (cyclomatic 17) frontend/src/components/dashboard/TeamMembersList.tsx:313 — TeamMembersList.TeamMembersList::renderMemberRow has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (TeamMembersList.TeamMembersList::handleMemberClick) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · page.IntegrationsPage · ×2
  • page.IntegrationsPage::loadAllIntegrationsAPIBackground (cyclomatic 19) REDACTED:1470 — page.IntegrationsPage::loadAllIntegrationsAPIBackground has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (page.IntegrationsPage, page.IntegrationsPage::loadFromCacheSync) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • page.IntegrationsPage::loadFromCacheSync (cyclomatic 16) REDACTED:1371 — page.IntegrationsPage::loadFromCacheSync has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (page.IntegrationsPage, page.IntegrationsPage::loadAllIntegrationsAPIBackground) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · page.TeamPageContent · ×2
  • page.TeamPageContent::getUserIntegrations (cyclomatic 18) frontend/src/app/management/page.tsx:1009 — page.TeamPageContent::getUserIntegrations has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (page.TeamPageContent, page.TeamPageContent::parseSyncErrorMessage) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • page.TeamPageContent::parseSyncErrorMessage (cyclomatic 17) frontend/src/app/management/page.tsx:179 — page.TeamPageContent::parseSyncErrorMessage has cyclomatic complexity 17 (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. This shape REPEATS in the file: 2 other methods here (page.TeamPageContent, page.TeamPageContent::getUserIntegrations) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · page.TeamPageContent · ×2
  • page.TeamPageContent::getUserIntegrations (cognitive 20) frontend/src/app/management/page.tsx:1009 — page.TeamPageContent::getUserIntegrations has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 9 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (page.TeamPageContent, page.TeamPageContent::parseSyncErrorMessage) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • page.TeamPageContent::parseSyncErrorMessage (cognitive 16) frontend/src/app/management/page.tsx:179 — page.TeamPageContent::parseSyncErrorMessage has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (6 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (page.TeamPageContent, page.TeamPageContent::getUserIntegrations) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D3 · God Classes · TooManyMethods · ×2
  • TooManyMethods: UnifiedBurnoutAnalyzer backend/app/services/unified_burnout_analyzer.py:75 — TooManyMethods — 58 methods. The bar is 30 methods; this is 28 over it, 1.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AIBurnoutAnalyzerService backend/app/services/ai_burnout_analyzer.py:28 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× 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.
D32 · Data Compliance (PII/GDPR) · REDACTED
  • REDACTED
  • REDACTED
D32 · Data Compliance (PII/GDPR) · REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×2
  • Edited copy of a member (20 corresponding lines) backend/app/agents/tools/workload_analyzer.py:158 — backend/app/agents/tools/workload_analyzer.py:158-177 | backend/app/agents/tools/workload_analyzer.py:180-199 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) backend/app/services/integration_validator.py:511 — backend/app/services/integration_validator.py:511-530 | backend/app/services/token_manager.py:339-368 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×2
  • Edited copy of a member (15 corresponding lines) backend/app/utils/visual_logger.py:115 — backend/app/utils/visual_logger.py:115-131 | backend/app/utils/visual_logger.py:158-172 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) backend/app/services/manual_mapping_service.py:532 — backend/app/services/manual_mapping_service.py:532-546 | backend/app/services/manual_mapping_service.py:592-607 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×2
  • Edited copy of a member (13 corresponding lines) backend/app/api/endpoints/manual_mappings.py:218 — backend/app/api/endpoints/manual_mappings.py:218-230 | backend/app/api/endpoints/manual_mappings.py:238-250 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) backend/app/services/notification_service.py:362 — backend/app/services/notification_service.py:362-374 | backend/app/services/notification_service.py:391-403 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×2
  • Edited copy of a member (7 corresponding lines) backend/app/models/jira_integration.py:86 — backend/app/models/jira_integration.py:86-92 | backend/app/models/linear_integration.py:93-102 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) backend/app/services/integration_validator.py:626 — backend/app/services/integration_validator.py:626-632 | backend/app/services/token_manager.py:403-412 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×2
  • Duplicated block (24 lines × 2) backend/app/auth/integration_oauth.py:80 — backend/app/auth/integration_oauth.py:80-103 | backend/app/auth/oauth.py:165-188 — before extracting anything, compare `backend/app/auth/integration_oauth.py` and `backend/app/auth/oauth.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (24 lines × 2) backend/app/core/och_config.py:414 — backend/app/core/och_config.py:414-437 | backend/app/core/och_config.py:448-471 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) backend/app/services/unified_burnout_analyzer.py:3606 — backend/app/services/unified_burnout_analyzer.py:3606-3627 | backend/app/services/unified_burnout_analyzer.py:3631-3652 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 2) backend/app/api/endpoints/github.py:49 — backend/app/api/endpoints/github.py:49-70 | REDACTED:178-199 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (17–21 lines × 2) · ×2
  • Duplicated block (17–21 lines × 2) REDACTED:184 — REDACTED:184-204 | REDACTED:443-459 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17–21 lines × 2) backend/app/services/unified_burnout_analyzer.py:5299 — backend/app/services/unified_burnout_analyzer.py:5299-5319 | backend/app/services/unified_burnout_analyzer.py:5705-5721 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×2
  • Duplicated block (20 lines × 2) REDACTED:173 — REDACTED:173-192 | backend/app/api/endpoints/linear.py:217-236 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:173` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) backend/app/services/ai_usage_collector.py:77 — backend/app/services/ai_usage_collector.py:77-96 | backend/app/services/ai_usage_collector.py:184-203 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19 lines × 3) · ×2
  • Duplicated block (19 lines × 3) backend/app/agents/tools/pattern_analyzer.py:127 — backend/app/agents/tools/pattern_analyzer.py:127-145 | backend/app/agents/tools/pattern_analyzer.py:190-208 | backend/app/agents/tools/pattern_analyzer.py:251-269 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (19 lines × 3) REDACTED:3942 — REDACTED:3942-3960 | REDACTED:3963-3981 | REDACTED:3984-4002 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×2
  • Duplicated block (15 lines × 2) REDACTED:394 — REDACTED:394-408 | backend/app/api/endpoints/linear.py:518-532 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:394` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:411` calls `urlparse`, `rstrip` and `backend/app/api/endpoints/linear.py:533` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 2) backend/app/services/integration_validator.py:575 — backend/app/services/integration_validator.py:575-589 | backend/app/services/integration_validator.py:762-776 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `integration` to `LinearIntegration` in one and `JiraIntegration` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×2
  • Duplicated block (12–13 lines × 2) backend/app/services/unified_burnout_analyzer.py:4377 — backend/app/services/unified_burnout_analyzer.py:4377-4389 | backend/app/services/unified_burnout_analyzer.py:4463-4474 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `backend/app/services/unified_burnout_analyzer.py:4376` calls `_get_severity_level` and `backend/app/services/unified_burnout_analyzer.py:4460` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12–13 lines × 2) backend/mock_data_helpers/assign_analysis_to_user.py:96 — backend/mock_data_helpers/assign_analysis_to_user.py:96-107 | backend/mock_data_helpers/load_demo_analyses.py:219-231 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×2
  • Duplicated block (9–11 lines × 2) backend/app/services/integration_validator.py:560 — backend/app/services/integration_validator.py:560-568 | backend/app/services/integration_validator.py:599-609 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9–11 lines × 2) backend/app/services/integration_validator.py:747 — backend/app/services/integration_validator.py:747-755 | backend/app/services/integration_validator.py:786-796 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×2
  • Duplicated block (9 lines × 3) REDACTED:570 — REDACTED:570-578 | REDACTED:611-619 | REDACTED:650-658 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) backend/app/services/github_mapping_service.py:74 — backend/app/services/github_mapping_service.py:74-82 | backend/app/services/jira_mapping_service.py:71-79 | backend/app/services/linear_mapping_service.py:71-79 — before extracting anything, compare `backend/app/services/jira_mapping_service.py` and `backend/app/services/linear_mapping_service.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×2
  • Duplicated block (9 lines × 2) backend/app/core/pagerduty_client.py:292 — backend/app/core/pagerduty_client.py:292-300 | backend/app/core/pagerduty_client.py:337-345 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/core/pagerduty_client.py:292` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) backend/app/services/unified_burnout_analyzer.py:338 — backend/app/services/unified_burnout_analyzer.py:338-346 | backend/app/services/unified_burnout_analyzer.py:371-379 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `backend/app/services/unified_burnout_analyzer.py:337` calls `get` and `backend/app/services/unified_burnout_analyzer.py:370` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×2
  • Duplicated block (8 lines × 3) backend/app/services/manual_mapping_service.py:329 — backend/app/services/manual_mapping_service.py:329-336 | backend/app/services/manual_mapping_service.py:398-405 | backend/app/services/manual_mapping_service.py:468-475 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/services/manual_mapping_service.py:329` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) backend/app/services/unified_burnout_analyzer.py:3605 — backend/app/services/unified_burnout_analyzer.py:3605-3612 | backend/app/services/unified_burnout_analyzer.py:3630-3637 | backend/app/services/unified_burnout_analyzer.py:3664-3671 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×2
  • Duplicated block (5 lines × 2) backend/app/services/slack_collector.py:352 — backend/app/services/slack_collector.py:352-356 | backend/app/services/slack_collector.py:695-699 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) backend/app/services/slack_collector.py:484 — backend/app/services/slack_collector.py:484-488 | backend/app/services/slack_collector.py:724-728 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `backend/app/services/slack_collector.py:723` calls `info` and `backend/app/services/slack_collector.py:483` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
R10 · Code Duplication · Duplicated block (58 lines × 2 locations) · ×2
  • Duplicated block (58 lines × 2 locations) REDACTED:3624 — REDACTED:3624 · REDACTED:3684 — 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.
  • Duplicated block (58 lines × 2 locations) frontend/src/components/BurnoutFactorsV0.tsx:74 — frontend/src/components/BurnoutFactorsV0.tsx:74 · frontend/src/components/BurnoutFactorsV0.tsx:150 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (48 lines × 2 locations) · ×2
  • Duplicated block (48 lines × 2 locations) frontend/src/app/integrations/components/AnthropicUsageSetupCard.tsx:9 — frontend/src/app/integrations/components/AnthropicUsageSetupCard.tsx:9 · frontend/src/app/integrations/components/OpenAIUsageSetupCard.tsx:9 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
  • Duplicated block (48 lines × 2 locations) frontend/src/app/integrations/components/JiraManualSetupForm.tsx:99 — frontend/src/app/integrations/components/JiraManualSetupForm.tsx:99 · frontend/src/app/integrations/components/LinearManualSetupForm.tsx:93 — 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 (38 lines × 2 locations) · ×2
  • Duplicated block (38 lines × 2 locations) frontend/src/app/integrations/components/GitHubConnectedCard.tsx:109 — frontend/src/app/integrations/components/GitHubConnectedCard.tsx:109 · frontend/src/app/integrations/components/JiraConnectedCard.tsx:62 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
  • Duplicated block (38 lines × 2 locations) frontend/src/hooks/useDashboard.ts:473 — frontend/src/hooks/useDashboard.ts:473 · frontend/src/hooks/useDashboard.ts:1419 — 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 (36 lines × 2 locations) · ×2
  • Duplicated block (36 lines × 2 locations) frontend/src/app/dashboard/page.tsx:178 — frontend/src/app/dashboard/page.tsx:178 · frontend/src/hooks/useDashboard.ts:2769 — the 2 copies are spread across 2 files, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents.
  • Duplicated block (36 lines × 2 locations) REDACTED:4186 — REDACTED:4186 · REDACTED:4286 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×2
  • Untrusted text written into markup unescaped frontend/src/app/layout.tsx:43 — `` window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(argum…` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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.
  • Untrusted text written into markup unescaped frontend/src/components/landing-page.tsx:592 — `siX.svg.replace(/<svg/,'<svg fill="currentColor" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round" str…` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` 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.
AC3 · Page structure · Page without a main landmark · ×1
  • Page without a main landmark backend/digest_preview.html: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 · Low contrast Tailwind colour pair (3.6 · ×1
  • Low contrast Tailwind colour pair (3.6:1) frontend/src/app/dashboard/page.tsx:769 — This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
AC6 · Visual & motion safety · Low contrast Tailwind colour pair (3.1 · ×1
  • Low contrast Tailwind colour pair (3.1:1) frontend/src/components/dashboard/UserAlertsCard.tsx:123 — This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
AXA1 · Runtime unauthenticated reachability · Reached with a session and also without one · ×1
  • Reached with a session and also without one: http://127.0.0.1:3000 — http://127.0.0.1:3000 was found by crawling with the application's own logged-in session, and answered HTTP 200 to two GET requests carrying no credentials. Observed on the live app in our sandbox. We do not decide whether this route is meant to be public — many are. Advisory evidence for CRA Annex I (2)(d) and NIS2 IR.4.1; never scored.
AXP1 · Runtime third-party data flows · Rendered UI contacted third-party host www.googletagmanager.com · ×1
  • Rendered UI contacted third-party host www.googletagmanager.com — known tag-manager — The app tried to load script from www.googletagmanager.com at render time (request blocked in-sandbox; this records the attempt). Observed data flow — advisory evidence for data-protection-by-default (GDPR Art. 25.2). We never assert the host's jurisdiction or processor role; you classify the lawful basis.
D1 · Cyclomatic Complexity · analyses.run_analysis_task (cyclomatic 246) · ×1
  • analyses.run_analysis_task (cyclomatic 246) REDACTED:3241 — analyses.run_analysis_task has cyclomatic complexity 246 (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 · page.DashboardContent (cyclomatic 244) · ×1
  • page.DashboardContent (cyclomatic 244) frontend/src/app/dashboard/page.tsx:133 — page.DashboardContent has cyclomatic complexity 244 (threshold 15). Of this number, 144 points are the body's own statements and 100 belong to 33 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 · RootlyAPIClient.get_alerts_count (cyclomatic 239) · ×1
  • RootlyAPIClient.get_alerts_count (cyclomatic 239) backend/app/core/rootly_client.py:479 — RootlyAPIClient.get_alerts_count has cyclomatic complexity 239 (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 · UnifiedBurnoutAnalyzer.analyze_burnout (cyclomatic 172) · ×1
  • UnifiedBurnoutAnalyzer.analyze_burnout (cyclomatic 172) backend/app/services/unified_burnout_analyzer.py:228 — UnifiedBurnoutAnalyzer.analyze_burnout has cyclomatic complexity 172 (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 · page.IntegrationsPage (cyclomatic 167) · ×1
  • page.IntegrationsPage (cyclomatic 167) REDACTED:179 — page.IntegrationsPage has cyclomatic complexity 167 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (page.IntegrationsPage::loadFromCacheSync, page.IntegrationsPage::loadAllIntegrationsAPIBackground) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · UnifiedBurnoutAnalyzer._generate_daily_trends (cyclomatic 162) · ×1
  • UnifiedBurnoutAnalyzer._generate_daily_trends (cyclomatic 162) backend/app/services/unified_burnout_analyzer.py:4115 — UnifiedBurnoutAnalyzer._generate_daily_trends has cyclomatic complexity 162 (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 · SlackSurveyTabs.SlackSurveyTabs (cyclomatic 117) · ×1
  • SlackSurveyTabs.SlackSurveyTabs (cyclomatic 117) frontend/src/components/SlackSurveyTabs.tsx:43 — SlackSurveyTabs.SlackSurveyTabs has cyclomatic complexity 117 (threshold 15). Of this number, 55 points are the body's own statements and 62 belong to 25 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 · UserAlertsCard.UserAlertsCard (cyclomatic 99) · ×1
  • UserAlertsCard.UserAlertsCard (cyclomatic 99) frontend/src/components/dashboard/UserAlertsCard.tsx:150 — UserAlertsCard.UserAlertsCard has cyclomatic complexity 99 (threshold 15). Of this number, 66 points are the body's own statements and 33 belong to 14 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 · page.TeamPageContent (cyclomatic 98) · ×1
  • page.TeamPageContent (cyclomatic 98) frontend/src/app/management/page.tsx:82 — page.TeamPageContent has cyclomatic complexity 98 (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. This shape REPEATS in the file: 2 other methods here (page.TeamPageContent::parseSyncErrorMessage, page.TeamPageContent::getUserIntegrations) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · useDashboard.useDashboard (cyclomatic 97) · ×1
  • useDashboard.useDashboard (cyclomatic 97) frontend/src/hooks/useDashboard.ts:29 — useDashboard.useDashboard has cyclomatic complexity 97 (threshold 15). Most of this is not in the body itself: 3 of the 97 points are its own statements and the rest belongs to 22 function literals inside it that branch (lines 449, 568, 693, …). 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 · DataRetentionSettings.DataRetentionSettings (cyclomatic 93) · ×1
  • DataRetentionSettings.DataRetentionSettings (cyclomatic 93) frontend/src/app/management/components/DataRetentionSettings.tsx:22 — DataRetentionSettings.DataRetentionSettings has cyclomatic complexity 93 (threshold 15). Of this number, 50 points are the body's own statements and 43 belong to 8 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 · analyses.get_member_daily_health (cyclomatic 87) · ×1
  • analyses.get_member_daily_health (cyclomatic 87) REDACTED:2629 — analyses.get_member_daily_health has cyclomatic complexity 87 (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 · RootlyIntegrationForm.RootlyIntegrationForm (cyclomatic 83) · ×1
  • RootlyIntegrationForm.RootlyIntegrationForm (cyclomatic 83) frontend/src/app/integrations/components/RootlyIntegrationForm.tsx:30 — RootlyIntegrationForm.RootlyIntegrationForm has cyclomatic complexity 83 (threshold 15). Of this number, 56 points are the body's own statements and 27 belong to 11 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 · OrganizationManagementDialog.OrganizationManagementDialog (cyclomatic 78) · ×1
  • OrganizationManagementDialog.OrganizationManagementDialog (cyclomatic 78) frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:82 — OrganizationManagementDialog.OrganizationManagementDialog has cyclomatic complexity 78 (threshold 15). Of this number, 42 points are the body's own statements and 36 belong to 9 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 · UserMappingDrawer.UserMappingDrawer (cyclomatic 78) · ×1
  • UserMappingDrawer.UserMappingDrawer (cyclomatic 78) frontend/src/app/management/components/UserMappingDrawer.tsx:45 — UserMappingDrawer.UserMappingDrawer has cyclomatic complexity 78 (threshold 15). Of this number, 33 points are the body's own statements and 45 belong to 19 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 · integration-handlers.addIntegration (cyclomatic 70) · ×1
  • integration-handlers.addIntegration (cyclomatic 70) frontend/src/app/integrations/handlers/integration-handlers.ts:234 — integration-handlers.addIntegration has cyclomatic complexity 70 (threshold 15). Of this number, 63 points are the body's own statements and 7 belong to 2 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 · TeamHealthOverview.TeamHealthOverview (cyclomatic 65) · ×1
  • TeamHealthOverview.TeamHealthOverview (cyclomatic 65) frontend/src/components/dashboard/TeamHealthOverview.tsx:107 — TeamHealthOverview.TeamHealthOverview has cyclomatic complexity 65 (threshold 15). Most of this is not in the body itself: 15 of the 65 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 276, 394, 420, …). 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 · UserObjectiveDataCard.UserObjectiveDataCard (cyclomatic 65) · ×1
  • UserObjectiveDataCard.UserObjectiveDataCard (cyclomatic 65) frontend/src/components/dashboard/UserObjectiveDataCard.tsx:207 — UserObjectiveDataCard.UserObjectiveDataCard has cyclomatic complexity 65 (threshold 15). Of this number, 22 points are the body's own statements and 43 belong to 8 function literals 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 · AlertsCountCard.AlertBreakdownChart (cyclomatic 62) · ×1
  • AlertsCountCard.AlertBreakdownChart (cyclomatic 62) frontend/src/components/dashboard/AlertsCountCard.tsx:264 — AlertsCountCard.AlertBreakdownChart has cyclomatic complexity 62 (threshold 15). Of this number, 30 points are the body's own statements and 32 belong to 13 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 · mapping-drawer.MappingDrawer (cyclomatic 61) · ×1
  • mapping-drawer.MappingDrawer (cyclomatic 61) frontend/src/components/mapping-drawer.tsx:71 — mapping-drawer.MappingDrawer has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (mapping-drawer.MappingDrawer::runAutoMapping) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · UnifiedBurnoutAnalyzer._fetch_analysis_data (cyclomatic 59) · ×1
  • UnifiedBurnoutAnalyzer._fetch_analysis_data (cyclomatic 59) backend/app/services/unified_burnout_analyzer.py:1184 — UnifiedBurnoutAnalyzer._fetch_analysis_data has cyclomatic complexity 59 (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 · useDashboard.useDashboard.loadIntegrations (cyclomatic 58) · ×1
  • useDashboard.useDashboard.loadIntegrations (cyclomatic 58) frontend/src/hooks/useDashboard.ts:1411 — useDashboard.useDashboard.loadIntegrations has cyclomatic complexity 58 (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 · UserIncidentCard.UserIncidentCard (cyclomatic 57) · ×1
  • UserIncidentCard.UserIncidentCard (cyclomatic 57) frontend/src/components/dashboard/UserIncidentCard.tsx:150 — UserIncidentCard.UserIncidentCard has cyclomatic complexity 57 (threshold 15). Of this number, 32 points are the body's own statements and 25 belong to 6 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 · analyses.get_historical_trends (cyclomatic 55) · ×1
  • analyses.get_historical_trends (cyclomatic 55) REDACTED:1619 — analyses.get_historical_trends 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 · rootly.get_synced_users (cyclomatic 55) · ×1
  • rootly.get_synced_users (cyclomatic 55) backend/app/api/endpoints/rootly.py:1637 — rootly.get_synced_users 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 · auto_refresh_scheduler.check_and_run_auto_refresh_analyses (cyclomatic 55) · ×1
  • auto_refresh_scheduler.check_and_run_auto_refresh_analyses (cyclomatic 55) backend/app/services/auto_refresh_scheduler.py:54 — auto_refresh_scheduler.check_and_run_auto_refresh_analyses 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 · ObjectiveDataCard.ObjectiveDataCard (cyclomatic 54) · ×1
  • ObjectiveDataCard.ObjectiveDataCard (cyclomatic 54) frontend/src/components/dashboard/ObjectiveDataCard.tsx:322 — ObjectiveDataCard.ObjectiveDataCard has cyclomatic complexity 54 (threshold 15). Of this number, 29 points are the body's own statements and 25 belong to 4 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 · MemberDetailModal.MemberDetailModal (cyclomatic 51) · ×1
  • MemberDetailModal.MemberDetailModal (cyclomatic 51) frontend/src/components/dashboard/MemberDetailModal.tsx:288 — MemberDetailModal.MemberDetailModal has cyclomatic complexity 51 (threshold 15). Of this number, 29 points are the body's own statements and 22 belong to 7 function literals 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 · slack.handle_slack_interactions (cyclomatic 49) · ×1
  • slack.handle_slack_interactions (cyclomatic 49) REDACTED:1511 — slack.handle_slack_interactions has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnifiedBurnoutAnalyzer._generate_recommendations (cyclomatic 48) · ×1
  • UnifiedBurnoutAnalyzer._generate_recommendations (cyclomatic 48) backend/app/services/unified_burnout_analyzer.py:3575 — UnifiedBurnoutAnalyzer._generate_recommendations has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AccountSettingsDialog.AccountSettingsDialog (cyclomatic 48) · ×1
  • AccountSettingsDialog.AccountSettingsDialog (cyclomatic 48) frontend/src/components/AccountSettingsDialog.tsx:38 — AccountSettingsDialog.AccountSettingsDialog has cyclomatic complexity 48 (threshold 15). Of this number, 17 points are the body's own statements and 31 belong to 9 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 · manual_mappings.run_linear_mapping (cyclomatic 47) · ×1
  • manual_mappings.run_linear_mapping (cyclomatic 47) backend/app/api/endpoints/manual_mappings.py:1014 — manual_mappings.run_linear_mapping has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnifiedBurnoutAnalyzer._calculate_member_metrics (cyclomatic 45) · ×1
  • UnifiedBurnoutAnalyzer._calculate_member_metrics (cyclomatic 45) backend/app/services/unified_burnout_analyzer.py:2346 — UnifiedBurnoutAnalyzer._calculate_member_metrics has cyclomatic complexity 45 (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 · UnifiedSlackCard.UnifiedSlackCard (cyclomatic 45) · ×1
  • UnifiedSlackCard.UnifiedSlackCard (cyclomatic 45) frontend/src/app/integrations/components/UnifiedSlackCard.tsx:50 — UnifiedSlackCard.UnifiedSlackCard has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 11 of the 45 points are its own statements and the rest belongs to 6 function items inside it that branch (handleWorkspaceCheck, toggleSurveyFeature, a function literal at line 380, …). 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 · slack.slack_oauth_callback (cyclomatic 44) · ×1
  • slack.slack_oauth_callback (cyclomatic 44) REDACTED:207 — slack.slack_oauth_callback has cyclomatic complexity 44 (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 · useDashboard.useDashboard.startAnalysis (cyclomatic 44) · ×1
  • useDashboard.useDashboard.startAnalysis (cyclomatic 44) frontend/src/hooks/useDashboard.ts:1866 — useDashboard.useDashboard.startAnalysis has cyclomatic complexity 44 (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 · manual_mappings.run_jira_mapping (cyclomatic 43) · ×1
  • manual_mappings.run_jira_mapping (cyclomatic 43) backend/app/api/endpoints/manual_mappings.py:794 — manual_mappings.run_jira_mapping has cyclomatic complexity 43 (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 · AlertsCountCard.AlertsCountCard (cyclomatic 43) · ×1
  • AlertsCountCard.AlertsCountCard (cyclomatic 43) frontend/src/components/dashboard/AlertsCountCard.tsx:623 — AlertsCountCard.AlertsCountCard has cyclomatic complexity 43 (threshold 15). Of this number, 40 points are the body's own statements and 3 belong to 3 function literals 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 · UnifiedBurnoutAnalyzer._analyze_member_burnout (cyclomatic 42) · ×1
  • UnifiedBurnoutAnalyzer._analyze_member_burnout (cyclomatic 42) backend/app/services/unified_burnout_analyzer.py:1722 — UnifiedBurnoutAnalyzer._analyze_member_burnout has cyclomatic complexity 42 (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 · ManualSurveyDeliveryModal.ManualSurveyDeliveryModal (cyclomatic 40) · ×1
  • ManualSurveyDeliveryModal.ManualSurveyDeliveryModal (cyclomatic 40) frontend/src/components/ManualSurveyDeliveryModal.tsx:44 — ManualSurveyDeliveryModal.ManualSurveyDeliveryModal has cyclomatic complexity 40 (threshold 15). Of this number, 25 points are the body's own statements and 15 belong to 6 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 · UnifiedBurnoutAnalyzer._map_user_incidents (cyclomatic 39) · ×1
  • UnifiedBurnoutAnalyzer._map_user_incidents (cyclomatic 39) backend/app/services/unified_burnout_analyzer.py:1632 — UnifiedBurnoutAnalyzer._map_user_incidents has cyclomatic complexity 39 (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 · jira.test_jira_integration (cyclomatic 38) · ×1
  • jira.test_jira_integration (cyclomatic 38) REDACTED:898 — jira.test_jira_integration has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · manual_mappings.run_github_mapping (cyclomatic 38) · ×1
  • manual_mappings.run_github_mapping (cyclomatic 38) backend/app/api/endpoints/manual_mappings.py:548 — manual_mappings.run_github_mapping has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · retention_preview.build_retention_preview (cyclomatic 38) · ×1
  • retention_preview.build_retention_preview (cyclomatic 38) backend/app/services/retention_preview.py:254 — retention_preview.build_retention_preview has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnifiedBurnoutAnalyzer._recalculate_burnout_with_github (cyclomatic 37) · ×1
  • UnifiedBurnoutAnalyzer._recalculate_burnout_with_github (cyclomatic 37) backend/app/services/unified_burnout_analyzer.py:5011 — UnifiedBurnoutAnalyzer._recalculate_burnout_with_github has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CrossPlatformCorrelatorTool._analyze_stress_propagation (cyclomatic 36) · ×1
  • CrossPlatformCorrelatorTool._analyze_stress_propagation (cyclomatic 36) backend/app/agents/tools/cross_platform_correlator.py:353 — CrossPlatformCorrelatorTool._analyze_stress_propagation has cyclomatic complexity 36 (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 · AIBurnoutAnalyzerService._prepare_comprehensive_team_data (cyclomatic 36) · ×1
  • AIBurnoutAnalyzerService._prepare_comprehensive_team_data (cyclomatic 36) backend/app/services/ai_burnout_analyzer.py:1142 — AIBurnoutAnalyzerService._prepare_comprehensive_team_data has cyclomatic complexity 36 (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 · analyses.get_analysis_github_commits_timeline (cyclomatic 35) · ×1
  • analyses.get_analysis_github_commits_timeline (cyclomatic 35) REDACTED:2310 — analyses.get_analysis_github_commits_timeline has cyclomatic complexity 35 (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 · analysis._run_analysis_task_impl (cyclomatic 35) · ×1
  • analysis._run_analysis_task_impl (cyclomatic 35) backend/app/api/endpoints/analysis.py:326 — analysis._run_analysis_task_impl has cyclomatic complexity 35 (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 · rootly.debug_rootly_incidents (cyclomatic 35) · ×1
  • rootly.debug_rootly_incidents (cyclomatic 35) backend/app/api/endpoints/rootly.py:834 — rootly.debug_rootly_incidents has cyclomatic complexity 35 (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 · github-integration-card.GitHubIntegrationCard (cyclomatic 35) · ×1
  • github-integration-card.GitHubIntegrationCard (cyclomatic 35) frontend/src/components/integrations/github-integration-card.tsx:57 — github-integration-card.GitHubIntegrationCard has cyclomatic complexity 35 (threshold 15). Of this number, 20 points are the body's own statements and 15 belong to 7 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 · RootlyAPIClient.get_incidents (cyclomatic 34) · ×1
  • RootlyAPIClient.get_incidents (cyclomatic 34) backend/app/core/rootly_client.py:1857 — RootlyAPIClient.get_incidents has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SlackCollector._fetch_real_slack_data (cyclomatic 34) · ×1
  • SlackCollector._fetch_real_slack_data (cyclomatic 34) backend/app/services/slack_collector.py:608 — SlackCollector._fetch_real_slack_data has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InvitationAcceptanceModal.InvitationAcceptanceModal (cyclomatic 34) · ×1
  • InvitationAcceptanceModal.InvitationAcceptanceModal (cyclomatic 34) frontend/src/components/InvitationAcceptanceModal.tsx:30 — InvitationAcceptanceModal.InvitationAcceptanceModal has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 9 of the 34 points are its own statements and the rest belongs to 5 function items inside it that branch (handleAccept, handleReject, fetchInvitation, …). 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 · useDashboard.useDashboard.loadPreviousAnalyses (cyclomatic 34) · ×1
  • useDashboard.useDashboard.loadPreviousAnalyses (cyclomatic 34) frontend/src/hooks/useDashboard.ts:823 — useDashboard.useDashboard.loadPreviousAnalyses has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CrossPlatformCorrelatorTool._analyze_temporal_patterns (cyclomatic 33) · ×1
  • CrossPlatformCorrelatorTool._analyze_temporal_patterns (cyclomatic 33) backend/app/agents/tools/cross_platform_correlator.py:244 — CrossPlatformCorrelatorTool._analyze_temporal_patterns has cyclomatic complexity 33 (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 · SlackCollector._process_user_messages (cyclomatic 33) · ×1
  • SlackCollector._process_user_messages (cyclomatic 33) backend/app/services/slack_collector.py:445 — SlackCollector._process_user_messages has cyclomatic complexity 33 (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 · useDashboard.useDashboard.runAnalysisWithTimeRange (cyclomatic 33) · ×1
  • useDashboard.useDashboard.runAnalysisWithTimeRange (cyclomatic 33) frontend/src/hooks/useDashboard.ts:2027 — useDashboard.useDashboard.runAnalysisWithTimeRange has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (useDashboard.useDashboard.runAnalysisWithTimeRange::pollAnalysis) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · enhanced_github_collector.collect_team_github_data_with_mapping (cyclomatic 32) · ×1
  • enhanced_github_collector.collect_team_github_data_with_mapping (cyclomatic 32) backend/app/services/enhanced_github_collector.py:17 — enhanced_github_collector.collect_team_github_data_with_mapping has cyclomatic complexity 32 (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 · UnifiedBurnoutAnalyzer._enhance_metrics_with_github_data (cyclomatic 32) · ×1
  • UnifiedBurnoutAnalyzer._enhance_metrics_with_github_data (cyclomatic 32) backend/app/services/unified_burnout_analyzer.py:2511 — UnifiedBurnoutAnalyzer._enhance_metrics_with_github_data has cyclomatic complexity 32 (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 · UnifiedBurnoutAnalyzer._calculate_github_burnout_score (cyclomatic 32) · ×1
  • UnifiedBurnoutAnalyzer._calculate_github_burnout_score (cyclomatic 32) backend/app/services/unified_burnout_analyzer.py:5924 — UnifiedBurnoutAnalyzer._calculate_github_burnout_score has cyclomatic complexity 32 (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_demo_analyses.main (cyclomatic 32) · ×1
  • manage_demo_analyses.main (cyclomatic 32) backend/mock_data_helpers/manage_demo_analyses.py:322 — manage_demo_analyses.main has cyclomatic complexity 32 (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 · page.AuthSuccessPage (cyclomatic 32) · ×1
  • page.AuthSuccessPage (cyclomatic 32) REDACTED:7 — page.AuthSuccessPage has cyclomatic complexity 32 (threshold 15). 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 literals inside it that branch (lines 18, 13, 119). 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 · AIInsightsCard.AIInsightsCard (cyclomatic 32) · ×1
  • AIInsightsCard.AIInsightsCard (cyclomatic 32) frontend/src/app/integrations/components/AIInsightsCard.tsx:35 — AIInsightsCard.AIInsightsCard has cyclomatic complexity 32 (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. This shape REPEATS in the file: one other method here (AIInsightsCard.AIInsightsCard::handleTokenSourceChange) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · JiraManualSetupForm.JiraManualSetupForm (cyclomatic 32) · ×1
  • JiraManualSetupForm.JiraManualSetupForm (cyclomatic 32) frontend/src/app/integrations/components/JiraManualSetupForm.tsx:27 — JiraManualSetupForm.JiraManualSetupForm has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 13 of the 32 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 63, 51, 186, …). 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 · jira-mapping-grid.JiraMapppingGrid (cyclomatic 32) · ×1
  • jira-mapping-grid.JiraMapppingGrid (cyclomatic 32) frontend/src/components/jira-mapping-grid.tsx:45 — jira-mapping-grid.JiraMapppingGrid has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 3 of the 32 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 74, createMapping, a function literal at line 122, …). 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 · useDashboard.useDashboard.runAnalysisWithTimeRange · ×1
  • useDashboard.useDashboard.runAnalysisWithTimeRange::pollAnalysis (cyclomatic 32) frontend/src/hooks/useDashboard.ts:2204 — useDashboard.useDashboard.runAnalysisWithTimeRange::pollAnalysis has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (useDashboard.useDashboard.runAnalysisWithTimeRange) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · rootly.get_integration_users (cyclomatic 31) · ×1
  • rootly.get_integration_users (cyclomatic 31) backend/app/api/endpoints/rootly.py:1048 — rootly.get_integration_users has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PagerDutyAPIClient.get_analytics_incidents (cyclomatic 31) · ×1
  • PagerDutyAPIClient.get_analytics_incidents (cyclomatic 31) backend/app/core/pagerduty_client.py:457 — PagerDutyAPIClient.get_analytics_incidents has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnifiedBurnoutAnalyzer.calculate_individual_daily_health (cyclomatic 31) · ×1
  • UnifiedBurnoutAnalyzer.calculate_individual_daily_health (cyclomatic 31) backend/app/services/unified_burnout_analyzer.py:6019 — UnifiedBurnoutAnalyzer.calculate_individual_daily_health has cyclomatic complexity 31 (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 · analyses._generate_daily_tooltip (cyclomatic 30) · ×1
  • analyses._generate_daily_tooltip (cyclomatic 30) REDACTED:2543 — analyses._generate_daily_tooltip has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · data_retention.update_retention_policy (cyclomatic 30) · ×1
  • data_retention.update_retention_policy (cyclomatic 30) backend/app/services/data_retention.py:130 — data_retention.update_retention_policy has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · och_config.generate_och_score_reasoning (cyclomatic 29) · ×1
  • och_config.generate_och_score_reasoning (cyclomatic 29) backend/app/core/och_config.py:372 — och_config.generate_och_score_reasoning has cyclomatic complexity 29 (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 · enhanced_slack_collector.collect_team_slack_data_with_mapping (cyclomatic 29) · ×1
  • enhanced_slack_collector.collect_team_slack_data_with_mapping (cyclomatic 29) backend/app/services/enhanced_slack_collector.py:11 — enhanced_slack_collector.collect_team_slack_data_with_mapping has cyclomatic complexity 29 (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 · UserSyncService._merge_duplicate_correlations (cyclomatic 29) · ×1
  • UserSyncService._merge_duplicate_correlations (cyclomatic 29) backend/app/services/user_sync_service.py:729 — UserSyncService._merge_duplicate_correlations has cyclomatic complexity 29 (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 · weekly_digest_service._build_email_content (cyclomatic 29) · ×1
  • weekly_digest_service._build_email_content (cyclomatic 29) backend/app/services/weekly_digest_service.py:335 — weekly_digest_service._build_email_content has cyclomatic complexity 29 (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 · MemberDetailModal.IndividualDailyHealthChart (cyclomatic 29) · ×1
  • MemberDetailModal.IndividualDailyHealthChart (cyclomatic 29) frontend/src/components/dashboard/MemberDetailModal.tsx:59 — MemberDetailModal.IndividualDailyHealthChart has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 6 of the 29 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 95, 69, 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 · analyses.verify_analysis_consistency (cyclomatic 28) · ×1
  • analyses.verify_analysis_consistency (cyclomatic 28) REDACTED:1431 — analyses.verify_analysis_consistency has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · rootly.sync_integration_users (cyclomatic 28) · ×1
  • rootly.sync_integration_users (cyclomatic 28) backend/app/api/endpoints/rootly.py:1296 — rootly.sync_integration_users has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · surveys.create_or_update_survey_schedule (cyclomatic 28) · ×1
  • surveys.create_or_update_survey_schedule (cyclomatic 28) backend/app/api/endpoints/surveys.py:121 — surveys.create_or_update_survey_schedule has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnifiedBurnoutAnalyzer._calculate_individual_daily_health_score (cyclomatic 28) · ×1
  • UnifiedBurnoutAnalyzer._calculate_individual_daily_health_score (cyclomatic 28) backend/app/services/unified_burnout_analyzer.py:4842 — UnifiedBurnoutAnalyzer._calculate_individual_daily_health_score has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · team-handlers.fetchSyncedUsers (cyclomatic 28) · ×1
  • team-handlers.fetchSyncedUsers (cyclomatic 28) frontend/src/app/integrations/handlers/team-handlers.ts:234 — team-handlers.fetchSyncedUsers has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · user-mapping-handlers.updateUserCorrelation (cyclomatic 28) · ×1
  • user-mapping-handlers.updateUserCorrelation (cyclomatic 28) frontend/src/app/management/handlers/user-mapping-handlers.ts:7 — user-mapping-handlers.updateUserCorrelation has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useDashboard.useDashboard.selectDefaultAnalysis (cyclomatic 28) · ×1
  • useDashboard.useDashboard.selectDefaultAnalysis (cyclomatic 28) frontend/src/hooks/useDashboard.ts:1138 — useDashboard.useDashboard.selectDefaultAnalysis has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · analyses.regenerate_analysis_trends (cyclomatic 27) · ×1
  • analyses.regenerate_analysis_trends (cyclomatic 27) REDACTED:1271 — analyses.regenerate_analysis_trends has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · llm.store_llm_token (cyclomatic 27) · ×1
  • llm.store_llm_token (cyclomatic 27) backend/app/api/endpoints/llm.py:57 — llm.store_llm_token has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SurveyScheduler._send_organization_surveys (cyclomatic 27) · ×1
  • SurveyScheduler._send_organization_surveys (cyclomatic 27) backend/app/services/survey_scheduler.py:744 — SurveyScheduler._send_organization_surveys has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnifiedBurnoutAnalyzer._calculate_team_health (cyclomatic 27) · ×1
  • UnifiedBurnoutAnalyzer._calculate_team_health (cyclomatic 27) backend/app/services/unified_burnout_analyzer.py:3418 — UnifiedBurnoutAnalyzer._calculate_team_health has cyclomatic complexity 27 (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 · ai-handlers.handleConnectAI (cyclomatic 27) · ×1
  • ai-handlers.handleConnectAI (cyclomatic 27) frontend/src/app/integrations/handlers/ai-handlers.ts:44 — ai-handlers.handleConnectAI has cyclomatic complexity 27 (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 · SurveyScheduler._send_follow_up_reminders (cyclomatic 26) · ×1
  • SurveyScheduler._send_follow_up_reminders (cyclomatic 26) backend/app/services/survey_scheduler.py:392 — SurveyScheduler._send_follow_up_reminders has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnifiedBurnoutAnalyzer._calculate_confidence_intervals (cyclomatic 26) · ×1
  • UnifiedBurnoutAnalyzer._calculate_confidence_intervals (cyclomatic 26) backend/app/services/unified_burnout_analyzer.py:2882 — UnifiedBurnoutAnalyzer._calculate_confidence_intervals has cyclomatic complexity 26 (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 · UserSyncService._sync_users_to_correlation (cyclomatic 26) · ×1
  • UserSyncService._sync_users_to_correlation (cyclomatic 26) backend/app/services/user_sync_service.py:369 — UserSyncService._sync_users_to_correlation has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · retention_demo._assert_fixture_only (cyclomatic 26) · ×1
  • retention_demo._assert_fixture_only (cyclomatic 26) backend/scripts/retention_demo.py:216 — retention_demo._assert_fixture_only has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IntegrationCardItem.IntegrationCardItem (cyclomatic 26) · ×1
  • IntegrationCardItem.IntegrationCardItem (cyclomatic 26) frontend/src/app/integrations/components/IntegrationCardItem.tsx:45 — IntegrationCardItem.IntegrationCardItem has cyclomatic complexity 26 (threshold 15). Of this number, 18 points are the body's own statements and 8 belong to 3 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 · PagerDutyIntegrationForm.PagerDutyIntegrationForm (cyclomatic 26) · ×1
  • PagerDutyIntegrationForm.PagerDutyIntegrationForm (cyclomatic 26) frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx:27 — PagerDutyIntegrationForm.PagerDutyIntegrationForm has cyclomatic complexity 26 (threshold 15). Of this number, 17 points are the body's own statements and 9 belong to 2 function literals 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 · integration-handlers.testConnection (cyclomatic 26) · ×1
  • integration-handlers.testConnection (cyclomatic 26) frontend/src/app/integrations/handlers/integration-handlers.ts:11 — integration-handlers.testConnection has cyclomatic complexity 26 (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 · PagerDutyDataCollector._normalize_analytics_incidents (cyclomatic 25) · ×1
  • PagerDutyDataCollector._normalize_analytics_incidents (cyclomatic 25) backend/app/core/pagerduty_client.py:1183 — PagerDutyDataCollector._normalize_analytics_incidents has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · github_collector.collect_team_github_data (cyclomatic 25) · ×1
  • github_collector.collect_team_github_data (cyclomatic 25) backend/app/services/github_collector.py:1185 — github_collector.collect_team_github_data has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · retention_cleanup.cleanup_organization_data (cyclomatic 25) · ×1
  • retention_cleanup.cleanup_organization_data (cyclomatic 25) backend/app/services/retention_cleanup.py:116 — retention_cleanup.cleanup_organization_data has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnifiedBurnoutAnalyzer._analyze_team_data (cyclomatic 25) · ×1
  • UnifiedBurnoutAnalyzer._analyze_team_data (cyclomatic 25) backend/app/services/unified_burnout_analyzer.py:1549 — UnifiedBurnoutAnalyzer._analyze_team_data has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useValidation.useValidation.validateToken (cyclomatic 25) · ×1
  • useValidation.useValidation.validateToken (cyclomatic 25) frontend/src/app/integrations/hooks/useValidation.ts:30 — useValidation.useValidation.validateToken has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 80, 79). 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 · JiraWorkspaceSelector.JiraWorkspaceSelector (cyclomatic 25) · ×1
  • JiraWorkspaceSelector.JiraWorkspaceSelector (cyclomatic 25) frontend/src/app/integrations/dialogs/JiraWorkspaceSelector.tsx:22 — JiraWorkspaceSelector.JiraWorkspaceSelector has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to 4 function items inside it that branch (handleSelectWorkspace, loadWorkspaces, 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 · team-handlers.syncUsersToCorrelation (cyclomatic 25) · ×1
  • team-handlers.syncUsersToCorrelation (cyclomatic 25) frontend/src/app/integrations/handlers/team-handlers.ts:60 — team-handlers.syncUsersToCorrelation has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SyncProgressModal.SyncProgressModal (cyclomatic 25) · ×1
  • SyncProgressModal.SyncProgressModal (cyclomatic 25) frontend/src/components/SyncProgressModal.tsx:18 — SyncProgressModal.SyncProgressModal has cyclomatic complexity 25 (threshold 15). Of this number, 20 points are the body's own statements and 5 belong to 3 function literals 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 · jira-integration-card.JiraIntegrationCard (cyclomatic 25) · ×1
  • jira-integration-card.JiraIntegrationCard (cyclomatic 25) frontend/src/components/integrations/jira-integration-card.tsx:66 — jira-integration-card.JiraIntegrationCard has cyclomatic complexity 25 (threshold 15). Of this number, 15 points are the body's own statements and 10 belong to 5 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 · slack-integration-card.SlackIntegrationCard (cyclomatic 25) · ×1
  • slack-integration-card.SlackIntegrationCard (cyclomatic 25) frontend/src/components/integrations/slack-integration-card.tsx:56 — slack-integration-card.SlackIntegrationCard has cyclomatic complexity 25 (threshold 15). Of this number, 15 points are the body's own statements and 10 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 · useDashboard.useDashboard.startPollingAnalysis · ×1
  • useDashboard.useDashboard.startPollingAnalysis::pollAnalysis (cyclomatic 25) frontend/src/hooks/useDashboard.ts:271 — useDashboard.useDashboard.startPollingAnalysis::pollAnalysis has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BurnoutDetectionAgent._comprehensive_analysis (cyclomatic 24) · ×1
  • BurnoutDetectionAgent._comprehensive_analysis (cyclomatic 24) backend/app/agents/burnout_agent.py:259 — BurnoutDetectionAgent._comprehensive_analysis has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ai_usage_collector.fetch_openai_usage_per_user (cyclomatic 24) · ×1
  • ai_usage_collector.fetch_openai_usage_per_user (cyclomatic 24) backend/app/services/ai_usage_collector.py:150 — ai_usage_collector.fetch_openai_usage_per_user has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ai_usage_collector.fetch_anthropic_usage (cyclomatic 24) · ×1
  • ai_usage_collector.fetch_anthropic_usage (cyclomatic 24) backend/app/services/ai_usage_collector.py:231 — ai_usage_collector.fetch_anthropic_usage has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnifiedBurnoutAnalyzer._enhance_metrics_with_slack_data (cyclomatic 24) · ×1
  • UnifiedBurnoutAnalyzer._enhance_metrics_with_slack_data (cyclomatic 24) backend/app/services/unified_burnout_analyzer.py:2652 — UnifiedBurnoutAnalyzer._enhance_metrics_with_slack_data has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LinearManualSetupForm.LinearManualSetupForm (cyclomatic 24) · ×1
  • LinearManualSetupForm.LinearManualSetupForm (cyclomatic 24) frontend/src/app/integrations/components/LinearManualSetupForm.tsx:26 — LinearManualSetupForm.LinearManualSetupForm has cyclomatic complexity 24 (threshold 15). Of this number, 13 points are the body's own statements and 11 belong to 4 function literals 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 · organization-handlers.handleInvite (cyclomatic 24) · ×1
  • organization-handlers.handleInvite (cyclomatic 24) frontend/src/app/integrations/handlers/organization-handlers.ts:7 — organization-handlers.handleInvite has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TrendsCard.TrendsCard (cyclomatic 24) · ×1
  • TrendsCard.TrendsCard (cyclomatic 24) frontend/src/components/dashboard/TrendsCard.tsx:54 — TrendsCard.TrendsCard has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 8 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 147). 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 · jira.auto_map_jira_users (cyclomatic 23) · ×1
  • jira.auto_map_jira_users (cyclomatic 23) REDACTED:1105 — jira.auto_map_jira_users has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · manual_mappings.cleanup_duplicate_mappings (cyclomatic 23) · ×1
  • manual_mappings.cleanup_duplicate_mappings (cyclomatic 23) backend/app/api/endpoints/manual_mappings.py:377 — manual_mappings.cleanup_duplicate_mappings has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RootlyAPIClient.test_connection (cyclomatic 23) · ×1
  • RootlyAPIClient.test_connection (cyclomatic 23) backend/app/core/rootly_client.py:229 — RootlyAPIClient.test_connection has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnifiedBurnoutAnalyzer._fetch_jira_workload_data (cyclomatic 23) · ×1
  • UnifiedBurnoutAnalyzer._fetch_jira_workload_data (cyclomatic 23) backend/app/services/unified_burnout_analyzer.py:5161 — UnifiedBurnoutAnalyzer._fetch_jira_workload_data has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnifiedBurnoutAnalyzer._get_severity_level (cyclomatic 23) · ×1
  • UnifiedBurnoutAnalyzer._get_severity_level (cyclomatic 23) backend/app/services/unified_burnout_analyzer.py:6160 — UnifiedBurnoutAnalyzer._get_severity_level has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UserSyncService._update_correlation (cyclomatic 23) · ×1
  • UserSyncService._update_correlation (cyclomatic 23) backend/app/services/user_sync_service.py:666 — UserSyncService._update_correlation has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · page.JiraCallbackContent (cyclomatic 23) · ×1
  • page.JiraCallbackContent (cyclomatic 23) frontend/src/app/setup/jira/callback/page.tsx:9 — page.JiraCallbackContent has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 22, 13). 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 · page.LinearCallbackContent (cyclomatic 23) · ×1
  • page.LinearCallbackContent (cyclomatic 23) frontend/src/app/setup/linear/callback/page.tsx:9 — page.LinearCallbackContent has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 22, 13). 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 · TeamMembersList.calculateUserTrend (cyclomatic 23) · ×1
  • TeamMembersList.calculateUserTrend (cyclomatic 23) frontend/src/components/dashboard/TeamMembersList.tsx:61 — TeamMembersList.calculateUserTrend has cyclomatic complexity 23 (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 · mapping-drawer.MappingDrawer · ×1
  • mapping-drawer.MappingDrawer::runAutoMapping (cyclomatic 23) frontend/src/components/mapping-drawer.tsx:330 — mapping-drawer.MappingDrawer::runAutoMapping has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (mapping-drawer.MappingDrawer) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · githubMetricUtils.getVulnerabilityTags (cyclomatic 23) · ×1
  • githubMetricUtils.getVulnerabilityTags (cyclomatic 23) frontend/src/lib/githubMetricUtils.ts:113 — githubMetricUtils.getVulnerabilityTags has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (githubMetricUtils.getAllVulnerabilityTags) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · githubMetricUtils.getAllVulnerabilityTags (cyclomatic 23) · ×1
  • githubMetricUtils.getAllVulnerabilityTags (cyclomatic 23) frontend/src/lib/githubMetricUtils.ts:199 — githubMetricUtils.getAllVulnerabilityTags has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (githubMetricUtils.getVulnerabilityTags) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · analyses.get_user_github_daily_commits (cyclomatic 22) · ×1
  • analyses.get_user_github_daily_commits (cyclomatic 22) REDACTED:2164 — analyses.get_user_github_daily_commits has cyclomatic complexity 22 (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 · linear._process_callback (cyclomatic 22) · ×1
  • linear._process_callback (cyclomatic 22) backend/app/api/endpoints/linear.py:128 — linear._process_callback has cyclomatic complexity 22 (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 · PagerDutyAPIClient.get_incidents (cyclomatic 22) · ×1
  • PagerDutyAPIClient.get_incidents (cyclomatic 22) backend/app/core/pagerduty_client.py:619 — PagerDutyAPIClient.get_incidents 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 · PagerDutyDataCollector._normalize_with_enhanced_assignment_extraction (cyclomatic 22) · ×1
  • PagerDutyDataCollector._normalize_with_enhanced_assignment_extraction (cyclomatic 22) backend/app/core/pagerduty_client.py:1308 — PagerDutyDataCollector._normalize_with_enhanced_assignment_extraction 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 · PlatformScoringFramework._get_component_recommendation (cyclomatic 22) · ×1
  • PlatformScoringFramework._get_component_recommendation (cyclomatic 22) backend/app/core/platform_scoring.py:197 — PlatformScoringFramework._get_component_recommendation has cyclomatic complexity 22 (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 · GitHubCollector.fetch_daily_commit_data_graphql (cyclomatic 22) · ×1
  • GitHubCollector.fetch_daily_commit_data_graphql (cyclomatic 22) backend/app/services/github_collector.py:918 — GitHubCollector.fetch_daily_commit_data_graphql 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 · UnifiedBurnoutAnalyzer._enhance_metrics_with_jira_data (cyclomatic 22) · ×1
  • UnifiedBurnoutAnalyzer._enhance_metrics_with_jira_data (cyclomatic 22) backend/app/services/unified_burnout_analyzer.py:2786 — UnifiedBurnoutAnalyzer._enhance_metrics_with_jira_data 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 · GitHubConnectedCard.GitHubConnectedCard (cyclomatic 22) · ×1
  • GitHubConnectedCard.GitHubConnectedCard (cyclomatic 22) frontend/src/app/integrations/components/GitHubConnectedCard.tsx:24 — GitHubConnectedCard.GitHubConnectedCard has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body's own statements and 8 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 · TeamManagementDialog.TeamManagementDialog (cyclomatic 22) · ×1
  • TeamManagementDialog.TeamManagementDialog (cyclomatic 22) frontend/src/components/TeamManagementDialog.tsx:12 — TeamManagementDialog.TeamManagementDialog 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 6 function items inside it that branch (fetchOrganizationData, a function literal at line 23, handleInvite, …). 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 · SurveyResultsCard.SurveyResultsCard (cyclomatic 22) · ×1
  • SurveyResultsCard.SurveyResultsCard (cyclomatic 22) frontend/src/components/dashboard/SurveyResultsCard.tsx:83 — SurveyResultsCard.SurveyResultsCard has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function literal 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 · GitHubCommitsTimeline.GitHubCommitsTimeline (cyclomatic 22) · ×1
  • GitHubCommitsTimeline.GitHubCommitsTimeline (cyclomatic 22) frontend/src/components/dashboard/charts/GitHubCommitsTimeline.tsx:15 — GitHubCommitsTimeline.GitHubCommitsTimeline has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 21, 149, 118). 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 · landing-page.LandingPage (cyclomatic 22) · ×1
  • landing-page.LandingPage (cyclomatic 22) frontend/src/components/landing-page.tsx:86 — landing-page.LandingPage has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 5 function items inside it that branch (handleGoogleLogin, handleGitHubLogin, handleOktaLogin, …). 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 · manual_mappings.run_openai_mapping (cyclomatic 21) · ×1
  • manual_mappings.run_openai_mapping (cyclomatic 21) backend/app/api/endpoints/manual_mappings.py:1262 — manual_mappings.run_openai_mapping has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · slack.get_slack_users (cyclomatic 21) · ×1
  • slack.get_slack_users (cyclomatic 21) REDACTED:1016 — slack.get_slack_users 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 · slack.handle_oncall_health_command (cyclomatic 21) · ×1
  • slack.handle_oncall_health_command (cyclomatic 21) REDACTED:1298 — slack.handle_oncall_health_command has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · security.security_middleware (cyclomatic 21) · ×1
  • security.security_middleware (cyclomatic 21) backend/app/middleware/security.py:85 — security.security_middleware has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GitHubCollector.fetch_daily_commit_data (cyclomatic 21) · ×1
  • GitHubCollector.fetch_daily_commit_data (cyclomatic 21) backend/app/services/github_collector.py:525 — GitHubCollector.fetch_daily_commit_data has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UserSyncService._match_slack_users (cyclomatic 21) · ×1
  • UserSyncService._match_slack_users (cyclomatic 21) backend/app/services/user_sync_service.py:1195 — UserSyncService._match_slack_users 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 · ai_usage.test_connection (cyclomatic 20) · ×1
  • ai_usage.test_connection (cyclomatic 20) backend/app/api/endpoints/ai_usage.py:161 — ai_usage.test_connection has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PagerDutyAPIClient._get_complete_incidents (cyclomatic 20) · ×1
  • PagerDutyAPIClient._get_complete_incidents (cyclomatic 20) backend/app/core/pagerduty_client.py:720 — PagerDutyAPIClient._get_complete_incidents has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IntegrationValidator._validate_jira_manual_token (cyclomatic 20) · ×1
  • IntegrationValidator._validate_jira_manual_token (cyclomatic 20) backend/app/services/integration_validator.py:174 — IntegrationValidator._validate_jira_manual_token has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · JiraUserSyncService._sync_users_to_correlation (cyclomatic 20) · ×1
  • JiraUserSyncService._sync_users_to_correlation (cyclomatic 20) backend/app/services/jira_user_sync_service.py:173 — JiraUserSyncService._sync_users_to_correlation has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UserSyncService._match_linear_users (cyclomatic 20) · ×1
  • UserSyncService._match_linear_users (cyclomatic 20) backend/app/services/user_sync_service.py:1495 — UserSyncService._match_linear_users has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · weekly_digest_service.check_and_send_weekly_digests (cyclomatic 20) · ×1
  • weekly_digest_service.check_and_send_weekly_digests (cyclomatic 20) backend/app/services/weekly_digest_service.py:902 — weekly_digest_service.check_and_send_weekly_digests has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BurnoutFactorsV0.BurnoutFactorsV0 (cyclomatic 20) · ×1
  • BurnoutFactorsV0.BurnoutFactorsV0 (cyclomatic 20) frontend/src/components/BurnoutFactorsV0.tsx:14 — BurnoutFactorsV0.BurnoutFactorsV0 has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 23). 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 · CreateKeyDialog.CreateKeyDialog (cyclomatic 20) · ×1
  • CreateKeyDialog.CreateKeyDialog (cyclomatic 20) frontend/src/components/api-keys/CreateKeyDialog.tsx:42 — CreateKeyDialog.CreateKeyDialog has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 4 function items inside it that branch (getExpirationDate, a function literal at line 151, handleCreate, …). 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 · BaseRiskFactorsCard.CustomPolarAngleTick (cyclomatic 20) · ×1
  • BaseRiskFactorsCard.CustomPolarAngleTick (cyclomatic 20) frontend/src/components/dashboard/BaseRiskFactorsCard.tsx:31 — BaseRiskFactorsCard.CustomPolarAngleTick has cyclomatic complexity 20 (threshold 15). Of this number, 19 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 · useDashboard.useDashboard.loadSpecificAnalysis (cyclomatic 20) · ×1
  • useDashboard.useDashboard.loadSpecificAnalysis (cyclomatic 20) frontend/src/hooks/useDashboard.ts:1008 — useDashboard.useDashboard.loadSpecificAnalysis has cyclomatic complexity 20 (threshold 15). Of this number, 19 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 · BurnoutPredictorTool._calculate_trend (cyclomatic 19) · ×1
  • BurnoutPredictorTool._calculate_trend (cyclomatic 19) backend/app/agents/tools/burnout_predictor.py:173 — BurnoutPredictorTool._calculate_trend has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CrossPlatformCorrelatorTool._correlate_incidents_communication (cyclomatic 19) · ×1
  • CrossPlatformCorrelatorTool._correlate_incidents_communication (cyclomatic 19) backend/app/agents/tools/cross_platform_correlator.py:165 — CrossPlatformCorrelatorTool._correlate_incidents_communication has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · analyses.run_burnout_analysis (cyclomatic 19) · ×1
  • analyses.run_burnout_analysis (cyclomatic 19) REDACTED:281 — analyses.run_burnout_analysis has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mappings.get_analysis_mappings (cyclomatic 19) · ×1
  • mappings.get_analysis_mappings (cyclomatic 19) backend/app/api/endpoints/mappings.py:65 — mappings.get_analysis_mappings has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ai_usage_collector.fetch_openai_usage (cyclomatic 19) · ×1
  • ai_usage_collector.fetch_openai_usage (cyclomatic 19) backend/app/services/ai_usage_collector.py:49 — ai_usage_collector.fetch_openai_usage has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EnhancedJiraMatcher.match_email_to_jira (cyclomatic 19) · ×1
  • EnhancedJiraMatcher.match_email_to_jira (cyclomatic 19) backend/app/services/enhanced_jira_matcher.py:29 — EnhancedJiraMatcher.match_email_to_jira has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EnhancedLinearMatcher.match_email_to_linear (cyclomatic 19) · ×1
  • EnhancedLinearMatcher.match_email_to_linear (cyclomatic 19) backend/app/services/enhanced_linear_matcher.py:29 — EnhancedLinearMatcher.match_email_to_linear has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · retention_status.cleanup_due_at (cyclomatic 19) · ×1
  • retention_status.cleanup_due_at (cyclomatic 19) backend/app/services/retention_status.py:108 — retention_status.cleanup_due_at has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SurveyScheduler._get_survey_recipients (cyclomatic 19) · ×1
  • SurveyScheduler._get_survey_recipients (cyclomatic 19) backend/app/services/survey_scheduler.py:951 — SurveyScheduler._get_survey_recipients has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnifiedBurnoutAnalyzer._enhance_with_ai_analysis (cyclomatic 19) · ×1
  • UnifiedBurnoutAnalyzer._enhance_with_ai_analysis (cyclomatic 19) backend/app/services/unified_burnout_analyzer.py:3949 — UnifiedBurnoutAnalyzer._enhance_with_ai_analysis has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UnifiedBurnoutAnalyzer._calculate_jira_och_contribution (cyclomatic 19) · ×1
  • UnifiedBurnoutAnalyzer._calculate_jira_och_contribution (cyclomatic 19) backend/app/services/unified_burnout_analyzer.py:5460 — UnifiedBurnoutAnalyzer._calculate_jira_och_contribution has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UserSyncService.sync_integration_users (cyclomatic 19) · ×1
  • UserSyncService.sync_integration_users (cyclomatic 19) backend/app/services/user_sync_service.py:27 — UserSyncService.sync_integration_users has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mapping-handlers.saveEditedMapping (cyclomatic 19) · ×1
  • mapping-handlers.saveEditedMapping (cyclomatic 19) frontend/src/app/integrations/handlers/mapping-handlers.ts:108 — mapping-handlers.saveEditedMapping has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to 2 function literals 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 · MemberOpenAIUsageCard.MemberOpenAIUsageCard (cyclomatic 19) · ×1
  • MemberOpenAIUsageCard.MemberOpenAIUsageCard (cyclomatic 19) frontend/src/components/dashboard/MemberOpenAIUsageCard.tsx:106 — MemberOpenAIUsageCard.MemberOpenAIUsageCard has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 111, 126, 118, …). 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 · CrossPlatformCorrelatorTool._correlate_incidents_code (cyclomatic 18) · ×1
  • CrossPlatformCorrelatorTool._correlate_incidents_code (cyclomatic 18) backend/app/agents/tools/cross_platform_correlator.py:97 — CrossPlatformCorrelatorTool._correlate_incidents_code has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · admin.refresh_demo_analyses (cyclomatic 18) · ×1
  • admin.refresh_demo_analyses (cyclomatic 18) backend/app/api/endpoints/admin.py:125 — admin.refresh_demo_analyses has cyclomatic complexity 18 (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 · jira._process_callback (cyclomatic 18) · ×1
  • jira._process_callback (cyclomatic 18) REDACTED:95 — jira._process_callback has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mappings.validate_github_username (cyclomatic 18) · ×1
  • mappings.validate_github_username (cyclomatic 18) backend/app/api/endpoints/mappings.py:553 — mappings.validate_github_username has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PagerDutyAPIClient.test_connection (cyclomatic 18) · ×1
  • PagerDutyAPIClient.test_connection (cyclomatic 18) backend/app/core/pagerduty_client.py:64 — PagerDutyAPIClient.test_connection has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AIBurnoutAnalyzerService._prepare_ai_data (cyclomatic 18) · ×1
  • AIBurnoutAnalyzerService._prepare_ai_data (cyclomatic 18) backend/app/services/ai_burnout_analyzer.py:208 — AIBurnoutAnalyzerService._prepare_ai_data has cyclomatic complexity 18 (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 · AIBurnoutAnalyzerService._analyze_team_trends (cyclomatic 18) · ×1
  • AIBurnoutAnalyzerService._analyze_team_trends (cyclomatic 18) backend/app/services/ai_burnout_analyzer.py:907 — AIBurnoutAnalyzerService._analyze_team_trends has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LegacyCleanupAuthorization.validate_authorization (cyclomatic 18) · ×1
  • LegacyCleanupAuthorization.validate_authorization (cyclomatic 18) backend/app/services/retention_legacy.py:55 — LegacyCleanupAuthorization.validate_authorization 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 · retention_scheduler.process_organization_cleanup (cyclomatic 18) · ×1
  • retention_scheduler.process_organization_cleanup (cyclomatic 18) backend/app/services/retention_scheduler.py:91 — retention_scheduler.process_organization_cleanup has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · slack_collector.process_slack_messages_with_name_correlation (cyclomatic 18) · ×1
  • slack_collector.process_slack_messages_with_name_correlation (cyclomatic 18) backend/app/services/slack_collector.py:1032 — slack_collector.process_slack_messages_with_name_correlation has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UserSyncService._match_jira_users (cyclomatic 18) · ×1
  • UserSyncService._match_jira_users (cyclomatic 18) backend/app/services/user_sync_service.py:1364 — UserSyncService._match_jira_users has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · weekly_digest_service._calculate_user_trend (cyclomatic 18) · ×1
  • weekly_digest_service._calculate_user_trend (cyclomatic 18) backend/app/services/weekly_digest_service.py:148 — weekly_digest_service._calculate_user_trend 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 · AIInsightsCard.AIInsightsCard · ×1
  • AIInsightsCard.AIInsightsCard::handleTokenSourceChange (cyclomatic 18) frontend/src/app/integrations/components/AIInsightsCard.tsx:64 — AIInsightsCard.AIInsightsCard::handleTokenSourceChange has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (AIInsightsCard.AIInsightsCard) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · GitHubAllMetricsPopup.GitHubAllMetricsPopup (cyclomatic 18) · ×1
  • GitHubAllMetricsPopup.GitHubAllMetricsPopup (cyclomatic 18) frontend/src/components/dashboard/GitHubAllMetricsPopup.tsx:27 — GitHubAllMetricsPopup.GitHubAllMetricsPopup 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 3 function items inside it that branch (handleMemberClick, a function literal at line 70, 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 · ObjectiveDataCard.aggregateToWeekly (cyclomatic 18) · ×1
  • ObjectiveDataCard.aggregateToWeekly (cyclomatic 18) frontend/src/components/dashboard/ObjectiveDataCard.tsx:121 — ObjectiveDataCard.aggregateToWeekly has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 145, 134, 139, …). 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 · integrations-layout.IntegrationsLayoutContent (cyclomatic 18) · ×1
  • integrations-layout.IntegrationsLayoutContent (cyclomatic 18) frontend/src/components/integrations/integrations-layout.tsx:21 — integrations-layout.IntegrationsLayoutContent 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 5 function items inside it that branch (loadIntegrationsOptimized, a function literal at line 134, 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 · BurnoutDetectionAgent._parse_agent_response (cyclomatic 17) · ×1
  • BurnoutDetectionAgent._parse_agent_response (cyclomatic 17) backend/app/agents/burnout_agent.py:722 — BurnoutDetectionAgent._parse_agent_response has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WorkloadAnalyzerTool._calculate_intensity_metrics (cyclomatic 17) · ×1
  • WorkloadAnalyzerTool._calculate_intensity_metrics (cyclomatic 17) backend/app/agents/tools/workload_analyzer.py:90 — WorkloadAnalyzerTool._calculate_intensity_metrics 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 · jira.jira_oauth_callback_post (cyclomatic 17) · ×1
  • jira.jira_oauth_callback_post (cyclomatic 17) REDACTED:276 — jira.jira_oauth_callback_post has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · jira.get_jira_status (cyclomatic 17) · ×1
  • jira.get_jira_status (cyclomatic 17) REDACTED:532 — jira.get_jira_status 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 · jira.select_jira_workspace (cyclomatic 17) · ×1
  • jira.select_jira_workspace (cyclomatic 17) REDACTED:725 — jira.select_jira_workspace has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · linear.get_linear_status (cyclomatic 17) · ×1
  • linear.get_linear_status (cyclomatic 17) backend/app/api/endpoints/linear.py:359 — linear.get_linear_status 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 · SlackIntegrationOAuth.test_permissions (cyclomatic 17) · ×1
  • SlackIntegrationOAuth.test_permissions (cyclomatic 17) backend/app/auth/integration_oauth.py:267 — SlackIntegrationOAuth.test_permissions has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RootlyAPIClient.extract_on_call_users_from_shifts (cyclomatic 17) · ×1
  • RootlyAPIClient.extract_on_call_users_from_shifts (cyclomatic 17) backend/app/core/rootly_client.py:1707 — RootlyAPIClient.extract_on_call_users_from_shifts has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · demo_analysis_service._load_health_checkins_for_user (cyclomatic 17) · ×1
  • demo_analysis_service._load_health_checkins_for_user (cyclomatic 17) backend/app/services/demo_analysis_service.py:165 — demo_analysis_service._load_health_checkins_for_user has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GitHubCollector._fetch_real_github_data (cyclomatic 17) · ×1
  • GitHubCollector._fetch_real_github_data (cyclomatic 17) backend/app/services/github_collector.py:403 — GitHubCollector._fetch_real_github_data 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 · GitHubMappingService.get_smart_github_data (cyclomatic 17) · ×1
  • GitHubMappingService.get_smart_github_data (cyclomatic 17) backend/app/services/github_mapping_service.py:40 — GitHubMappingService.get_smart_github_data has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SlackCollector._process_mock_messages (cyclomatic 17) · ×1
  • SlackCollector._process_mock_messages (cyclomatic 17) backend/app/services/slack_collector.py:237 — SlackCollector._process_mock_messages has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · slack_collector.parse_structured_slack_messages (cyclomatic 17) · ×1
  • slack_collector.parse_structured_slack_messages (cyclomatic 17) backend/app/services/slack_collector.py:1147 — slack_collector.parse_structured_slack_messages has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnifiedBurnoutAnalyzer._fetch_linear_workload_data (cyclomatic 17) · ×1
  • UnifiedBurnoutAnalyzer._fetch_linear_workload_data (cyclomatic 17) backend/app/services/unified_burnout_analyzer.py:5578 — UnifiedBurnoutAnalyzer._fetch_linear_workload_data has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnifiedBurnoutAnalyzer._calculate_linear_och_contribution (cyclomatic 17) · ×1
  • UnifiedBurnoutAnalyzer._calculate_linear_och_contribution (cyclomatic 17) backend/app/services/unified_burnout_analyzer.py:5811 — UnifiedBurnoutAnalyzer._calculate_linear_och_contribution 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 · page.UnsubscribePage (cyclomatic 17) · ×1
  • page.UnsubscribePage (cyclomatic 17) frontend/src/app/unsubscribe/page.tsx:44 — page.UnsubscribePage has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 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 141, buildReason, handleConfirm, …). 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 · NotificationDrawer.NotificationDrawer (cyclomatic 17) · ×1
  • NotificationDrawer.NotificationDrawer (cyclomatic 17) frontend/src/components/notifications/NotificationDrawer.tsx:15 — NotificationDrawer.NotificationDrawer has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to 2 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 · useDashboard.useDashboard.refreshCurrentAnalysis (cyclomatic 17) · ×1
  • useDashboard.useDashboard.refreshCurrentAnalysis (cyclomatic 17) frontend/src/hooks/useDashboard.ts:2449 — useDashboard.useDashboard.refreshCurrentAnalysis 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 · BurnoutDetectionAgent._prepare_data_summary (cyclomatic 16) · ×1
  • BurnoutDetectionAgent._prepare_data_summary (cyclomatic 16) backend/app/agents/burnout_agent.py:664 — BurnoutDetectionAgent._prepare_data_summary has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BurnoutPredictorTool._detect_early_warnings (cyclomatic 16) · ×1
  • BurnoutPredictorTool._detect_early_warnings (cyclomatic 16) backend/app/agents/tools/burnout_predictor.py:262 — BurnoutPredictorTool._detect_early_warnings has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BurnoutPredictorTool._predict_risk_trajectory (cyclomatic 16) · ×1
  • BurnoutPredictorTool._predict_risk_trajectory (cyclomatic 16) backend/app/agents/tools/burnout_predictor.py:378 — BurnoutPredictorTool._predict_risk_trajectory has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PatternAnalyzerTool._analyze_commit_patterns (cyclomatic 16) · ×1
  • PatternAnalyzerTool._analyze_commit_patterns (cyclomatic 16) backend/app/agents/tools/pattern_analyzer.py:180 — PatternAnalyzerTool._analyze_commit_patterns has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ai_usage.connect (cyclomatic 16) · ×1
  • ai_usage.connect (cyclomatic 16) backend/app/api/endpoints/ai_usage.py:115 — ai_usage.connect has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · analyses.get_member_surveys (cyclomatic 16) · ×1
  • analyses.get_member_surveys (cyclomatic 16) REDACTED:1042 — analyses.get_member_surveys has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · auth.google_callback (cyclomatic 16) · ×1
  • auth.google_callback (cyclomatic 16) REDACTED:176 — auth.google_callback has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (auth.github_callback, auth.okta_callback) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · auth.github_callback (cyclomatic 16) · ×1
  • auth.github_callback (cyclomatic 16) REDACTED:308 — auth.github_callback has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (auth.google_callback, auth.okta_callback) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · auth.okta_callback (cyclomatic 16) · ×1
  • auth.okta_callback (cyclomatic 16) REDACTED:435 — auth.okta_callback has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (auth.google_callback, auth.github_callback) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · github.test_github_integration (cyclomatic 16) · ×1
  • github.test_github_integration (cyclomatic 16) backend/app/api/endpoints/github.py:205 — github.test_github_integration has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · github.connect_github_with_token (cyclomatic 16) · ×1
  • github.connect_github_with_token (cyclomatic 16) backend/app/api/endpoints/github.py:454 — github.connect_github_with_token has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mappings.get_success_rates (cyclomatic 16) · ×1
  • mappings.get_success_rates (cyclomatic 16) backend/app/api/endpoints/mappings.py:300 — mappings.get_success_rates has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PagerDutyAPIClient.get_team_scoped_users (cyclomatic 16) · ×1
  • PagerDutyAPIClient.get_team_scoped_users (cyclomatic 16) backend/app/core/pagerduty_client.py:396 — PagerDutyAPIClient.get_team_scoped_users has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PagerDutyDataCollector.collect_all_data (cyclomatic 16) · ×1
  • PagerDutyDataCollector.collect_all_data (cyclomatic 16) backend/app/core/pagerduty_client.py:1069 — PagerDutyDataCollector.collect_all_data has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PagerDutyDataCollector._extract_priority (cyclomatic 16) · ×1
  • PagerDutyDataCollector._extract_priority (cyclomatic 16) backend/app/core/pagerduty_client.py:1545 — PagerDutyDataCollector._extract_priority has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · EnhancedGitHubMatcher._get_all_org_members_with_profiles (cyclomatic 16) · ×1
  • EnhancedGitHubMatcher._get_all_org_members_with_profiles (cyclomatic 16) backend/app/services/enhanced_github_matcher.py:171 — EnhancedGitHubMatcher._get_all_org_members_with_profiles has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EnhancedGitHubMatcher._match_name_against_members (cyclomatic 16) · ×1
  • EnhancedGitHubMatcher._match_name_against_members (cyclomatic 16) backend/app/services/enhanced_github_matcher.py:246 — EnhancedGitHubMatcher._match_name_against_members has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EnhancedGitHubMatcher._calculate_name_similarity (cyclomatic 16) · ×1
  • EnhancedGitHubMatcher._calculate_name_similarity (cyclomatic 16) backend/app/services/enhanced_github_matcher.py:482 — EnhancedGitHubMatcher._calculate_name_similarity has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · JiraMappingService.auto_map_users (cyclomatic 16) · ×1
  • JiraMappingService.auto_map_users (cyclomatic 16) backend/app/services/jira_mapping_service.py:153 — JiraMappingService.auto_map_users has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LinearMappingService.auto_map_users (cyclomatic 16) · ×1
  • LinearMappingService.auto_map_users (cyclomatic 16) backend/app/services/linear_mapping_service.py:153 — LinearMappingService.auto_map_users has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MappingRecorder.get_mapping_statistics (cyclomatic 16) · ×1
  • MappingRecorder.get_mapping_statistics (cyclomatic 16) backend/app/services/mapping_recorder.py:207 — MappingRecorder.get_mapping_statistics has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnifiedBurnoutAnalyzer._calculate_github_insights (cyclomatic 16) · ×1
  • UnifiedBurnoutAnalyzer._calculate_github_insights (cyclomatic 16) backend/app/services/unified_burnout_analyzer.py:3741 — UnifiedBurnoutAnalyzer._calculate_github_insights has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · load_demo_analyses.main (cyclomatic 16) · ×1
  • load_demo_analyses.main (cyclomatic 16) backend/mock_data_helpers/load_demo_analyses.py:216 — load_demo_analyses.main has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TopPanel.TopPanel (cyclomatic 16) · ×1
  • TopPanel.TopPanel (cyclomatic 16) frontend/src/components/TopPanel.tsx:44 — TopPanel.TopPanel has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 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.
D15 · Churn × Complexity Hotspots · Repeated repair · ×1
  • Repeated repair: backend/migrations/migration_runner.py backend/migrations/migration_runner.py:169 — backend/migrations/migration_runner.py changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is MigrationRunner._parse_sql_statements at line 169), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(security): encrypt OAuth provider tokens at rest (#549)”; “fix: preserve reports and close retention review failure paths”; “fix: address selected demo, team scope, and AI usage review findings”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 11:39:46 -08:00' --until='2026-11-10 11:39:46 -08:00' --full-history --no-merges -- backend/migrations/migration_runner.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D2 · Cognitive Complexity · RootlyAPIClient.get_alerts_count (cognitive 794) · ×1
  • RootlyAPIClient.get_alerts_count (cognitive 794) backend/app/core/rootly_client.py:479 — RootlyAPIClient.get_alerts_count has cognitive complexity 794 (threshold 15). Drivers by points: if/else 146 (609 pts), loops 28 (111 pts), boolean chains 51, ternaries 6 (14 pts), error handling 3 (9 pts) (nesting depth added 560). 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 · analyses.run_analysis_task (cognitive 505) · ×1
  • analyses.run_analysis_task (cognitive 505) REDACTED:3241 — analyses.run_analysis_task has cognitive complexity 505 (threshold 15). Drivers by points: if/else 115 (279 pts), boolean chains 96, ternaries 25 (63 pts), error handling 21 (43 pts), loops 7 (24 pts) (nesting depth added 241). 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 · UnifiedBurnoutAnalyzer._generate_daily_trends (cognitive 470) · ×1
  • UnifiedBurnoutAnalyzer._generate_daily_trends (cognitive 470) backend/app/services/unified_burnout_analyzer.py:4115 — UnifiedBurnoutAnalyzer._generate_daily_trends has cognitive complexity 470 (threshold 15). Drivers by points: if/else 91 (344 pts), loops 20 (43 pts), ternaries 16 (38 pts), boolean chains 34, error handling 4 (11 pts) (nesting depth added 305). 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 · UnifiedBurnoutAnalyzer.analyze_burnout (cognitive 345) · ×1
  • UnifiedBurnoutAnalyzer.analyze_burnout (cognitive 345) backend/app/services/unified_burnout_analyzer.py:228 — UnifiedBurnoutAnalyzer.analyze_burnout has cognitive complexity 345 (threshold 15). Drivers by points: if/else 96 (216 pts), boolean chains 38, ternaries 27 (38 pts), loops 8 (28 pts), error handling 10 (25 pts) (nesting depth added 166). 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 · analyses.get_member_daily_health (cognitive 256) · ×1
  • analyses.get_member_daily_health (cognitive 256) REDACTED:2629 — analyses.get_member_daily_health has cognitive complexity 256 (threshold 15). Drivers by points: if/else 59 (187 pts), loops 13 (39 pts), boolean chains 14, ternaries 5 (10 pts), error handling 1 (6 pts) (nesting depth added 164). 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 · page.DashboardContent (cognitive 200) · ×1
  • page.DashboardContent (cognitive 200) frontend/src/app/dashboard/page.tsx:133 — page.DashboardContent has cognitive complexity 200 (threshold 15). Drivers by points: boolean chains 109, ternaries 27 (57 pts), if/else 27 (34 pts) (nesting depth added 37). Of this number, 110 points are the body's own statements and 90 belong to 33 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 · UnifiedBurnoutAnalyzer._fetch_analysis_data (cognitive 176) · ×1
  • UnifiedBurnoutAnalyzer._fetch_analysis_data (cognitive 176) backend/app/services/unified_burnout_analyzer.py:1184 — UnifiedBurnoutAnalyzer._fetch_analysis_data has cognitive complexity 176 (threshold 15). Drivers by points: if/else 31 (106 pts), ternaries 11 (33 pts), loops 5 (22 pts), boolean chains 10, error handling 3 (5 pts) (nesting depth added 116). 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 · useDashboard.useDashboard (cognitive 161) · ×1
  • useDashboard.useDashboard (cognitive 161) frontend/src/hooks/useDashboard.ts:29 — useDashboard.useDashboard has cognitive complexity 161 (threshold 15). Drivers by points: if/else 58 (109 pts), boolean chains 29, ternaries 8 (14 pts), error handling 3 (6 pts), loops 1 (3 pts) (nesting depth added 62). Most of this is not in the body itself: 3 of the 161 points are its own statements and the rest belongs to 22 function literals inside it that branch (lines 449, 568, 693, …). 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 · slack.handle_slack_interactions (cognitive 134) · ×1
  • slack.handle_slack_interactions (cognitive 134) REDACTED:1511 — slack.handle_slack_interactions has cognitive complexity 134 (threshold 15). Drivers by points: if/else 26 (73 pts), error handling 8 (28 pts), ternaries 7 (23 pts), boolean chains 8, loops 1 (2 pts) (nesting depth added 84). 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 · page.IntegrationsPage (cognitive 130) · ×1
  • page.IntegrationsPage (cognitive 130) REDACTED:179 — page.IntegrationsPage has cognitive complexity 130 (threshold 15). Drivers by points: if/else 151 (232 pts), boolean chains 186, ternaries 87 (137 pts), error handling 24 (31 pts), match/switch 1 (nesting depth added 138). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (page.IntegrationsPage::loadAllIntegrationsAPIBackground) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · SlackCollector._fetch_real_slack_data (cognitive 118) · ×1
  • SlackCollector._fetch_real_slack_data (cognitive 118) backend/app/services/slack_collector.py:608 — SlackCollector._fetch_real_slack_data has cognitive complexity 118 (threshold 15). Drivers by points: if/else 24 (83 pts), loops 5 (24 pts), error handling 2 (4 pts), ternaries 4, boolean chains 3 (nesting depth added 80). 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 · integration-handlers.addIntegration (cognitive 117) · ×1
  • integration-handlers.addIntegration (cognitive 117) frontend/src/app/integrations/handlers/integration-handlers.ts:234 — integration-handlers.addIntegration has cognitive complexity 117 (threshold 15). Drivers by points: if/else 27 (52 pts), ternaries 17 (34 pts), boolean chains 18, error handling 5 (11 pts), loops 1 (2 pts) (nesting depth added 49). Of this number, 107 points are the body's own statements and 10 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 · rootly.get_synced_users (cognitive 107) · ×1
  • rootly.get_synced_users (cognitive 107) backend/app/api/endpoints/rootly.py:1637 — rootly.get_synced_users has cognitive complexity 107 (threshold 15). Drivers by points: if/else 38 (76 pts), boolean chains 12, error handling 5 (11 pts), loops 3 (4 pts), ternaries 2 (4 pts) (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedBurnoutAnalyzer._map_user_incidents (cognitive 100) · ×1
  • UnifiedBurnoutAnalyzer._map_user_incidents (cognitive 100) backend/app/services/unified_burnout_analyzer.py:1632 — UnifiedBurnoutAnalyzer._map_user_incidents has cognitive complexity 100 (threshold 15). Drivers by points: if/else 17 (60 pts), loops 6 (22 pts), boolean chains 15, ternaries 1 (3 pts) (nesting depth added 61). 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 · UnifiedBurnoutAnalyzer._generate_recommendations (cognitive 98) · ×1
  • UnifiedBurnoutAnalyzer._generate_recommendations (cognitive 98) backend/app/services/unified_burnout_analyzer.py:3575 — UnifiedBurnoutAnalyzer._generate_recommendations has cognitive complexity 98 (threshold 15). Drivers by points: if/else 21 (54 pts), error handling 6 (18 pts), boolean chains 11, ternaries 6 (9 pts), loops 3 (6 pts) (nesting depth added 51). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · auto_refresh_scheduler.check_and_run_auto_refresh_analyses (cognitive 97) · ×1
  • auto_refresh_scheduler.check_and_run_auto_refresh_analyses (cognitive 97) backend/app/services/auto_refresh_scheduler.py:54 — auto_refresh_scheduler.check_and_run_auto_refresh_analyses has cognitive complexity 97 (threshold 15). Drivers by points: if/else 30 (63 pts), boolean chains 15, error handling 7 (15 pts), loops 2, ternaries 1 (2 pts) (nesting depth added 42). 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 · analyses.get_historical_trends (cognitive 95) · ×1
  • analyses.get_historical_trends (cognitive 95) REDACTED:1619 — analyses.get_historical_trends has cognitive complexity 95 (threshold 15). Drivers by points: if/else 32 (72 pts), boolean chains 8, ternaries 5 (7 pts), loops 3 (6 pts), error handling 1 (2 pts) (nesting depth added 46). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CrossPlatformCorrelatorTool._analyze_stress_propagation (cognitive 91) · ×1
  • CrossPlatformCorrelatorTool._analyze_stress_propagation (cognitive 91) backend/app/agents/tools/cross_platform_correlator.py:353 — CrossPlatformCorrelatorTool._analyze_stress_propagation has cognitive complexity 91 (threshold 15). Drivers by points: if/else 18 (62 pts), loops 7 (19 pts), boolean chains 10 (nesting depth added 56). 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 · enhanced_slack_collector.collect_team_slack_data_with_mapping (cognitive 90) · ×1
  • enhanced_slack_collector.collect_team_slack_data_with_mapping (cognitive 90) backend/app/services/enhanced_slack_collector.py:11 — enhanced_slack_collector.collect_team_slack_data_with_mapping has cognitive complexity 90 (threshold 15). Drivers by points: if/else 18 (55 pts), ternaries 6 (26 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 58). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · useDashboard.useDashboard.loadIntegrations (cognitive 87) · ×1
  • useDashboard.useDashboard.loadIntegrations (cognitive 87) frontend/src/hooks/useDashboard.ts:1411 — useDashboard.useDashboard.loadIntegrations has cognitive complexity 87 (threshold 15). Drivers by points: if/else 28 (56 pts), boolean chains 16, ternaries 8 (9 pts), error handling 3 (6 pts) (nesting depth added 32). 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 · useDashboard.useDashboard.startAnalysis (cognitive 87) · ×1
  • useDashboard.useDashboard.startAnalysis (cognitive 87) frontend/src/hooks/useDashboard.ts:1866 — useDashboard.useDashboard.startAnalysis has cognitive complexity 87 (threshold 15). Drivers by points: if/else 25 (48 pts), ternaries 6 (21 pts), boolean chains 12, error handling 2 (6 pts) (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DataRetentionSettings.DataRetentionSettings (cognitive 86) · ×1
  • DataRetentionSettings.DataRetentionSettings (cognitive 86) frontend/src/app/management/components/DataRetentionSettings.tsx:22 — DataRetentionSettings.DataRetentionSettings has cognitive complexity 86 (threshold 15). Drivers by points: boolean chains 37, if/else 28 (32 pts), ternaries 11 (14 pts), error handling 3 (nesting depth added 7). Of this number, 40 points are the body's own statements and 46 belong to 8 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 · page.TeamPageContent (cognitive 86) · ×1
  • page.TeamPageContent (cognitive 86) frontend/src/app/management/page.tsx:82 — page.TeamPageContent has cognitive complexity 86 (threshold 15). Drivers by points: boolean chains 147, if/else 110 (124 pts), ternaries 18 (26 pts), error handling 14 (15 pts), loops 2 (nesting depth added 23). 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. This shape REPEATS in the file: 2 other methods here (page.TeamPageContent::parseSyncErrorMessage, page.TeamPageContent::getUserIntegrations) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · TeamHealthOverview.TeamHealthOverview (cognitive 86) · ×1
  • TeamHealthOverview.TeamHealthOverview (cognitive 86) frontend/src/components/dashboard/TeamHealthOverview.tsx:107 — TeamHealthOverview.TeamHealthOverview has cognitive complexity 86 (threshold 15). Drivers by points: boolean chains 31, ternaries 12 (30 pts), if/else 12 (25 pts) (nesting depth added 31). Of this number, 16 points are the body's own statements and 70 belong to 6 function literals inside it that branch. 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 · UnifiedBurnoutAnalyzer._calculate_member_metrics (cognitive 85) · ×1
  • UnifiedBurnoutAnalyzer._calculate_member_metrics (cognitive 85) backend/app/services/unified_burnout_analyzer.py:2346 — UnifiedBurnoutAnalyzer._calculate_member_metrics has cognitive complexity 85 (threshold 15). Drivers by points: if/else 18 (55 pts), ternaries 13 (14 pts), boolean chains 11, loops 3 (5 pts) (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · manual_mappings.run_linear_mapping (cognitive 82) · ×1
  • manual_mappings.run_linear_mapping (cognitive 82) backend/app/api/endpoints/manual_mappings.py:1014 — manual_mappings.run_linear_mapping has cognitive complexity 82 (threshold 15). Drivers by points: if/else 20 (37 pts), ternaries 5 (17 pts), boolean chains 13, error handling 5 (8 pts), loops 5 (7 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RootlyAPIClient.get_incidents (cognitive 80) · ×1
  • RootlyAPIClient.get_incidents (cognitive 80) backend/app/core/rootly_client.py:1857 — RootlyAPIClient.get_incidents has cognitive complexity 80 (threshold 15). Drivers by points: if/else 28 (57 pts), ternaries 3 (13 pts), error handling 3 (5 pts), boolean chains 4, loops 1 (nesting depth added 41). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · manual_mappings.run_jira_mapping (cognitive 77) · ×1
  • manual_mappings.run_jira_mapping (cognitive 77) backend/app/api/endpoints/manual_mappings.py:794 — manual_mappings.run_jira_mapping has cognitive complexity 77 (threshold 15). Drivers by points: if/else 18 (34 pts), ternaries 5 (17 pts), boolean chains 12, error handling 5 (8 pts), loops 4 (6 pts) (nesting depth added 33). 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 · rootly.debug_rootly_incidents (cognitive 76) · ×1
  • rootly.debug_rootly_incidents (cognitive 76) backend/app/api/endpoints/rootly.py:834 — rootly.debug_rootly_incidents has cognitive complexity 76 (threshold 15). Drivers by points: if/else 16 (45 pts), error handling 7 (13 pts), loops 4 (9 pts), boolean chains 6, ternaries 3 (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · UserAlertsCard.UserAlertsCard (cognitive 75) · ×1
  • UserAlertsCard.UserAlertsCard (cognitive 75) frontend/src/components/dashboard/UserAlertsCard.tsx:150 — UserAlertsCard.UserAlertsCard has cognitive complexity 75 (threshold 15). Drivers by points: ternaries 33 (41 pts), boolean chains 31, if/else 3 (nesting depth added 8). Of this number, 61 points are the body's own statements and 14 belong to 14 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 · rootly.get_integration_users (cognitive 72) · ×1
  • rootly.get_integration_users (cognitive 72) backend/app/api/endpoints/rootly.py:1048 — rootly.get_integration_users has cognitive complexity 72 (threshold 15). Drivers by points: if/else 19 (46 pts), loops 4 (10 pts), ternaries 2 (7 pts), boolean chains 6, error handling 3 (nesting depth added 38). 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 · SlackCollector._process_user_messages (cognitive 69) · ×1
  • SlackCollector._process_user_messages (cognitive 69) backend/app/services/slack_collector.py:445 — SlackCollector._process_user_messages has cognitive complexity 69 (threshold 15). Drivers by points: if/else 16 (47 pts), loops 5 (11 pts), ternaries 7, boolean chains 4 (nesting depth added 37). 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 · UserSyncService._sync_users_to_correlation (cognitive 69) · ×1
  • UserSyncService._sync_users_to_correlation (cognitive 69) backend/app/services/user_sync_service.py:369 — UserSyncService._sync_users_to_correlation has cognitive complexity 69 (threshold 15). Drivers by points: if/else 25 (49 pts), ternaries 2 (10 pts), error handling 3 (6 pts), boolean chains 2, loops 2 (nesting depth added 35). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · analysis._run_analysis_task_impl (cognitive 68) · ×1
  • analysis._run_analysis_task_impl (cognitive 68) backend/app/api/endpoints/analysis.py:326 — analysis._run_analysis_task_impl has cognitive complexity 68 (threshold 15). Drivers by points: if/else 24 (43 pts), error handling 7 (15 pts), boolean chains 6, loops 1 (3 pts), ternaries 1 (nesting depth added 29). 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 · mapping-drawer.MappingDrawer (cognitive 67) · ×1
  • mapping-drawer.MappingDrawer (cognitive 67) frontend/src/components/mapping-drawer.tsx:71 — mapping-drawer.MappingDrawer has cognitive complexity 67 (threshold 15). Drivers by points: ternaries 49 (136 pts), if/else 74 (97 pts), boolean chains 76, error handling 10, match/switch 1 (nesting depth added 110). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (mapping-drawer.MappingDrawer::runAutoMapping, mapping-drawer.MappingDrawer::removeMapping, mapping-drawer.MappingDrawer::saveInlineMapping) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · manual_mappings.run_github_mapping (cognitive 66) · ×1
  • manual_mappings.run_github_mapping (cognitive 66) backend/app/api/endpoints/manual_mappings.py:548 — manual_mappings.run_github_mapping has cognitive complexity 66 (threshold 15). Drivers by points: if/else 17 (28 pts), ternaries 4 (14 pts), error handling 6 (10 pts), boolean chains 9, loops 3 (5 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UserObjectiveDataCard.UserObjectiveDataCard (cognitive 64) · ×1
  • UserObjectiveDataCard.UserObjectiveDataCard (cognitive 64) frontend/src/components/dashboard/UserObjectiveDataCard.tsx:207 — UserObjectiveDataCard.UserObjectiveDataCard has cognitive complexity 64 (threshold 15). Drivers by points: boolean chains 34, ternaries 13 (15 pts), if/else 9 (14 pts), error handling 1 (nesting depth added 7). Of this number, 21 points are the body's own statements and 43 belong to 8 function literals 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 · enhanced_github_collector.collect_team_github_data_with_mapping (cognitive 62) · ×1
  • enhanced_github_collector.collect_team_github_data_with_mapping (cognitive 62) backend/app/services/enhanced_github_collector.py:17 — enhanced_github_collector.collect_team_github_data_with_mapping has cognitive complexity 62 (threshold 15). Drivers by points: if/else 23 (45 pts), error handling 3 (6 pts), boolean chains 5, loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedBurnoutAnalyzer._recalculate_burnout_with_github (cognitive 62) · ×1
  • UnifiedBurnoutAnalyzer._recalculate_burnout_with_github (cognitive 62) backend/app/services/unified_burnout_analyzer.py:5011 — UnifiedBurnoutAnalyzer._recalculate_burnout_with_github has cognitive complexity 62 (threshold 15). Drivers by points: ternaries 15 (37 pts), boolean chains 12, if/else 6 (11 pts), error handling 1, loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedBurnoutAnalyzer._enhance_metrics_with_github_data (cognitive 61) · ×1
  • UnifiedBurnoutAnalyzer._enhance_metrics_with_github_data (cognitive 61) backend/app/services/unified_burnout_analyzer.py:2511 — UnifiedBurnoutAnalyzer._enhance_metrics_with_github_data has cognitive complexity 61 (threshold 15). Drivers by points: if/else 23 (44 pts), ternaries 3 (9 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 30). 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_demo_analyses.main (cognitive 60) · ×1
  • manage_demo_analyses.main (cognitive 60) backend/mock_data_helpers/manage_demo_analyses.py:322 — manage_demo_analyses.main has cognitive complexity 60 (threshold 15). Drivers by points: if/else 25 (45 pts), loops 2 (6 pts), ternaries 3 (5 pts), boolean chains 3, error handling 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedBurnoutAnalyzer._analyze_member_burnout (cognitive 59) · ×1
  • UnifiedBurnoutAnalyzer._analyze_member_burnout (cognitive 59) backend/app/services/unified_burnout_analyzer.py:1722 — UnifiedBurnoutAnalyzer._analyze_member_burnout has cognitive complexity 59 (threshold 15). Drivers by points: if/else 32 (41 pts), boolean chains 12, ternaries 4 (5 pts), loops 1 (nesting depth added 10). 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 · UserMappingDrawer.UserMappingDrawer (cognitive 59) · ×1
  • UserMappingDrawer.UserMappingDrawer (cognitive 59) frontend/src/app/management/components/UserMappingDrawer.tsx:45 — UserMappingDrawer.UserMappingDrawer has cognitive complexity 59 (threshold 15). Drivers by points: boolean chains 32, if/else 21 (22 pts), error handling 5 (nesting depth added 1). Of this number, 24 points are the body's own statements and 35 belong to 19 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 · ObjectiveDataCard.ObjectiveDataCard (cognitive 59) · ×1
  • ObjectiveDataCard.ObjectiveDataCard (cognitive 59) frontend/src/components/dashboard/ObjectiveDataCard.tsx:322 — ObjectiveDataCard.ObjectiveDataCard has cognitive complexity 59 (threshold 15). Drivers by points: boolean chains 28, ternaries 11 (22 pts), if/else 5 (9 pts) (nesting depth added 15). Of this number, 29 points are the body's own statements and 30 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 · och_config.generate_och_score_reasoning (cognitive 58) · ×1
  • och_config.generate_och_score_reasoning (cognitive 58) backend/app/core/och_config.py:372 — och_config.generate_och_score_reasoning has cognitive complexity 58 (threshold 15). Drivers by points: if/else 21 (44 pts), loops 4 (8 pts), ternaries 2 (6 pts) (nesting depth added 31). 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 · jira.test_jira_integration (cognitive 56) · ×1
  • jira.test_jira_integration (cognitive 56) REDACTED:898 — jira.test_jira_integration has cognitive complexity 56 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 16, loops 6 (8 pts), ternaries 3 (7 pts), error handling 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UserSyncService._merge_duplicate_correlations (cognitive 56) · ×1
  • UserSyncService._merge_duplicate_correlations (cognitive 56) backend/app/services/user_sync_service.py:729 — UserSyncService._merge_duplicate_correlations has cognitive complexity 56 (threshold 15). Drivers by points: if/else 15 (35 pts), boolean chains 8, loops 3 (7 pts), error handling 1 (4 pts), ternaries 1 (2 pts) (nesting depth added 28). 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 · OrganizationManagementDialog.OrganizationManagementDialog (cognitive 56) · ×1
  • OrganizationManagementDialog.OrganizationManagementDialog (cognitive 56) frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:82 — OrganizationManagementDialog.OrganizationManagementDialog has cognitive complexity 56 (threshold 15). Drivers by points: boolean chains 33, if/else 15 (18 pts), error handling 4, ternaries 1 (nesting depth added 3). Of this number, 24 points are the body's own statements and 32 belong to 9 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 · retention_preview.build_retention_preview (cognitive 55) · ×1
  • retention_preview.build_retention_preview (cognitive 55) backend/app/services/retention_preview.py:254 — retention_preview.build_retention_preview has cognitive complexity 55 (threshold 15). Drivers by points: if/else 21 (38 pts), boolean chains 8, ternaries 5, loops 3 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RootlyIntegrationForm.RootlyIntegrationForm (cognitive 54) · ×1
  • RootlyIntegrationForm.RootlyIntegrationForm (cognitive 54) frontend/src/app/integrations/components/RootlyIntegrationForm.tsx:30 — RootlyIntegrationForm.RootlyIntegrationForm has cognitive complexity 54 (threshold 15). Drivers by points: boolean chains 33, if/else 12 (14 pts), ternaries 5 (6 pts), error handling 1 (nesting depth added 3). Of this number, 32 points are the body's own statements and 22 belong to 11 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 · AccountSettingsDialog.AccountSettingsDialog (cognitive 54) · ×1
  • AccountSettingsDialog.AccountSettingsDialog (cognitive 54) frontend/src/components/AccountSettingsDialog.tsx:38 — AccountSettingsDialog.AccountSettingsDialog has cognitive complexity 54 (threshold 15). Drivers by points: boolean chains 17, ternaries 9 (16 pts), if/else 14 (15 pts), error handling 6 (nesting depth added 8). Of this number, 17 points are the body's own statements and 37 belong to 9 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 · slack.slack_oauth_callback (cognitive 53) · ×1
  • slack.slack_oauth_callback (cognitive 53) REDACTED:207 — slack.slack_oauth_callback has cognitive complexity 53 (threshold 15). Drivers by points: if/else 25 (31 pts), boolean chains 12, ternaries 6, error handling 3 (4 pts) (nesting depth added 7). 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 · AIBurnoutAnalyzerService._prepare_comprehensive_team_data (cognitive 53) · ×1
  • AIBurnoutAnalyzerService._prepare_comprehensive_team_data (cognitive 53) backend/app/services/ai_burnout_analyzer.py:1142 — AIBurnoutAnalyzerService._prepare_comprehensive_team_data has cognitive complexity 53 (threshold 15). Drivers by points: if/else 24 (32 pts), ternaries 11 (18 pts), loops 2, boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · github-integration-card.GitHubIntegrationCard (cognitive 53) · ×1
  • github-integration-card.GitHubIntegrationCard (cognitive 53) frontend/src/components/integrations/github-integration-card.tsx:57 — github-integration-card.GitHubIntegrationCard has cognitive complexity 53 (threshold 15). Drivers by points: ternaries 16 (36 pts), boolean chains 10, error handling 4, if/else 3 (nesting depth added 20). Of this number, 28 points are the body's own statements and 25 belong to 7 function items inside it that branch. 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 · useDashboard.useDashboard.runAnalysisWithTimeRange · ×1
  • useDashboard.useDashboard.runAnalysisWithTimeRange::pollAnalysis (cognitive 53) frontend/src/hooks/useDashboard.ts:2204 — useDashboard.useDashboard.runAnalysisWithTimeRange::pollAnalysis has cognitive complexity 53 (threshold 15). Drivers by points: if/else 27 (45 pts), boolean chains 6, error handling 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (useDashboard.useDashboard.runAnalysisWithTimeRange) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · analyses.get_analysis_github_commits_timeline (cognitive 52) · ×1
  • analyses.get_analysis_github_commits_timeline (cognitive 52) REDACTED:2310 — analyses.get_analysis_github_commits_timeline has cognitive complexity 52 (threshold 15). Drivers by points: if/else 20 (35 pts), boolean chains 8, loops 6 (8 pts), ternaries 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GitHubCollector.fetch_daily_commit_data (cognitive 51) · ×1
  • GitHubCollector.fetch_daily_commit_data (cognitive 51) backend/app/services/github_collector.py:525 — GitHubCollector.fetch_daily_commit_data has cognitive complexity 51 (threshold 15). Drivers by points: if/else 13 (39 pts), error handling 2 (6 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · github_collector.collect_team_github_data (cognitive 50) · ×1
  • github_collector.collect_team_github_data (cognitive 50) backend/app/services/github_collector.py:1185 — github_collector.collect_team_github_data has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (28 pts), error handling 6 (14 pts), ternaries 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ai_usage_collector.fetch_anthropic_usage (cognitive 48) · ×1
  • ai_usage_collector.fetch_anthropic_usage (cognitive 48) backend/app/services/ai_usage_collector.py:231 — ai_usage_collector.fetch_anthropic_usage has cognitive complexity 48 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 5 (13 pts), boolean chains 10, error handling 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SlackCollector._fetch_all_slack_messages (cognitive 48) · ×1
  • SlackCollector._fetch_all_slack_messages (cognitive 48) backend/app/services/slack_collector.py:332 — SlackCollector._fetch_all_slack_messages has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (35 pts), loops 2 (7 pts), error handling 2 (5 pts), boolean chains 1 (nesting depth added 31). 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 · SlackSurveyTabs.SlackSurveyTabs (cognitive 48) · ×1
  • SlackSurveyTabs.SlackSurveyTabs (cognitive 48) frontend/src/components/SlackSurveyTabs.tsx:43 — SlackSurveyTabs.SlackSurveyTabs has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 41, if/else 29 (37 pts), ternaries 19 (31 pts), error handling 5 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (SlackSurveyTabs.SlackSurveyTabs::loadSchedule) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · surveys.create_or_update_survey_schedule (cognitive 46) · ×1
  • surveys.create_or_update_survey_schedule (cognitive 46) backend/app/api/endpoints/surveys.py:121 — surveys.create_or_update_survey_schedule has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (30 pts), ternaries 6 (9 pts), error handling 3 (5 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PagerDutyAPIClient.get_analytics_incidents (cognitive 46) · ×1
  • PagerDutyAPIClient.get_analytics_incidents (cognitive 46) backend/app/core/pagerduty_client.py:457 — PagerDutyAPIClient.get_analytics_incidents has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 9, error handling 4, ternaries 2 (3 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InvitationAcceptanceModal.InvitationAcceptanceModal (cognitive 46) · ×1
  • InvitationAcceptanceModal.InvitationAcceptanceModal (cognitive 46) frontend/src/components/InvitationAcceptanceModal.tsx:30 — InvitationAcceptanceModal.InvitationAcceptanceModal has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (18 pts), ternaries 5 (14 pts), boolean chains 11, error handling 3 (nesting depth added 12). Of this number, 17 points are the body's own statements and 29 belong to 5 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 · rootly.sync_integration_users (cognitive 45) · ×1
  • rootly.sync_integration_users (cognitive 45) backend/app/api/endpoints/rootly.py:1296 — rootly.sync_integration_users has cognitive complexity 45 (threshold 15). Drivers by points: if/else 20 (33 pts), error handling 4, ternaries 2 (4 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SurveyScheduler._send_organization_surveys (cognitive 45) · ×1
  • SurveyScheduler._send_organization_surveys (cognitive 45) backend/app/services/survey_scheduler.py:744 — SurveyScheduler._send_organization_surveys has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (26 pts), error handling 5 (12 pts), boolean chains 3, ternaries 2 (3 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDashboard.useDashboard.loadPreviousAnalyses (cognitive 45) · ×1
  • useDashboard.useDashboard.loadPreviousAnalyses (cognitive 45) frontend/src/hooks/useDashboard.ts:823 — useDashboard.useDashboard.loadPreviousAnalyses has cognitive complexity 45 (threshold 15). Drivers by points: if/else 21 (31 pts), boolean chains 9, error handling 3 (4 pts), ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MemberDetailModal.IndividualDailyHealthChart (cognitive 44) · ×1
  • MemberDetailModal.IndividualDailyHealthChart (cognitive 44) frontend/src/components/dashboard/MemberDetailModal.tsx:59 — MemberDetailModal.IndividualDailyHealthChart has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 10 (26 pts), if/else 8 (9 pts), boolean chains 8, error handling 1 (nesting depth added 17). Most of this is not in the body itself: 4 of the 44 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 95, 69, 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 · AlertsCountCard.AlertsCountCard (cognitive 42) · ×1
  • AlertsCountCard.AlertsCountCard (cognitive 42) frontend/src/components/dashboard/AlertsCountCard.tsx:623 — AlertsCountCard.AlertsCountCard has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 23, ternaries 16 (17 pts), if/else 2 (nesting depth added 1). Of this number, 39 points are the body's own statements and 3 belong to 3 function literals 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 · useDashboard.useDashboard.startPollingAnalysis · ×1
  • useDashboard.useDashboard.startPollingAnalysis::pollAnalysis (cognitive 42) frontend/src/hooks/useDashboard.ts:271 — useDashboard.useDashboard.startPollingAnalysis::pollAnalysis has cognitive complexity 42 (threshold 15). Drivers by points: if/else 22 (38 pts), boolean chains 2, error handling 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · analyses._generate_daily_tooltip (cognitive 41) · ×1
  • analyses._generate_daily_tooltip (cognitive 41) REDACTED:2543 — analyses._generate_daily_tooltip has cognitive complexity 41 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 7, loops 3 (5 pts), ternaries 2 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ai_usage_collector.fetch_openai_usage_per_user (cognitive 41) · ×1
  • ai_usage_collector.fetch_openai_usage_per_user (cognitive 41) backend/app/services/ai_usage_collector.py:150 — ai_usage_collector.fetch_openai_usage_per_user has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 8, loops 4 (8 pts), error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · slack_collector.process_slack_messages_with_name_correlation (cognitive 41) · ×1
  • slack_collector.process_slack_messages_with_name_correlation (cognitive 41) backend/app/services/slack_collector.py:1032 — slack_collector.process_slack_messages_with_name_correlation has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (24 pts), ternaries 4 (8 pts), error handling 1 (4 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SurveyScheduler._send_follow_up_reminders (cognitive 41) · ×1
  • SurveyScheduler._send_follow_up_reminders (cognitive 41) backend/app/services/survey_scheduler.py:392 — SurveyScheduler._send_follow_up_reminders has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (31 pts), boolean chains 6, error handling 2 (3 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · jira-mapping-grid.JiraMapppingGrid (cognitive 41) · ×1
  • jira-mapping-grid.JiraMapppingGrid (cognitive 41) frontend/src/components/jira-mapping-grid.tsx:45 — jira-mapping-grid.JiraMapppingGrid has cognitive complexity 41 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 10, ternaries 4 (6 pts), error handling 4 (nesting depth added 5). Most of this is not in the body itself: 2 of the 41 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 74, createMapping, a function literal at line 280, …). 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 · analyses.verify_analysis_consistency (cognitive 40) · ×1
  • analyses.verify_analysis_consistency (cognitive 40) REDACTED:1431 — analyses.verify_analysis_consistency has cognitive complexity 40 (threshold 15). Drivers by points: if/else 20 (29 pts), loops 2 (4 pts), boolean chains 3, ternaries 3, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · team-handlers.syncUsersToCorrelation (cognitive 40) · ×1
  • team-handlers.syncUsersToCorrelation (cognitive 40) frontend/src/app/integrations/handlers/team-handlers.ts:60 — team-handlers.syncUsersToCorrelation has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 5, ternaries 2 (4 pts), error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MemberDetailModal.MemberDetailModal (cognitive 40) · ×1
  • MemberDetailModal.MemberDetailModal (cognitive 40) frontend/src/components/dashboard/MemberDetailModal.tsx:288 — MemberDetailModal.MemberDetailModal has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 31, if/else 6 (8 pts), error handling 1 (nesting depth added 2). Of this number, 28 points are the body's own statements and 12 belong to 7 function literals 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 · CrossPlatformCorrelatorTool._analyze_temporal_patterns (cognitive 39) · ×1
  • CrossPlatformCorrelatorTool._analyze_temporal_patterns (cognitive 39) backend/app/agents/tools/cross_platform_correlator.py:244 — CrossPlatformCorrelatorTool._analyze_temporal_patterns has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 9, loops 5 (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 · TrendsCard.TrendsCard (cognitive 39) · ×1
  • TrendsCard.TrendsCard (cognitive 39) frontend/src/components/dashboard/TrendsCard.tsx:54 — TrendsCard.TrendsCard has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 9 (25 pts), boolean chains 11, if/else 1 (3 pts) (nesting depth added 18). Most of this is not in the body itself: 12 of the 39 points are its own statements and the rest belongs to one function literal inside it that branches (line 147). 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 · UserIncidentCard.UserIncidentCard (cognitive 39) · ×1
  • UserIncidentCard.UserIncidentCard (cognitive 39) frontend/src/components/dashboard/UserIncidentCard.tsx:150 — UserIncidentCard.UserIncidentCard has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 32, if/else 6 (7 pts) (nesting depth added 1). Of this number, 25 points are the body's own statements and 14 belong to 6 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 · slack.handle_oncall_health_command (cognitive 38) · ×1
  • slack.handle_oncall_health_command (cognitive 38) REDACTED:1298 — slack.handle_oncall_health_command has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (32 pts), error handling 3 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · JiraUserSyncService._sync_users_to_correlation (cognitive 38) · ×1
  • JiraUserSyncService._sync_users_to_correlation (cognitive 38) backend/app/services/jira_user_sync_service.py:173 — JiraUserSyncService._sync_users_to_correlation has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (31 pts), boolean chains 4, error handling 1, loops 1, ternaries 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · analyses.regenerate_analysis_trends (cognitive 37) · ×1
  • analyses.regenerate_analysis_trends (cognitive 37) REDACTED:1271 — analyses.regenerate_analysis_trends has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (20 pts), ternaries 4 (7 pts), boolean chains 4, error handling 2 (3 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PagerDutyAPIClient._get_complete_incidents (cognitive 37) · ×1
  • PagerDutyAPIClient._get_complete_incidents (cognitive 37) backend/app/core/pagerduty_client.py:720 — PagerDutyAPIClient._get_complete_incidents has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (25 pts), boolean chains 5, loops 3 (4 pts), error handling 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedBurnoutAnalyzer._analyze_team_data (cognitive 37) · ×1
  • UnifiedBurnoutAnalyzer._analyze_team_data (cognitive 37) backend/app/services/unified_burnout_analyzer.py:1549 — UnifiedBurnoutAnalyzer._analyze_team_data has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 11, ternaries 4 (9 pts), loops 3 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · weekly_digest_service.check_and_send_weekly_digests (cognitive 37) · ×1
  • weekly_digest_service.check_and_send_weekly_digests (cognitive 37) backend/app/services/weekly_digest_service.py:902 — weekly_digest_service.check_and_send_weekly_digests has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (26 pts), error handling 3 (6 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · retention_demo._assert_fixture_only (cognitive 37) · ×1
  • retention_demo._assert_fixture_only (cognitive 37) backend/scripts/retention_demo.py:216 — retention_demo._assert_fixture_only has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 9, loops 2 (3 pts), ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · github-handlers.handleGitHubTest (cognitive 37) · ×1
  • github-handlers.handleGitHubTest (cognitive 37) frontend/src/app/integrations/handlers/github-handlers.ts:128 — github-handlers.handleGitHubTest has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · team-handlers.fetchSyncedUsers (cognitive 37) · ×1
  • team-handlers.fetchSyncedUsers (cognitive 37) frontend/src/app/integrations/handlers/team-handlers.ts:234 — team-handlers.fetchSyncedUsers has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 7, ternaries 2 (3 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AlertsCountCard.AlertBreakdownChart (cognitive 37) · ×1
  • AlertsCountCard.AlertBreakdownChart (cognitive 37) frontend/src/components/dashboard/AlertsCountCard.tsx:264 — AlertsCountCard.AlertBreakdownChart has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 16 (21 pts), boolean chains 13, if/else 3 (nesting depth added 5). Of this number, 26 points are the body's own statements and 11 belong to 13 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 · useDashboard.useDashboard.selectDefaultAnalysis (cognitive 37) · ×1
  • useDashboard.useDashboard.selectDefaultAnalysis (cognitive 37) frontend/src/hooks/useDashboard.ts:1138 — useDashboard.useDashboard.selectDefaultAnalysis has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 9, loops 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDashboard.useDashboard.runAnalysisWithTimeRange (cognitive 37) · ×1
  • useDashboard.useDashboard.runAnalysisWithTimeRange (cognitive 37) frontend/src/hooks/useDashboard.ts:2027 — useDashboard.useDashboard.runAnalysisWithTimeRange has cognitive complexity 37 (threshold 15). Drivers by points: if/else 43 (72 pts), boolean chains 12, ternaries 8 (9 pts), error handling 7 (8 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (useDashboard.useDashboard.runAnalysisWithTimeRange::pollAnalysis) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · manual_mappings.cleanup_duplicate_mappings (cognitive 36) · ×1
  • manual_mappings.cleanup_duplicate_mappings (cognitive 36) backend/app/api/endpoints/manual_mappings.py:377 — manual_mappings.cleanup_duplicate_mappings has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 8 (12 pts), ternaries 4 (8 pts), boolean chains 1, error handling 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · data_retention.update_retention_policy (cognitive 36) · ×1
  • data_retention.update_retention_policy (cognitive 36) backend/app/services/data_retention.py:130 — data_retention.update_retention_policy has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 10, ternaries 4 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EnhancedGitHubMatcher._get_all_org_members_with_profiles (cognitive 36) · ×1
  • EnhancedGitHubMatcher._get_all_org_members_with_profiles (cognitive 36) backend/app/services/enhanced_github_matcher.py:171 — EnhancedGitHubMatcher._get_all_org_members_with_profiles has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (6 pts), ternaries 1 (5 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedBurnoutAnalyzer._enhance_metrics_with_slack_data (cognitive 36) · ×1
  • UnifiedBurnoutAnalyzer._enhance_metrics_with_slack_data (cognitive 36) backend/app/services/unified_burnout_analyzer.py:2652 — UnifiedBurnoutAnalyzer._enhance_metrics_with_slack_data has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (30 pts), boolean chains 2, loops 1 (2 pts), ternaries 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · llm.store_llm_token (cognitive 35) · ×1
  • llm.store_llm_token (cognitive 35) backend/app/api/endpoints/llm.py:57 — llm.store_llm_token has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (18 pts), error handling 5 (8 pts), ternaries 3 (6 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedBurnoutAnalyzer.calculate_individual_daily_health (cognitive 35) · ×1
  • UnifiedBurnoutAnalyzer.calculate_individual_daily_health (cognitive 35) backend/app/services/unified_burnout_analyzer.py:6019 — UnifiedBurnoutAnalyzer.calculate_individual_daily_health has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 18, if/else 8, ternaries 4 (8 pts), error handling 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 · PagerDutyDataCollector._normalize_with_enhanced_assignment_extraction (cognitive 34) · ×1
  • PagerDutyDataCollector._normalize_with_enhanced_assignment_extraction (cognitive 34) backend/app/core/pagerduty_client.py:1308 — PagerDutyDataCollector._normalize_with_enhanced_assignment_extraction has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 7 (13 pts), boolean chains 4, loops 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedBurnoutAnalyzer._calculate_team_health (cognitive 34) · ×1
  • UnifiedBurnoutAnalyzer._calculate_team_health (cognitive 34) backend/app/services/unified_burnout_analyzer.py:3418 — UnifiedBurnoutAnalyzer._calculate_team_health has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 6, ternaries 3 (4 pts), 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 · UnifiedBurnoutAnalyzer._calculate_individual_daily_health_score (cognitive 34) · ×1
  • UnifiedBurnoutAnalyzer._calculate_individual_daily_health_score (cognitive 34) backend/app/services/unified_burnout_analyzer.py:4842 — UnifiedBurnoutAnalyzer._calculate_individual_daily_health_score has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (20 pts), ternaries 5 (9 pts), boolean chains 2, error handling 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UserSyncService._match_jira_users (cognitive 34) · ×1
  • UserSyncService._match_jira_users (cognitive 34) backend/app/services/user_sync_service.py:1364 — UserSyncService._match_jira_users has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (27 pts), loops 2 (4 pts), boolean chains 2, error handling 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · organization-handlers.handleInvite (cognitive 34) · ×1
  • organization-handlers.handleInvite (cognitive 34) frontend/src/app/integrations/handlers/organization-handlers.ts:7 — organization-handlers.handleInvite has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 6, error handling 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · slack-integration-card.SlackIntegrationCard (cognitive 34) · ×1
  • slack-integration-card.SlackIntegrationCard (cognitive 34) frontend/src/components/integrations/slack-integration-card.tsx:56 — slack-integration-card.SlackIntegrationCard has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 12 (23 pts), boolean chains 5, error handling 4, if/else 2 (nesting depth added 11). Of this number, 20 points are the body's own statements and 14 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 · useDashboard.useDashboard.loadSpecificAnalysis (cognitive 34) · ×1
  • useDashboard.useDashboard.loadSpecificAnalysis (cognitive 34) frontend/src/hooks/useDashboard.ts:1008 — useDashboard.useDashboard.loadSpecificAnalysis has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (25 pts), error handling 2 (4 pts), boolean chains 3, ternaries 2 (nesting depth added 14). Of this number, 30 points are the body's own statements and 4 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 · UnifiedBurnoutAnalyzer._fetch_jira_workload_data (cognitive 33) · ×1
  • UnifiedBurnoutAnalyzer._fetch_jira_workload_data (cognitive 33) backend/app/services/unified_burnout_analyzer.py:5161 — UnifiedBurnoutAnalyzer._fetch_jira_workload_data has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 9, error handling 3 (5 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManualSurveyDeliveryModal.ManualSurveyDeliveryModal (cognitive 33) · ×1
  • ManualSurveyDeliveryModal.ManualSurveyDeliveryModal (cognitive 33) frontend/src/components/ManualSurveyDeliveryModal.tsx:44 — ManualSurveyDeliveryModal.ManualSurveyDeliveryModal has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 16, if/else 10, ternaries 3 (5 pts), error handling 2 (nesting depth added 2). Most of this is not in the body itself: 15 of the 33 points are its own statements and the rest belongs to 6 function items inside it that branch (fetchPreview, confirmDelivery, a function literal at line 58, …). 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 · manual_mappings.run_openai_mapping (cognitive 32) · ×1
  • manual_mappings.run_openai_mapping (cognitive 32) backend/app/api/endpoints/manual_mappings.py:1262 — manual_mappings.run_openai_mapping has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 4 (7 pts), boolean chains 4, ternaries 2 (3 pts), error handling 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PagerDutyDataCollector._normalize_analytics_incidents (cognitive 32) · ×1
  • PagerDutyDataCollector._normalize_analytics_incidents (cognitive 32) backend/app/core/pagerduty_client.py:1183 — PagerDutyDataCollector._normalize_analytics_incidents has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 14, if/else 4 (9 pts), ternaries 4 (7 pts), loops 2 (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 · UnifiedBurnoutAnalyzer._enhance_metrics_with_jira_data (cognitive 32) · ×1
  • UnifiedBurnoutAnalyzer._enhance_metrics_with_jira_data (cognitive 32) backend/app/services/unified_burnout_analyzer.py:2786 — UnifiedBurnoutAnalyzer._enhance_metrics_with_jira_data has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (26 pts), error handling 1 (4 pts), loops 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · githubMetricUtils.getVulnerabilityTags (cognitive 32) · ×1
  • githubMetricUtils.getVulnerabilityTags (cognitive 32) frontend/src/lib/githubMetricUtils.ts:113 — githubMetricUtils.getVulnerabilityTags has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 6, 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. This shape REPEATS in the file: one other method here (githubMetricUtils.getAllVulnerabilityTags) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · githubMetricUtils.getAllVulnerabilityTags (cognitive 32) · ×1
  • githubMetricUtils.getAllVulnerabilityTags (cognitive 32) frontend/src/lib/githubMetricUtils.ts:199 — githubMetricUtils.getAllVulnerabilityTags has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 6, 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. This shape REPEATS in the file: one other method here (githubMetricUtils.getVulnerabilityTags) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · demo_analysis_service._load_health_checkins_for_user (cognitive 31) · ×1
  • demo_analysis_service._load_health_checkins_for_user (cognitive 31) backend/app/services/demo_analysis_service.py:165 — demo_analysis_service._load_health_checkins_for_user has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (18 pts), error handling 5 (10 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UserSyncService._match_slack_users (cognitive 31) · ×1
  • UserSyncService._match_slack_users (cognitive 31) backend/app/services/user_sync_service.py:1195 — UserSyncService._match_slack_users has cognitive complexity 31 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · integration-handlers.testConnection (cognitive 31) · ×1
  • integration-handlers.testConnection (cognitive 31) frontend/src/app/integrations/handlers/integration-handlers.ts:11 — integration-handlers.testConnection has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 13, error handling 1, ternaries 1 (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 · BurnoutFactorsV0.BurnoutFactorsV0 (cognitive 31) · ×1
  • BurnoutFactorsV0.BurnoutFactorsV0 (cognitive 31) frontend/src/components/BurnoutFactorsV0.tsx:14 — BurnoutFactorsV0.BurnoutFactorsV0 has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 8, ternaries 2 (6 pts) (nesting depth added 12). Most of this is not in the body itself: 7 of the 31 points are its own statements and the rest belongs to one function literal inside it that branches (line 23). 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 · RootlyAPIClient.test_connection (cognitive 30) · ×1
  • RootlyAPIClient.test_connection (cognitive 30) backend/app/core/rootly_client.py:229 — RootlyAPIClient.test_connection has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 4, error handling 2 (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 · ai_usage_collector.fetch_openai_usage (cognitive 30) · ×1
  • ai_usage_collector.fetch_openai_usage (cognitive 30) backend/app/services/ai_usage_collector.py:49 — ai_usage_collector.fetch_openai_usage has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (8 pts), boolean chains 7, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EnhancedJiraMatcher.match_email_to_jira (cognitive 30) · ×1
  • EnhancedJiraMatcher.match_email_to_jira (cognitive 30) backend/app/services/enhanced_jira_matcher.py:29 — EnhancedJiraMatcher.match_email_to_jira has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 7, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EnhancedLinearMatcher.match_email_to_linear (cognitive 30) · ×1
  • EnhancedLinearMatcher.match_email_to_linear (cognitive 30) backend/app/services/enhanced_linear_matcher.py:29 — EnhancedLinearMatcher.match_email_to_linear has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 7, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SurveyScheduler._get_survey_recipients (cognitive 30) · ×1
  • SurveyScheduler._get_survey_recipients (cognitive 30) backend/app/services/survey_scheduler.py:951 — SurveyScheduler._get_survey_recipients has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 6, ternaries 2 (4 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedBurnoutAnalyzer._correlate_jira_data (cognitive 30) · ×1
  • UnifiedBurnoutAnalyzer._correlate_jira_data (cognitive 30) backend/app/services/unified_burnout_analyzer.py:5281 — UnifiedBurnoutAnalyzer._correlate_jira_data has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 3, loops 2 (3 pts), error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · check_migrations.extract_last_sql_file (cognitive 30) · ×1
  • check_migrations.extract_last_sql_file (cognitive 30) backend/migrations/check_migrations.py:15 — check_migrations.extract_last_sql_file has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 4 (10 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BurnoutDetectionAgent._comprehensive_analysis (cognitive 29) · ×1
  • BurnoutDetectionAgent._comprehensive_analysis (cognitive 29) backend/app/agents/burnout_agent.py:259 — BurnoutDetectionAgent._comprehensive_analysis has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 8 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · jira.auto_map_jira_users (cognitive 29) · ×1
  • jira.auto_map_jira_users (cognitive 29) REDACTED:1105 — jira.auto_map_jira_users has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 10, loops 2 (3 pts), error handling 2, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · mappings.validate_github_username (cognitive 29) · ×1
  • mappings.validate_github_username (cognitive 29) backend/app/api/endpoints/mappings.py:553 — mappings.validate_github_username has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 2 (7 pts), error handling 3 (6 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PagerDutyAPIClient.get_incidents (cognitive 29) · ×1
  • PagerDutyAPIClient.get_incidents (cognitive 29) backend/app/core/pagerduty_client.py:619 — PagerDutyAPIClient.get_incidents has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 8 (10 pts), boolean chains 4, error handling 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · security.security_middleware (cognitive 29) · ×1
  • security.security_middleware (cognitive 29) backend/app/middleware/security.py:85 — security.security_middleware has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 4, error handling 2 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedBurnoutAnalyzer._calculate_confidence_intervals (cognitive 29) · ×1
  • UnifiedBurnoutAnalyzer._calculate_confidence_intervals (cognitive 29) backend/app/services/unified_burnout_analyzer.py:2882 — UnifiedBurnoutAnalyzer._calculate_confidence_intervals has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (15 pts), ternaries 6 (7 pts), error handling 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · UserSyncService._match_linear_users (cognitive 29) · ×1
  • UserSyncService._match_linear_users (cognitive 29) backend/app/services/user_sync_service.py:1495 — UserSyncService._match_linear_users has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 4, loops 2, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · user-mapping-handlers.updateUserCorrelation (cognitive 29) · ×1
  • user-mapping-handlers.updateUserCorrelation (cognitive 29) frontend/src/app/management/handlers/user-mapping-handlers.ts:7 — user-mapping-handlers.updateUserCorrelation has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, error handling 2 (4 pts), match/switch 1 (3 pts), ternaries 1 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TeamMembersList.calculateUserTrend (cognitive 29) · ×1
  • TeamMembersList.calculateUserTrend (cognitive 29) frontend/src/components/dashboard/TeamMembersList.tsx:61 — TeamMembersList.calculateUserTrend has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19 (21 pts), ternaries 3 (4 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · jira-integration-card.JiraIntegrationCard (cognitive 29) · ×1
  • jira-integration-card.JiraIntegrationCard (cognitive 29) frontend/src/components/integrations/jira-integration-card.tsx:66 — jira-integration-card.JiraIntegrationCard has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 8 (15 pts), boolean chains 9, error handling 3, if/else 2 (nesting depth added 7). Most of this is not in the body itself: 13 of the 29 points are its own statements and the rest belongs to 5 function items inside it that branch (handleConnect, handleDisconnect, handleTest, …). 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 · linear._process_callback (cognitive 28) · ×1
  • linear._process_callback (cognitive 28) backend/app/api/endpoints/linear.py:128 — linear._process_callback has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (16 pts), error handling 5 (6 pts), boolean chains 5, ternaries 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · EnhancedGitHubMatcher._search_commit_history (cognitive 28) · ×1
  • EnhancedGitHubMatcher._search_commit_history (cognitive 28) backend/app/services/enhanced_github_matcher.py:690 — EnhancedGitHubMatcher._search_commit_history has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (21 pts), loops 3 (6 pts), error handling 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GitHubCollector._get_user_emails (cognitive 28) · ×1
  • GitHubCollector._get_user_emails (cognitive 28) backend/app/services/github_collector.py:355 — GitHubCollector._get_user_emails has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (8 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GitHubCollector.fetch_daily_commit_data_graphql (cognitive 28) · ×1
  • GitHubCollector.fetch_daily_commit_data_graphql (cognitive 28) backend/app/services/github_collector.py:918 — GitHubCollector.fetch_daily_commit_data_graphql has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 4, boolean chains 3, error handling 2 (3 pts), ternaries 2 (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 · JiraWorkspaceSelector.JiraWorkspaceSelector (cognitive 28) · ×1
  • JiraWorkspaceSelector.JiraWorkspaceSelector (cognitive 28) frontend/src/app/integrations/dialogs/JiraWorkspaceSelector.tsx:22 — JiraWorkspaceSelector.JiraWorkspaceSelector has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 6 (12 pts), boolean chains 9, if/else 5, error handling 2 (nesting depth added 6). Most of this is not in the body itself: 8 of the 28 points are its own statements and the rest belongs to 4 function items inside it that branch (handleSelectWorkspace, loadWorkspaces, 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 · mapping-handlers.saveEditedMapping (cognitive 28) · ×1
  • mapping-handlers.saveEditedMapping (cognitive 28) frontend/src/app/integrations/handlers/mapping-handlers.ts:108 — mapping-handlers.saveEditedMapping has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 6, ternaries 2 (5 pts), error handling 2 (3 pts) (nesting depth added 8). Of this number, 23 points are the body's own statements and 5 belong to 2 function literals 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 · BurnoutPredictorTool._calculate_critical_thresholds (cognitive 27) · ×1
  • BurnoutPredictorTool._calculate_critical_thresholds (cognitive 27) backend/app/agents/tools/burnout_predictor.py:318 — BurnoutPredictorTool._calculate_critical_thresholds has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 4 (16 pts), if/else 6 (9 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · analyses.get_user_github_daily_commits (cognitive 27) · ×1
  • analyses.get_user_github_daily_commits (cognitive 27) REDACTED:2164 — analyses.get_user_github_daily_commits has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 7, loops 1 (2 pts), ternaries 2 (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 · AIBurnoutAnalyzerService._prepare_ai_data (cognitive 27) · ×1
  • AIBurnoutAnalyzerService._prepare_ai_data (cognitive 27) backend/app/services/ai_burnout_analyzer.py:208 — AIBurnoutAnalyzerService._prepare_ai_data has cognitive complexity 27 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 6 (9 pts), boolean chains 7 (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 · EnhancedGitHubMatcher._match_name_against_members (cognitive 27) · ×1
  • EnhancedGitHubMatcher._match_name_against_members (cognitive 27) backend/app/services/enhanced_github_matcher.py:246 — EnhancedGitHubMatcher._match_name_against_members has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedBurnoutAnalyzer._get_severity_level (cognitive 27) · ×1
  • UnifiedBurnoutAnalyzer._get_severity_level (cognitive 27) backend/app/services/unified_burnout_analyzer.py:6160 — UnifiedBurnoutAnalyzer._get_severity_level has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 7, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UserSyncService._update_correlation (cognitive 27) · ×1
  • UserSyncService._update_correlation (cognitive 27) backend/app/services/user_sync_service.py:666 — UserSyncService._update_correlation has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 8, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · weekly_digest_service._build_email_content (cognitive 27) · ×1
  • weekly_digest_service._build_email_content (cognitive 27) backend/app/services/weekly_digest_service.py:335 — weekly_digest_service._build_email_content has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 9, boolean chains 6, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ai-handlers.handleConnectAI (cognitive 27) · ×1
  • ai-handlers.handleConnectAI (cognitive 27) frontend/src/app/integrations/handlers/ai-handlers.ts:44 — ai-handlers.handleConnectAI has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 7, ternaries 3 (5 pts), error handling 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 · BurnoutDetectionAgent._prepare_data_summary (cognitive 26) · ×1
  • BurnoutDetectionAgent._prepare_data_summary (cognitive 26) backend/app/agents/burnout_agent.py:664 — BurnoutDetectionAgent._prepare_data_summary has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (18 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BurnoutDetectionAgent._parse_agent_response (cognitive 26) · ×1
  • BurnoutDetectionAgent._parse_agent_response (cognitive 26) backend/app/agents/burnout_agent.py:722 — BurnoutDetectionAgent._parse_agent_response has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 2 (5 pts), loops 4, boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AIBurnoutAnalyzerService._analyze_team_risk_distribution (cognitive 26) · ×1
  • AIBurnoutAnalyzerService._analyze_team_risk_distribution (cognitive 26) backend/app/services/ai_burnout_analyzer.py:327 — AIBurnoutAnalyzerService._analyze_team_risk_distribution has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 4 (8 pts), ternaries 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AIBurnoutAnalyzerService._analyze_team_trends (cognitive 26) · ×1
  • AIBurnoutAnalyzerService._analyze_team_trends (cognitive 26) backend/app/services/ai_burnout_analyzer.py:907 — AIBurnoutAnalyzerService._analyze_team_trends has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 4 (8 pts), boolean chains 4, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · retention_cleanup.cleanup_organization_data (cognitive 26) · ×1
  • retention_cleanup.cleanup_organization_data (cognitive 26) backend/app/services/retention_cleanup.py:116 — retention_cleanup.cleanup_organization_data has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 5, boolean chains 2, ternaries 2, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedBurnoutAnalyzer._enhance_with_ai_analysis (cognitive 26) · ×1
  • UnifiedBurnoutAnalyzer._enhance_with_ai_analysis (cognitive 26) backend/app/services/unified_burnout_analyzer.py:3949 — UnifiedBurnoutAnalyzer._enhance_with_ai_analysis has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (13 pts), error handling 3 (5 pts), boolean chains 4, ternaries 3, loops 1 (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 · page.AuthSuccessPage (cognitive 26) · ×1
  • page.AuthSuccessPage (cognitive 26) REDACTED:7 — page.AuthSuccessPage has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 6, error handling 2, ternaries 1 (2 pts), loops 1 (nesting depth added 5). Most of this is not in the body itself: 3 of the 26 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 18, 13, 119). 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 · GitHubConnectedCard.GitHubConnectedCard (cognitive 26) · ×1
  • GitHubConnectedCard.GitHubConnectedCard (cognitive 26) frontend/src/app/integrations/components/GitHubConnectedCard.tsx:24 — GitHubConnectedCard.GitHubConnectedCard has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 9 (14 pts), if/else 5 (6 pts), boolean chains 5, error handling 1 (nesting depth added 6). Of this number, 17 points are the body's own statements and 9 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 · CrossPlatformCorrelatorTool._correlate_incidents_code (cognitive 25) · ×1
  • CrossPlatformCorrelatorTool._correlate_incidents_code (cognitive 25) backend/app/agents/tools/cross_platform_correlator.py:97 — CrossPlatformCorrelatorTool._correlate_incidents_code has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 4, boolean chains 2 (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 · CrossPlatformCorrelatorTool._correlate_incidents_communication (cognitive 25) · ×1
  • CrossPlatformCorrelatorTool._correlate_incidents_communication (cognitive 25) backend/app/agents/tools/cross_platform_correlator.py:165 — CrossPlatformCorrelatorTool._correlate_incidents_communication has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 4, loops 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 · analyses.run_burnout_analysis (cognitive 25) · ×1
  • analyses.run_burnout_analysis (cognitive 25) REDACTED:281 — analyses.run_burnout_analysis has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (17 pts), error handling 3 (4 pts), boolean chains 2, ternaries 2 (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 · mappings.get_analysis_mappings (cognitive 25) · ×1
  • mappings.get_analysis_mappings (cognitive 25) backend/app/api/endpoints/mappings.py:65 — mappings.get_analysis_mappings has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 4 (7 pts), boolean chains 3, loops 3, error handling 2 (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 · RootlyAPIClient.extract_on_call_users_from_shifts (cognitive 25) · ×1
  • RootlyAPIClient.extract_on_call_users_from_shifts (cognitive 25) backend/app/core/rootly_client.py:1707 — RootlyAPIClient.extract_on_call_users_from_shifts has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, error handling 2 (4 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AccountLinkingService.link_or_create_user (cognitive 25) · ×1
  • AccountLinkingService.link_or_create_user (cognitive 25) backend/app/services/account_linking.py:21 — AccountLinkingService.link_or_create_user has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 3 (7 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MappingRecorder.get_mapping_statistics (cognitive 25) · ×1
  • MappingRecorder.get_mapping_statistics (cognitive 25) backend/app/services/mapping_recorder.py:207 — MappingRecorder.get_mapping_statistics has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 4 (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 · slack_collector.parse_structured_slack_messages (cognitive 25) · ×1
  • slack_collector.parse_structured_slack_messages (cognitive 25) backend/app/services/slack_collector.py:1147 — slack_collector.parse_structured_slack_messages has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 6, ternaries 2 (6 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedBurnoutAnalyzer._calculate_incident_response_activities (cognitive 25) · ×1
  • UnifiedBurnoutAnalyzer._calculate_incident_response_activities (cognitive 25) backend/app/services/unified_burnout_analyzer.py:2280 — UnifiedBurnoutAnalyzer._calculate_incident_response_activities has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedBurnoutAnalyzer._fetch_linear_workload_data (cognitive 25) · ×1
  • UnifiedBurnoutAnalyzer._fetch_linear_workload_data (cognitive 25) backend/app/services/unified_burnout_analyzer.py:5578 — UnifiedBurnoutAnalyzer._fetch_linear_workload_data has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 3 (5 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · incident_utils.calculate_severity_breakdown (cognitive 25) · ×1
  • incident_utils.calculate_severity_breakdown (cognitive 25) backend/app/utils/incident_utils.py:329 — incident_utils.calculate_severity_breakdown has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 4, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ai_usage.connect (cognitive 24) · ×1
  • ai_usage.connect (cognitive 24) backend/app/api/endpoints/ai_usage.py:115 — ai_usage.connect has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 6 (9 pts), boolean chains 4, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ai_usage.test_connection (cognitive 24) · ×1
  • ai_usage.test_connection (cognitive 24) backend/app/api/endpoints/ai_usage.py:161 — ai_usage.test_connection has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 4 (8 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · github.test_github_integration (cognitive 24) · ×1
  • github.test_github_integration (cognitive 24) backend/app/api/endpoints/github.py:205 — github.test_github_integration has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 5 (8 pts), boolean chains 2, loops 1 (2 pts), ternaries 2 (nesting depth added 6). 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 · mappings.get_platform_mappings (cognitive 24) · ×1
  • mappings.get_platform_mappings (cognitive 24) backend/app/api/endpoints/mappings.py:202 — mappings.get_platform_mappings has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 3 (6 pts), loops 3 (4 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rootly.list_integrations (cognitive 24) · ×1
  • rootly.list_integrations (cognitive 24) backend/app/api/endpoints/rootly.py:401 — rootly.list_integrations has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · slack.get_slack_users (cognitive 24) · ×1
  • slack.get_slack_users (cognitive 24) REDACTED:1016 — slack.get_slack_users has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 4, error handling 4, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SlackIntegrationOAuth.test_permissions (cognitive 24) · ×1
  • SlackIntegrationOAuth.test_permissions (cognitive 24) backend/app/auth/integration_oauth.py:267 — SlackIntegrationOAuth.test_permissions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), error handling 5, boolean chains 2 (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 · RootlyAPIClient.collect_analysis_data (cognitive 24) · ×1
  • RootlyAPIClient.collect_analysis_data (cognitive 24) backend/app/core/rootly_client.py:2047 — RootlyAPIClient.collect_analysis_data has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 3 (6 pts), error handling 2 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AIBurnoutAnalyzerService._generate_detailed_risk_analysis (cognitive 24) · ×1
  • AIBurnoutAnalyzerService._generate_detailed_risk_analysis (cognitive 24) backend/app/services/ai_burnout_analyzer.py:702 — AIBurnoutAnalyzerService._generate_detailed_risk_analysis has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (11 pts), error handling 2 (6 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GitHubMappingService.get_smart_github_data (cognitive 24) · ×1
  • GitHubMappingService.get_smart_github_data (cognitive 24) backend/app/services/github_mapping_service.py:40 — GitHubMappingService.get_smart_github_data has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, error handling 1 (3 pts), loops 2 (3 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JiraMappingService.auto_map_users (cognitive 24) · ×1
  • JiraMappingService.auto_map_users (cognitive 24) backend/app/services/jira_mapping_service.py:153 — JiraMappingService.auto_map_users has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 6, error handling 1 (2 pts), loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LinearMappingService.auto_map_users (cognitive 24) · ×1
  • LinearMappingService.auto_map_users (cognitive 24) backend/app/services/linear_mapping_service.py:153 — LinearMappingService.auto_map_users has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 6, error handling 1 (2 pts), loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SurveyScheduler.dispatch_due_jobs (cognitive 24) · ×1
  • SurveyScheduler.dispatch_due_jobs (cognitive 24) backend/app/services/survey_scheduler.py:679 — SurveyScheduler.dispatch_due_jobs has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 4 (7 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TeamManagementDialog.TeamManagementDialog (cognitive 24) · ×1
  • TeamManagementDialog.TeamManagementDialog (cognitive 24) frontend/src/components/TeamManagementDialog.tsx:12 — TeamManagementDialog.TeamManagementDialog has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11, boolean chains 6, error handling 5, ternaries 1 (2 pts) (nesting depth added 1). None of this is in the body itself: all 24 points belong to 6 function items inside it that branch (fetchOrganizationData, a function literal at line 23, handleInvite, …). 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 · github.get_org_members (cognitive 23) · ×1
  • github.get_org_members (cognitive 23) backend/app/api/endpoints/github.py:656 — github.get_org_members has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (6 pts), error handling 2 (3 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 · jira._process_callback (cognitive 23) · ×1
  • jira._process_callback (cognitive 23) REDACTED:95 — jira._process_callback has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 4, boolean chains 3, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PagerDutyDataCollector._extract_incident_assignment_enhanced (cognitive 23) · ×1
  • PagerDutyDataCollector._extract_incident_assignment_enhanced (cognitive 23) backend/app/core/pagerduty_client.py:1470 — PagerDutyDataCollector._extract_incident_assignment_enhanced has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RootlyAPIClient.get_users (cognitive 23) · ×1
  • RootlyAPIClient.get_users (cognitive 23) backend/app/core/rootly_client.py:1523 — RootlyAPIClient.get_users has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (21 pts), error handling 1, 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 · EnhancedGitHubMatcher._search_github_by_name (cognitive 23) · ×1
  • EnhancedGitHubMatcher._search_github_by_name (cognitive 23) backend/app/services/enhanced_github_matcher.py:439 — EnhancedGitHubMatcher._search_github_by_name has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 1 (3 pts), boolean chains 1, error handling 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AIInsightsCard.AIInsightsCard · ×1
  • AIInsightsCard.AIInsightsCard::handleTokenSourceChange (cognitive 23) frontend/src/app/integrations/components/AIInsightsCard.tsx:64 — AIInsightsCard.AIInsightsCard::handleTokenSourceChange has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 4 (7 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · page.IntegrationsPage · ×1
  • page.IntegrationsPage::loadAllIntegrationsAPIBackground (cognitive 23) REDACTED:1470 — page.IntegrationsPage::loadAllIntegrationsAPIBackground has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 10 (13 pts), if/else 4 (5 pts), boolean chains 4, error handling 1 (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. This shape REPEATS in the file: one other method here (page.IntegrationsPage) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · landing-page.LandingPage (cognitive 23) · ×1
  • landing-page.LandingPage (cognitive 23) frontend/src/components/landing-page.tsx:86 — landing-page.LandingPage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13, boolean chains 4, error handling 3, ternaries 3. Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 5 function items inside it that branch (handleGoogleLogin, handleGitHubLogin, handleOktaLogin, …). 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 · WorkloadAnalyzerTool._count_after_hours_activities (cognitive 22) · ×1
  • WorkloadAnalyzerTool._count_after_hours_activities (cognitive 22) backend/app/agents/tools/workload_analyzer.py:157 — WorkloadAnalyzerTool._count_after_hours_activities has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (12 pts), error handling 1 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · jira.jira_oauth_callback_post (cognitive 22) · ×1
  • jira.jira_oauth_callback_post (cognitive 22) REDACTED:276 — jira.jira_oauth_callback_post has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, error handling 2 (4 pts), ternaries 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · jira.select_jira_workspace (cognitive 22) · ×1
  • jira.select_jira_workspace (cognitive 22) REDACTED:725 — jira.select_jira_workspace has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PagerDutyAPIClient.test_connection (cognitive 22) · ×1
  • PagerDutyAPIClient.test_connection (cognitive 22) backend/app/core/pagerduty_client.py:64 — PagerDutyAPIClient.test_connection has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 3 (5 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · user_logging.user_logging_middleware (cognitive 22) · ×1
  • user_logging.user_logging_middleware (cognitive 22) backend/app/middleware/user_logging.py:71 — user_logging.user_logging_middleware has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 3 (6 pts), boolean chains 2, ternaries 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 · AIBurnoutAnalyzerService._analyze_workload_distribution (cognitive 22) · ×1
  • AIBurnoutAnalyzerService._analyze_workload_distribution (cognitive 22) backend/app/services/ai_burnout_analyzer.py:552 — AIBurnoutAnalyzerService._analyze_workload_distribution has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 3 (6 pts), loops 3 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · retention_scheduler.process_organization_cleanup (cognitive 22) · ×1
  • retention_scheduler.process_organization_cleanup (cognitive 22) backend/app/services/retention_scheduler.py:91 — retention_scheduler.process_organization_cleanup has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 4 (8 pts), boolean chains 5, error handling 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 · SlackCollector._process_mock_messages (cognitive 22) · ×1
  • SlackCollector._process_mock_messages (cognitive 22) backend/app/services/slack_collector.py:237 — SlackCollector._process_mock_messages has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 6, boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedBurnoutAnalyzer._calculate_github_burnout_score (cognitive 22) · ×1
  • UnifiedBurnoutAnalyzer._calculate_github_burnout_score (cognitive 22) backend/app/services/unified_burnout_analyzer.py:5924 — UnifiedBurnoutAnalyzer._calculate_github_burnout_score has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, ternaries 4, error handling 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 · page.JiraCallbackContent (cognitive 22) · ×1
  • page.JiraCallbackContent (cognitive 22) frontend/src/app/setup/jira/callback/page.tsx:9 — page.JiraCallbackContent has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 8, if/else 8, ternaries 3 (4 pts), error handling 2 (nesting depth added 1). None of this is in the body itself: all 22 points belong to 2 function literals inside it that branch (lines 22, 13). 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 · SlackSurveyTabs.SlackSurveyTabs · ×1
  • SlackSurveyTabs.SlackSurveyTabs::loadSchedule (cognitive 22) frontend/src/components/SlackSurveyTabs.tsx:168 — SlackSurveyTabs.SlackSurveyTabs::loadSchedule has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (SlackSurveyTabs.SlackSurveyTabs) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · WorkloadAnalyzerTool._count_weekend_activities (cognitive 21) · ×1
  • WorkloadAnalyzerTool._count_weekend_activities (cognitive 21) backend/app/agents/tools/workload_analyzer.py:179 — WorkloadAnalyzerTool._count_weekend_activities has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), error handling 1 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · auth.google_callback (cognitive 21) · ×1
  • auth.google_callback (cognitive 21) REDACTED:176 — auth.google_callback has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), error handling 3 (5 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: 2 other methods here (auth.github_callback, auth.okta_callback) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · auth.github_callback (cognitive 21) · ×1
  • auth.github_callback (cognitive 21) REDACTED:308 — auth.github_callback has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), error handling 3 (5 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: 2 other methods here (auth.google_callback, auth.okta_callback) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · auth.okta_callback (cognitive 21) · ×1
  • auth.okta_callback (cognitive 21) REDACTED:435 — auth.okta_callback has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), error handling 3 (5 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: 2 other methods here (auth.google_callback, auth.github_callback) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · PagerDutyAPIClient.get_team_members (cognitive 21) · ×1
  • PagerDutyAPIClient.get_team_members (cognitive 21) backend/app/core/pagerduty_client.py:326 — PagerDutyAPIClient.get_team_members has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), ternaries 1 (3 pts), error handling 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PagerDutyDataCollector.collect_all_data (cognitive 21) · ×1
  • PagerDutyDataCollector.collect_all_data (cognitive 21) backend/app/core/pagerduty_client.py:1069 — PagerDutyDataCollector.collect_all_data has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6, ternaries 4 (6 pts), loops 2 (5 pts), boolean chains 3, error handling 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GitHubCorrelationService._correlate_with_integration_mappings (cognitive 21) · ×1
  • GitHubCorrelationService._correlate_with_integration_mappings (cognitive 21) REDACTED:51 — GitHubCorrelationService._correlate_with_integration_mappings has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 1 (3 pts), loops 2, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GitHubCorrelationService._fetch_integration_mappings (cognitive 21) · ×1
  • GitHubCorrelationService._fetch_integration_mappings (cognitive 21) REDACTED:132 — GitHubCorrelationService._fetch_integration_mappings has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 4 (5 pts), boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · retention_preview.classify_analysis_result (cognitive 21) · ×1
  • retention_preview.classify_analysis_result (cognitive 21) backend/app/services/retention_preview.py:187 — retention_preview.classify_analysis_result has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · retention_scheduler.process_due_retention_cleanups (cognitive 21) · ×1
  • retention_scheduler.process_due_retention_cleanups (cognitive 21) backend/app/services/retention_scheduler.py:152 — retention_scheduler.process_due_retention_cleanups has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (10 pts), error handling 2 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedBurnoutAnalyzer.__init__ (cognitive 21) · ×1
  • UnifiedBurnoutAnalyzer.__init__ (cognitive 21) backend/app/services/unified_burnout_analyzer.py:85 — UnifiedBurnoutAnalyzer.__init__ has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (21 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedBurnoutAnalyzer._calculate_github_insights (cognitive 21) · ×1
  • UnifiedBurnoutAnalyzer._calculate_github_insights (cognitive 21) backend/app/services/unified_burnout_analyzer.py:3741 — UnifiedBurnoutAnalyzer._calculate_github_insights has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 4, loops 3 (4 pts), ternaries 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UserSyncService._match_github_usernames (cognitive 21) · ×1
  • UserSyncService._match_github_usernames (cognitive 21) backend/app/services/user_sync_service.py:1014 — UserSyncService._match_github_usernames has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (16 pts), error handling 2 (3 pts), loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UserSyncService._match_openai_users (cognitive 21) · ×1
  • UserSyncService._match_openai_users (cognitive 21) backend/app/services/user_sync_service.py:1660 — UserSyncService._match_openai_users has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 2 (4 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · weekly_digest_service._calculate_user_trend (cognitive 21) · ×1
  • weekly_digest_service._calculate_user_trend (cognitive 21) backend/app/services/weekly_digest_service.py:148 — weekly_digest_service._calculate_user_trend has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 3, ternaries 1 (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 · page.LinearCallbackContent (cognitive 21) · ×1
  • page.LinearCallbackContent (cognitive 21) frontend/src/app/setup/linear/callback/page.tsx:9 — page.LinearCallbackContent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8, boolean chains 7, ternaries 3 (4 pts), error handling 2 (nesting depth added 1). None of this is in the body itself: all 21 points belong to 2 function literals inside it that branch (lines 22, 13). 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 · GitHubCommitsTimeline.GitHubCommitsTimeline (cognitive 21) · ×1
  • GitHubCommitsTimeline.GitHubCommitsTimeline (cognitive 21) frontend/src/components/dashboard/charts/GitHubCommitsTimeline.tsx:15 — GitHubCommitsTimeline.GitHubCommitsTimeline has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 8, ternaries 2 (3 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 21, 149, 118). 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 · BurnoutPredictorTool._generate_timeline_predictions (cognitive 20) · ×1
  • BurnoutPredictorTool._generate_timeline_predictions (cognitive 20) backend/app/agents/tools/burnout_predictor.py:465 — BurnoutPredictorTool._generate_timeline_predictions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 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 · github.connect_github_with_token (cognitive 20) · ×1
  • github.connect_github_with_token (cognitive 20) backend/app/api/endpoints/github.py:454 — github.connect_github_with_token has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), error handling 5, loops 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · rootly.get_oncall_users (cognitive 20) · ×1
  • rootly.get_oncall_users (cognitive 20) backend/app/api/endpoints/rootly.py:1547 — rootly.get_oncall_users has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), error handling 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 · slack.check_slack_scopes (cognitive 20) · ×1
  • slack.check_slack_scopes (cognitive 20) REDACTED:481 — slack.check_slack_scopes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 4 (6 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IntegrationValidator._validate_jira_manual_token (cognitive 20) · ×1
  • IntegrationValidator._validate_jira_manual_token (cognitive 20) backend/app/services/integration_validator.py:174 — IntegrationValidator._validate_jira_manual_token has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (9 pts), error handling 4 (5 pts), boolean chains 4, ternaries 2 (nesting depth added 2). 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 · JiraUserSyncService._fetch_jira_users (cognitive 20) · ×1
  • JiraUserSyncService._fetch_jira_users (cognitive 20) backend/app/services/jira_user_sync_service.py:88 — JiraUserSyncService._fetch_jira_users has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedBurnoutAnalyzer._calculate_jira_och_contribution (cognitive 20) · ×1
  • UnifiedBurnoutAnalyzer._calculate_jira_och_contribution (cognitive 20) backend/app/services/unified_burnout_analyzer.py:5460 — UnifiedBurnoutAnalyzer._calculate_jira_och_contribution has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, error handling 2 (3 pts), loops 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 · UnifiedBurnoutAnalyzer._calculate_linear_och_contribution (cognitive 20) · ×1
  • UnifiedBurnoutAnalyzer._calculate_linear_och_contribution (cognitive 20) backend/app/services/unified_burnout_analyzer.py:5811 — UnifiedBurnoutAnalyzer._calculate_linear_och_contribution has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 2 (3 pts), loops 2, boolean chains 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 · load_demo_analyses.main (cognitive 20) · ×1
  • load_demo_analyses.main (cognitive 20) backend/mock_data_helpers/load_demo_analyses.py:216 — load_demo_analyses.main has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2, ternaries 2, error handling 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · IntegrationCardItem.IntegrationCardItem (cognitive 20) · ×1
  • IntegrationCardItem.IntegrationCardItem (cognitive 20) frontend/src/app/integrations/components/IntegrationCardItem.tsx:45 — IntegrationCardItem.IntegrationCardItem has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, ternaries 7, if/else 2 (3 pts) (nesting depth added 1). Of this number, 15 points are the body's own statements and 5 belong to 3 function literals 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 · MemberOpenAIUsageCard.MemberOpenAIUsageCard (cognitive 20) · ×1
  • MemberOpenAIUsageCard.MemberOpenAIUsageCard (cognitive 20) frontend/src/components/dashboard/MemberOpenAIUsageCard.tsx:106 — MemberOpenAIUsageCard.MemberOpenAIUsageCard has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 9 (11 pts), boolean chains 4, if/else 4, loops 1 (nesting depth added 2). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 111, 126, 118, …). 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 · useDashboard.useDashboard.burnoutFactors (cognitive 20) · ×1
  • useDashboard.useDashboard.burnoutFactors (cognitive 20) frontend/src/hooks/useDashboard.ts:2666 — useDashboard.useDashboard.burnoutFactors has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 3 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). Of this number, 14 points are the body's own statements and 6 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 · BurnoutPredictorTool._analyze_metric_trends (cognitive 19) · ×1
  • BurnoutPredictorTool._analyze_metric_trends (cognitive 19) backend/app/agents/tools/burnout_predictor.py:112 — BurnoutPredictorTool._analyze_metric_trends has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeQualityAnalyzerTool._analyze_pr_patterns (cognitive 19) · ×1
  • CodeQualityAnalyzerTool._analyze_pr_patterns (cognitive 19) backend/app/agents/tools/code_quality_analyzer.py:96 — CodeQualityAnalyzerTool._analyze_pr_patterns has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 4, boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WorkloadAnalyzerTool._calculate_intensity_metrics (cognitive 19) · ×1
  • WorkloadAnalyzerTool._calculate_intensity_metrics (cognitive 19) backend/app/agents/tools/workload_analyzer.py:90 — WorkloadAnalyzerTool._calculate_intensity_metrics has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 11 (13 pts), if/else 6 (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 · admin.refresh_demo_analyses (cognitive 19) · ×1
  • admin.refresh_demo_analyses (cognitive 19) backend/app/api/endpoints/admin.py:125 — admin.refresh_demo_analyses has cognitive complexity 19 (threshold 15). Drivers by points: error handling 6 (8 pts), if/else 8, boolean chains 2, loops 1 (nesting depth added 2). 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 · slack.sync_slack_user_ids (cognitive 19) · ×1
  • slack.sync_slack_user_ids (cognitive 19) REDACTED:849 — slack.sync_slack_user_ids has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (15 pts), error handling 2, boolean chains 1, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AIBurnoutAnalyzerService._generate_executive_summary (cognitive 19) · ×1
  • AIBurnoutAnalyzerService._generate_executive_summary (cognitive 19) backend/app/services/ai_burnout_analyzer.py:613 — AIBurnoutAnalyzerService._generate_executive_summary has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 3 (5 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · retention_status.cleanup_due_at (cognitive 19) · ×1
  • retention_status.cleanup_due_at (cognitive 19) backend/app/services/retention_status.py:108 — retention_status.cleanup_due_at has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 7, ternaries 2 (3 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · UserSyncService.sync_integration_users (cognitive 19) · ×1
  • UserSyncService.sync_integration_users (cognitive 19) backend/app/services/user_sync_service.py:27 — UserSyncService.sync_integration_users has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, error handling 6, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · weekly_digest_service._get_user_timezone (cognitive 19) · ×1
  • weekly_digest_service._get_user_timezone (cognitive 19) backend/app/services/weekly_digest_service.py:48 — weekly_digest_service._get_user_timezone has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 5 (7 pts), boolean chains 2, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SyncProgressModal.SyncProgressModal (cognitive 19) · ×1
  • SyncProgressModal.SyncProgressModal (cognitive 19) frontend/src/components/SyncProgressModal.tsx:18 — SyncProgressModal.SyncProgressModal has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 15, if/else 4. Of this number, 14 points are the body's own statements and 5 belong to 3 function literals 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 · BaseRiskFactorsCard.CustomPolarAngleTick (cognitive 19) · ×1
  • BaseRiskFactorsCard.CustomPolarAngleTick (cognitive 19) frontend/src/components/dashboard/BaseRiskFactorsCard.tsx:31 — BaseRiskFactorsCard.CustomPolarAngleTick has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 13, boolean chains 5, if/else 1. Of this number, 18 points are the body's own statements and 1 belongs to one function literal 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 · GitHubAllMetricsPopup.GitHubAllMetricsPopup (cognitive 19) · ×1
  • GitHubAllMetricsPopup.GitHubAllMetricsPopup (cognitive 19) frontend/src/components/dashboard/GitHubAllMetricsPopup.tsx:27 — GitHubAllMetricsPopup.GitHubAllMetricsPopup has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 13, ternaries 4 (6 pts) (nesting depth added 2). None of this is in the body itself: all 19 points belong to 3 function items inside it that branch (handleMemberClick, a function literal at line 70, 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.
D2 · Cognitive Complexity · integrations-layout.IntegrationsLayoutContent (cognitive 19) · ×1
  • integrations-layout.IntegrationsLayoutContent (cognitive 19) frontend/src/components/integrations/integrations-layout.tsx:21 — integrations-layout.IntegrationsLayoutContent has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), error handling 3 (5 pts), ternaries 1 (2 pts) (nesting depth added 4). None of this is in the body itself: all 19 points belong to 5 function items inside it that branch (loadIntegrationsOptimized, a function literal at line 48, 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 · BurnoutPredictorTool._calculate_trend (cognitive 18) · ×1
  • BurnoutPredictorTool._calculate_trend (cognitive 18) backend/app/agents/tools/burnout_predictor.py:173 — BurnoutPredictorTool._calculate_trend has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, ternaries 5, boolean chains 3. 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 · CodeQualityAnalyzerTool._analyze_commit_patterns (cognitive 18) · ×1
  • CodeQualityAnalyzerTool._analyze_commit_patterns (cognitive 18) backend/app/agents/tools/code_quality_analyzer.py:150 — CodeQualityAnalyzerTool._analyze_commit_patterns has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 5, boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SentimentAnalyzerTool._analyze_patterns (cognitive 18) · ×1
  • SentimentAnalyzerTool._analyze_patterns (cognitive 18) backend/app/agents/tools/sentiment_analyzer.py:124 — SentimentAnalyzerTool._analyze_patterns has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (17 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 · analyses._load_analysis_data (cognitive 18) · ×1
  • analyses._load_analysis_data (cognitive 18) REDACTED:962 — analyses._load_analysis_data has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 2 (4 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · analyses.get_member_surveys (cognitive 18) · ×1
  • analyses.get_member_surveys (cognitive 18) REDACTED:1042 — analyses.get_member_surveys has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 3 (4 pts), boolean chains 3, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · analyses.get_analysis_daily_trends (cognitive 18) · ×1
  • analyses.get_analysis_daily_trends (cognitive 18) REDACTED:2019 — analyses.get_analysis_daily_trends has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · jira.get_jira_status (cognitive 18) · ×1
  • jira.get_jira_status (cognitive 18) REDACTED:532 — jira.get_jira_status has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (8 pts), if/else 5, boolean chains 4, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · linear.get_linear_status (cognitive 18) · ×1
  • linear.get_linear_status (cognitive 18) backend/app/api/endpoints/linear.py:359 — linear.get_linear_status has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (8 pts), if/else 5, boolean chains 4, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · mappings.get_success_rates (cognitive 18) · ×1
  • mappings.get_success_rates (cognitive 18) backend/app/api/endpoints/mappings.py:300 — mappings.get_success_rates has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, loops 2, ternaries 2, error handling 1 (nesting depth added 3). 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 · api_cache.invalidate_provider_cache (cognitive 18) · ×1
  • api_cache.invalidate_provider_cache (cognitive 18) backend/app/core/api_cache.py:210 — api_cache.invalidate_provider_cache has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (4 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PagerDutyAPIClient.get_on_call_shifts (cognitive 18) · ×1
  • PagerDutyAPIClient.get_on_call_shifts (cognitive 18) backend/app/core/pagerduty_client.py:932 — PagerDutyAPIClient.get_on_call_shifts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 3 (4 pts), ternaries 2 (4 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RootlyAPIClient.filter_incident_responders (cognitive 18) · ×1
  • RootlyAPIClient.filter_incident_responders (cognitive 18) backend/app/core/rootly_client.py:1787 — RootlyAPIClient.filter_incident_responders has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EnhancedGitHubMatcher._calculate_name_similarity (cognitive 18) · ×1
  • EnhancedGitHubMatcher._calculate_name_similarity (cognitive 18) backend/app/services/enhanced_github_matcher.py:482 — EnhancedGitHubMatcher._calculate_name_similarity has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 3). 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 · EnhancedGitHubMatcher._fuzzy_name_match (cognitive 18) · ×1
  • EnhancedGitHubMatcher._fuzzy_name_match (cognitive 18) backend/app/services/enhanced_github_matcher.py:730 — EnhancedGitHubMatcher._fuzzy_name_match has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JiraMappingService.record_jira_mappings (cognitive 18) · ×1
  • JiraMappingService.record_jira_mappings (cognitive 18) backend/app/services/jira_mapping_service.py:294 — JiraMappingService.record_jira_mappings has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, loops 2, ternaries 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 · ManualMappingService.suggest_mappings (cognitive 18) · ×1
  • ManualMappingService.suggest_mappings (cognitive 18) backend/app/services/manual_mapping_service.py:658 — ManualMappingService.suggest_mappings has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, loops 2 (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 · assign_analysis_to_user.main (cognitive 18) · ×1
  • assign_analysis_to_user.main (cognitive 18) backend/mock_data_helpers/assign_analysis_to_user.py:92 — assign_analysis_to_user.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 2 (3 pts), boolean chains 2, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · JiraManualSetupForm.JiraManualSetupForm (cognitive 18) · ×1
  • JiraManualSetupForm.JiraManualSetupForm (cognitive 18) frontend/src/app/integrations/components/JiraManualSetupForm.tsx:27 — JiraManualSetupForm.JiraManualSetupForm has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 4, ternaries 3. Of this number, 9 points are the body's own statements and 9 belong to 4 function literals 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 · LinearManualSetupForm.LinearManualSetupForm (cognitive 18) · ×1
  • LinearManualSetupForm.LinearManualSetupForm (cognitive 18) frontend/src/app/integrations/components/LinearManualSetupForm.tsx:26 — LinearManualSetupForm.LinearManualSetupForm has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 4, ternaries 3. Of this number, 9 points are the body's own statements and 9 belong to 4 function literals 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 · PagerDutyIntegrationForm.PagerDutyIntegrationForm (cognitive 18) · ×1
  • PagerDutyIntegrationForm.PagerDutyIntegrationForm (cognitive 18) frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx:27 — PagerDutyIntegrationForm.PagerDutyIntegrationForm has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 12, ternaries 3, if/else 2, error handling 1. Of this number, 11 points are the body's own statements and 7 belong to 2 function literals 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 · mapping-handlers.saveInlineMapping (cognitive 18) · ×1
  • mapping-handlers.saveInlineMapping (cognitive 18) frontend/src/app/integrations/handlers/mapping-handlers.ts:244 — mapping-handlers.saveInlineMapping has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1 (nesting depth added 4). Of this number, 16 points are the body's own statements and 2 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 · page.UnsubscribePage (cognitive 18) · ×1
  • page.UnsubscribePage (cognitive 18) frontend/src/app/unsubscribe/page.tsx:44 — page.UnsubscribePage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 4 (5 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 2). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 4 function items inside it that branch (buildReason, a function literal at line 141, handleConfirm, …). 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 · CreateKeyDialog.CreateKeyDialog (cognitive 18) · ×1
  • CreateKeyDialog.CreateKeyDialog (cognitive 18) frontend/src/components/api-keys/CreateKeyDialog.tsx:42 — CreateKeyDialog.CreateKeyDialog has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 4. Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 4 function items inside it that branch (getExpirationDate, a function literal at line 151, handleCreate, …). 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 · BurnoutPredictorTool._predict_risk_trajectory (cognitive 17) · ×1
  • BurnoutPredictorTool._predict_risk_trajectory (cognitive 17) backend/app/agents/tools/burnout_predictor.py:378 — BurnoutPredictorTool._predict_risk_trajectory has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PatternAnalyzerTool._parse_events (cognitive 17) · ×1
  • PatternAnalyzerTool._parse_events (cognitive 17) backend/app/agents/tools/pattern_analyzer.py:81 — PatternAnalyzerTool._parse_events has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PatternAnalyzerTool._analyze_incident_patterns (cognitive 17) · ×1
  • PatternAnalyzerTool._analyze_incident_patterns (cognitive 17) backend/app/agents/tools/pattern_analyzer.py:117 — PatternAnalyzerTool._analyze_incident_patterns has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 2, ternaries 2, boolean chains 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 · PatternAnalyzerTool._analyze_commit_patterns (cognitive 17) · ×1
  • PatternAnalyzerTool._analyze_commit_patterns (cognitive 17) backend/app/agents/tools/pattern_analyzer.py:180 — PatternAnalyzerTool._analyze_commit_patterns has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 3, boolean chains 2, loops 2 (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 · analyses._persist_analysis_result (cognitive 17) · ×1
  • analyses._persist_analysis_result (cognitive 17) REDACTED:3164 — analyses._persist_analysis_result has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · auth.get_organization_members (cognitive 17) · ×1
  • auth.get_organization_members (cognitive 17) REDACTED:980 — auth.get_organization_members has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 4 (6 pts), loops 2 (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 · slack.get_team_survey_status (cognitive 17) · ×1
  • slack.get_team_survey_status (cognitive 17) REDACTED:1952 — slack.get_team_survey_status has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2, loops 1 (2 pts), boolean chains 1, 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 · RootlyAPIClient._request_with_retry (cognitive 17) · ×1
  • RootlyAPIClient._request_with_retry (cognitive 17) backend/app/core/rootly_client.py:86 — RootlyAPIClient._request_with_retry has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 2 (4 pts), ternaries 1 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ai_usage_collector.fetch_openai_members (cognitive 17) · ×1
  • ai_usage_collector.fetch_openai_members (cognitive 17) backend/app/services/ai_usage_collector.py:114 — ai_usage_collector.fetch_openai_members has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EnhancedGitHubMatcher._search_by_email_api (cognitive 17) · ×1
  • EnhancedGitHubMatcher._search_by_email_api (cognitive 17) backend/app/services/enhanced_github_matcher.py:551 — EnhancedGitHubMatcher._search_by_email_api has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 1 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · EnhancedGitHubMatcher._search_org_members (cognitive 17) · ×1
  • EnhancedGitHubMatcher._search_org_members (cognitive 17) backend/app/services/enhanced_github_matcher.py:641 — EnhancedGitHubMatcher._search_org_members has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, loops 2, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GitHubCollector._build_email_mapping (cognitive 17) · ×1
  • GitHubCollector._build_email_mapping (cognitive 17) backend/app/services/github_collector.py:292 — GitHubCollector._build_email_mapping has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 3 (5 pts), loops 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GitHubCollector._fetch_contributions_summary (cognitive 17) · ×1
  • GitHubCollector._fetch_contributions_summary (cognitive 17) backend/app/services/github_collector.py:751 — GitHubCollector._fetch_contributions_summary has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3 (4 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 · GitHubCorrelationService.get_correlation_stats (cognitive 17) · ×1
  • GitHubCorrelationService.get_correlation_stats (cognitive 17) REDACTED:453 — GitHubCorrelationService.get_correlation_stats has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), ternaries 4 (5 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LegacyCleanupAuthorization.validate_authorization (cognitive 17) · ×1
  • LegacyCleanupAuthorization.validate_authorization (cognitive 17) backend/app/services/retention_legacy.py:55 — LegacyCleanupAuthorization.validate_authorization has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 7, loops 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · slack_collector.collect_team_slack_data (cognitive 17) · ×1
  • slack_collector.collect_team_slack_data (cognitive 17) backend/app/services/slack_collector.py:958 — slack_collector.collect_team_slack_data has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), error handling 2 (5 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedBurnoutAnalyzer._calculate_work_burnout_och (cognitive 17) · ×1
  • UnifiedBurnoutAnalyzer._calculate_work_burnout_och (cognitive 17) backend/app/services/unified_burnout_analyzer.py:3057 — UnifiedBurnoutAnalyzer._calculate_work_burnout_och has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, ternaries 3, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UnifiedBurnoutAnalyzer._calculate_slack_insights (cognitive 17) · ×1
  • UnifiedBurnoutAnalyzer._calculate_slack_insights (cognitive 17) backend/app/services/unified_burnout_analyzer.py:3855 — UnifiedBurnoutAnalyzer._calculate_slack_insights has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (5 pts), boolean chains 4, loops 3 (4 pts), ternaries 4 (nesting depth added 3). 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 · manage_demo_analyses.load_demo_burnout_reports (cognitive 17) · ×1
  • manage_demo_analyses.load_demo_burnout_reports (cognitive 17) backend/mock_data_helpers/manage_demo_analyses.py:172 — manage_demo_analyses.load_demo_burnout_reports has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 3 (4 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · integration-handlers.deleteIntegration (cognitive 17) · ×1
  • integration-handlers.deleteIntegration (cognitive 17) frontend/src/app/integrations/handlers/integration-handlers.ts:501 — integration-handlers.deleteIntegration has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ObjectiveDataCard.aggregateToWeekly (cognitive 17) · ×1
  • ObjectiveDataCard.aggregateToWeekly (cognitive 17) frontend/src/components/dashboard/ObjectiveDataCard.tsx:121 — ObjectiveDataCard.aggregateToWeekly has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 14, if/else 1, loops 1, ternaries 1. Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 145, 134, 139, …). 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 · BurnoutPredictorTool._detect_early_warnings (cognitive 16) · ×1
  • BurnoutPredictorTool._detect_early_warnings (cognitive 16) backend/app/agents/tools/burnout_predictor.py:262 — BurnoutPredictorTool._detect_early_warnings has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3 (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 · SentimentAnalyzerTool.__call__ (cognitive 16) · ×1
  • SentimentAnalyzerTool.__call__ (cognitive 16) backend/app/agents/tools/sentiment_analyzer.py:36 — SentimentAnalyzerTool.__call__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · invitations.get_my_invitations (cognitive 16) · ×1
  • invitations.get_my_invitations (cognitive 16) backend/app/api/endpoints/invitations.py:113 — invitations.get_my_invitations has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 1 (2 pts), error handling 1, 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 · linear.auto_map_linear_users (cognitive 16) · ×1
  • linear.auto_map_linear_users (cognitive 16) backend/app/api/endpoints/linear.py:1328 — linear.auto_map_linear_users has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 3, error handling 2, loops 2, ternaries 1 (nesting depth added 3). 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 · rootly.update_user_correlation_github_username (cognitive 16) · ×1
  • rootly.update_user_correlation_github_username (cognitive 16) backend/app/api/endpoints/rootly.py:2146 — rootly.update_user_correlation_github_username has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 2, loops 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PagerDutyAPIClient.get_team_scoped_users (cognitive 16) · ×1
  • PagerDutyAPIClient.get_team_scoped_users (cognitive 16) backend/app/core/pagerduty_client.py:396 — PagerDutyAPIClient.get_team_scoped_users has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PlatformScoringFramework._get_component_recommendation (cognitive 16) · ×1
  • PlatformScoringFramework._get_component_recommendation (cognitive 16) backend/app/core/platform_scoring.py:197 — PlatformScoringFramework._get_component_recommendation has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (7 pts) (nesting depth added 3). 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 · EnhancedGitHubMatcher._check_user_commits_for_email (cognitive 16) · ×1
  • EnhancedGitHubMatcher._check_user_commits_for_email (cognitive 16) backend/app/services/enhanced_github_matcher.py:841 — EnhancedGitHubMatcher._check_user_commits_for_email has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (5 pts), boolean chains 1, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GitHubAPIManager.safe_api_call (cognitive 16) · ×1
  • GitHubAPIManager.safe_api_call (cognitive 16) backend/app/services/github_api_manager.py:83 — GitHubAPIManager.safe_api_call has cognitive complexity 16 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 4 (7 pts), 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 · GitHubCollector.get_accessible_orgs (cognitive 16) · ×1
  • GitHubCollector.get_accessible_orgs (cognitive 16) backend/app/services/github_collector.py:45 — GitHubCollector.get_accessible_orgs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 3, boolean chains 1 (nesting depth added 3). 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 · GitHubCollector._fetch_repo_commit_timestamps (cognitive 16) · ×1
  • GitHubCollector._fetch_repo_commit_timestamps (cognitive 16) backend/app/services/github_collector.py:849 — GitHubCollector._fetch_repo_commit_timestamps has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 pts), boolean chains 2 (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 · GitHubCorrelationService._correlate_with_top_contributors (cognitive 16) · ×1
  • GitHubCorrelationService._correlate_with_top_contributors (cognitive 16) REDACTED:302 — GitHubCorrelationService._correlate_with_top_contributors has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, loops 2, error handling 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 · UnifiedBurnoutAnalyzer._generate_insights (cognitive 16) · ×1
  • UnifiedBurnoutAnalyzer._generate_insights (cognitive 16) backend/app/services/unified_burnout_analyzer.py:3522 — UnifiedBurnoutAnalyzer._generate_insights has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UserSyncService._fetch_pagerduty_users (cognitive 16) · ×1
  • UserSyncService._fetch_pagerduty_users (cognitive 16) backend/app/services/user_sync_service.py:271 — UserSyncService._fetch_pagerduty_users has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (4 pts), boolean chains 3 (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 · useValidation.useValidation.validateToken (cognitive 16) · ×1
  • useValidation.useValidation.validateToken (cognitive 16) frontend/src/app/integrations/hooks/useValidation.ts:30 — useValidation.useValidation.validateToken has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 5. Of this number, 10 points are the body's own statements and 6 belong to 2 function literals 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 · UnifiedSlackCard.UnifiedSlackCard · ×1
  • UnifiedSlackCard.UnifiedSlackCard::handleWorkspaceCheck (cognitive 16) frontend/src/app/integrations/components/UnifiedSlackCard.tsx:132 — UnifiedSlackCard.UnifiedSlackCard::handleWorkspaceCheck has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · auth-provider-buttons.AuthProviderButtons (cognitive 16) · ×1
  • auth-provider-buttons.AuthProviderButtons (cognitive 16) frontend/src/components/auth-provider-buttons.tsx:101 — auth-provider-buttons.AuthProviderButtons has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (10 pts), boolean chains 5, error handling 1 (nesting depth added 4). 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 158, handleLogin). 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 · AnthropicUsageCard.AnthropicUsageCard (cognitive 16) · ×1
  • AnthropicUsageCard.AnthropicUsageCard (cognitive 16) frontend/src/components/dashboard/AnthropicUsageCard.tsx:100 — AnthropicUsageCard.AnthropicUsageCard has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9 (15 pts), if/else 1 (nesting depth added 6). Of this number, 12 points are the body's own statements and 4 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 · TeamHealthOverview.getHealthPercentage (cognitive 16) · ×1
  • TeamHealthOverview.getHealthPercentage (cognitive 16) frontend/src/components/dashboard/TeamHealthOverview.tsx:43 — TeamHealthOverview.getHealthPercentage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TeamMembersList.TeamMembersList · ×1
  • TeamMembersList.TeamMembersList::handleMemberClick (cognitive 16) frontend/src/components/dashboard/TeamMembersList.tsx:286 — TeamMembersList.TeamMembersList::handleMemberClick has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 16. 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 · useDashboard.useDashboard.confirmDeleteAnalysis (cognitive 16) · ×1
  • useDashboard.useDashboard.confirmDeleteAnalysis (cognitive 16) frontend/src/hooks/useDashboard.ts:1272 — useDashboard.useDashboard.confirmDeleteAnalysis has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 2 (4 pts), boolean chains 3, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useDashboard.useDashboard.refreshCurrentAnalysis (cognitive 16) · ×1
  • useDashboard.useDashboard.refreshCurrentAnalysis (cognitive 16) frontend/src/hooks/useDashboard.ts:2449 — useDashboard.useDashboard.refreshCurrentAnalysis has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5, boolean chains 4, ternaries 3 (4 pts), error handling 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · data-retention.parseApiError (cognitive 16) · ×1
  • data-retention.parseApiError (cognitive 16) frontend/src/lib/data-retention.ts:154 — data-retention.parseApiError has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, ternaries 3 (4 pts) (nesting depth added 3). Of this number, 15 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Medium CVE · ×1
  • REDACTED
D32 · Data Compliance (PII/GDPR) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×1
  • Change-coupling hub: UserAlertsCard.tsx → REDACTED, rootly_client.py, AlertsCountCard.tsx frontend/src/components/dashboard/UserAlertsCard.tsx — `frontend/src/components/dashboard/UserAlertsCard.tsx` changes together with 3 other files — `REDACTED`, `backend/app/core/rootly_client.py`, `frontend/src/components/dashboard/AlertsCountCard.tsx` — 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (3 members, 28 shared lines) · ×1
  • Near-duplicate member family (3 members, 28 shared lines) backend/app/services/github_mapping_service.py:50 — backend/app/services/github_mapping_service.py:50-131 | backend/app/services/jira_mapping_service.py:44-106 | backend/app/services/linear_mapping_service.py:44-106 — These 3 members are variants of one another: a block of 28 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member pair (158 shared lines) · ×1
  • Near-duplicate member pair (158 shared lines) backend/app/api/endpoints/manual_mappings.py:798 — backend/app/api/endpoints/manual_mappings.py:798-1010 | backend/app/api/endpoints/manual_mappings.py:1018-1258 — These two members are variants of one another: 158 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (7 members, 50+ identical tokens) REDACTED:288 — REDACTED:288-477 | REDACTED:491-589 | REDACTED:597-623 | REDACTED:632-662 | REDACTED:671-742 | REDACTED:751-807 | REDACTED:1148-1237 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Edited copy of a member (167 corresponding lines) · ×1
  • Edited copy of a member (167 corresponding lines) REDACTED:96 — REDACTED:96-262 | backend/app/api/endpoints/linear.py:129-304 — These two members are one piece of code written twice and then edited apart: 167 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (124 corresponding lines) · ×1
  • Edited copy of a member (124 corresponding lines) backend/app/api/endpoints/github.py:79 — backend/app/api/endpoints/github.py:79-202 | backend/app/api/endpoints/github.py:459-604 — These two members are one piece of code written twice and then edited apart: 124 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (72 corresponding lines) · ×1
  • Edited copy of a member (72 corresponding lines) backend/mock_data_helpers/assign_analysis_to_user.py:93 — backend/mock_data_helpers/assign_analysis_to_user.py:93-164 | backend/mock_data_helpers/load_demo_analyses.py:217-314 — These two members are one piece of code written twice and then edited apart: 72 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 77+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 77+ corresponding lines) REDACTED:182 — REDACTED:182-280 | REDACTED:314-410 | REDACTED:441-517 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 77 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (133 corresponding lines) · ×1
  • Edited copy of a member (133 corresponding lines) backend/app/services/jira_mapping_service.py:160 — backend/app/services/jira_mapping_service.py:160-292 | backend/app/services/linear_mapping_service.py:160-292 — These two members are one piece of code written twice and then edited apart: 133 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (58 corresponding lines) · ×1
  • Edited copy of a member (58 corresponding lines) backend/app/services/ai_usage_collector.py:54 — backend/app/services/ai_usage_collector.py:54-111 | backend/app/services/ai_usage_collector.py:156-224 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (108 corresponding lines) · ×1
  • Edited copy of a member (108 corresponding lines) backend/app/services/unified_burnout_analyzer.py:5464 — backend/app/services/unified_burnout_analyzer.py:5464-5572 | backend/app/services/unified_burnout_analyzer.py:5815-5922 — These two members are one piece of code written twice and then edited apart: 108 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 63+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 63+ corresponding lines) backend/app/services/manual_mapping_service.py:287 — backend/app/services/manual_mapping_service.py:287-349 | backend/app/services/manual_mapping_service.py:356-419 | backend/app/services/manual_mapping_service.py:426-489 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 63 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (88 corresponding lines) · ×1
  • Edited copy of a member (88 corresponding lines) backend/app/api/endpoints/invitations.py:286 — backend/app/api/endpoints/invitations.py:286-373 | backend/app/api/endpoints/invitations.py:381-472 — These two members are one piece of code written twice and then edited apart: 88 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (77 corresponding lines) · ×1
  • Edited copy of a member (77 corresponding lines) REDACTED:536 — REDACTED:536-612 | backend/app/api/endpoints/linear.py:363-442 — These two members are one piece of code written twice and then edited apart: 77 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (48 corresponding lines) · ×1
  • Edited copy of a member (48 corresponding lines) backend/app/core/pagerduty_client.py:203 — backend/app/core/pagerduty_client.py:203-274 | backend/app/core/pagerduty_client.py:277-324 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 47+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 47+ corresponding lines) backend/app/agents/tools/pattern_analyzer.py:118 — backend/app/agents/tools/pattern_analyzer.py:118-178 | backend/app/agents/tools/pattern_analyzer.py:181-239 | backend/app/agents/tools/pattern_analyzer.py:242-288 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 47 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) backend/app/core/rootly_client.py:417 — backend/app/core/rootly_client.py:417-446 | backend/app/core/rootly_client.py:449-477 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) backend/app/services/unified_burnout_analyzer.py:3025 — backend/app/services/unified_burnout_analyzer.py:3025-3055 | backend/app/services/unified_burnout_analyzer.py:3155-3201 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (47 corresponding lines) · ×1
  • Edited copy of a member (47 corresponding lines) backend/app/services/integration_validator.py:462 — backend/app/services/integration_validator.py:462-508 | backend/app/services/integration_validator.py:690-736 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) backend/app/api/endpoints/github.py:611 — backend/app/api/endpoints/github.py:611-653 | REDACTED:1298-1325 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (44 corresponding lines) · ×1
  • Edited copy of a member (44 corresponding lines) backend/app/core/api_cache.py:128 — backend/app/core/api_cache.py:128-171 | backend/app/core/validation_cache.py:91-134 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 23+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 23+ corresponding lines) backend/app/core/validation_cache.py:49 — backend/app/core/validation_cache.py:49-87 | backend/app/services/github_org_cache.py:45-67 | backend/app/services/github_org_cache.py:92-114 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 32+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 32+ corresponding lines) backend/app/services/notification_service.py:90 — backend/app/services/notification_service.py:90-121 | backend/app/services/notification_service.py:227-260 | backend/app/services/notification_service.py:427-467 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 32 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) backend/app/services/integration_validator.py:813 — backend/app/services/integration_validator.py:813-837 | backend/app/services/token_manager.py:300-336 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×1
  • Edited copy of a member (18 corresponding lines) backend/app/auth/oauth.py:81 — backend/app/auth/oauth.py:81-98 | backend/app/auth/oauth.py:264-284 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×1
  • Edited copy of a member (23 corresponding lines) backend/app/auth/integration_oauth.py:216 — backend/app/auth/integration_oauth.py:216-240 | backend/app/auth/integration_oauth.py:243-265 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 34+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 34+ corresponding lines) backend/app/services/manual_mapping_service.py:154 — backend/app/services/manual_mapping_service.py:154-187 | backend/app/services/manual_mapping_service.py:195-233 | backend/app/services/manual_mapping_service.py:241-280 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 34 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 18+ corresponding lines) REDACTED:153 — REDACTED:153-173 | REDACTED:285-305 | REDACTED:415-432 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×1
  • Edited copy of a member (9 corresponding lines) backend/app/auth/integration_oauth.py:430 — backend/app/auth/integration_oauth.py:430-438 | backend/app/auth/integration_oauth.py:441-450 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×1
  • Edited copy of a member (26 corresponding lines) backend/app/services/ai_burnout_analyzer.py:1311 — backend/app/services/ai_burnout_analyzer.py:1311-1337 | backend/app/services/ai_burnout_analyzer.py:1340-1365 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 17+ corresponding lines) backend/app/utils/visual_logger.py:56 — backend/app/utils/visual_logger.py:56-73 | backend/app/utils/visual_logger.py:191-207 | backend/app/utils/visual_logger.py:215-235 | backend/app/utils/visual_logger.py:244-260 | backend/app/utils/visual_logger.py:269-286 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×1
  • Edited copy of a member (19 corresponding lines) backend/app/agents/burnout_agent.py:126 — backend/app/agents/burnout_agent.py:126-144 | REDACTED:28-49 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 3+ corresponding lines) backend/app/services/retention_legacy.py:108 — backend/app/services/retention_legacy.py:108-110 | backend/app/services/retention_scheduler.py:54-56 | backend/app/services/retention_status.py:29-31 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (82 lines × 2) · ×1
  • Duplicated block (82 lines × 2) backend/app/api/endpoints/manual_mappings.py:929 — backend/app/api/endpoints/manual_mappings.py:929-1010 | backend/app/api/endpoints/manual_mappings.py:1177-1258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/api/endpoints/manual_mappings.py:929` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (79 lines × 2) · ×1
  • Duplicated block (79 lines × 2) backend/app/services/enhanced_jira_matcher.py:35 — backend/app/services/enhanced_jira_matcher.py:35-113 | backend/app/services/enhanced_linear_matcher.py:35-113 — before extracting anything, compare `backend/app/services/enhanced_jira_matcher.py` and `backend/app/services/enhanced_linear_matcher.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (72 lines × 2) · ×1
  • Duplicated block (72 lines × 2) backend/app/services/jira_mapping_service.py:221 — backend/app/services/jira_mapping_service.py:221-292 | backend/app/services/linear_mapping_service.py:221-292 — before extracting anything, compare `backend/app/services/jira_mapping_service.py` and `backend/app/services/linear_mapping_service.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/services/jira_mapping_service.py:221` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (62–64 lines × 2) · ×1
  • Duplicated block (62–64 lines × 2) backend/app/api/endpoints/rootly.py:1082 — backend/app/api/endpoints/rootly.py:1082-1143 | backend/app/api/endpoints/rootly.py:1192-1255 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (60–62 lines × 2) · ×1
  • Duplicated block (60–62 lines × 2) backend/app/api/endpoints/github.py:121 — backend/app/api/endpoints/github.py:121-182 | backend/app/api/endpoints/github.py:518-577 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (59 lines × 2) · ×1
  • Duplicated block (59 lines × 2) backend/app/services/jira_mapping_service.py:44 — backend/app/services/jira_mapping_service.py:44-102 | backend/app/services/linear_mapping_service.py:44-102 — before extracting anything, compare `backend/app/services/jira_mapping_service.py` and `backend/app/services/linear_mapping_service.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/services/jira_mapping_service.py:44` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (50 lines × 2) · ×1
  • Duplicated block (50 lines × 2) backend/app/services/enhanced_jira_matcher.py:121 — backend/app/services/enhanced_jira_matcher.py:121-170 | backend/app/services/enhanced_linear_matcher.py:121-170 — before extracting anything, compare `backend/app/services/enhanced_jira_matcher.py` and `backend/app/services/enhanced_linear_matcher.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (43–47 lines × 3) · ×1
  • Duplicated block (43–47 lines × 3) backend/app/api/endpoints/manual_mappings.py:576 — backend/app/api/endpoints/manual_mappings.py:576-622 | backend/app/api/endpoints/manual_mappings.py:819-861 | backend/app/api/endpoints/manual_mappings.py:1039-1081 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (44 lines × 2) · ×1
  • Duplicated block (44 lines × 2) backend/app/services/unified_burnout_analyzer.py:5512 — backend/app/services/unified_burnout_analyzer.py:5512-5555 | backend/app/services/unified_burnout_analyzer.py:5863-5906 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (41 lines × 3) · ×1
  • Duplicated block (41 lines × 3) backend/app/services/manual_mapping_service.py:287 — backend/app/services/manual_mapping_service.py:287-327 | backend/app/services/manual_mapping_service.py:356-396 | backend/app/services/manual_mapping_service.py:426-466 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/services/manual_mapping_service.py:287` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (34–36 lines × 2) · ×1
  • Duplicated block (34–36 lines × 2) REDACTED:3540 — REDACTED:3540-3575 | REDACTED:3589-3622 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:3576` calls `get`, `info` and `REDACTED:3623` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×1
  • Duplicated block (36 lines × 2) backend/app/services/notification_service.py:151 — backend/app/services/notification_service.py:151-186 | backend/app/services/notification_service.py:189-224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (33 lines × 2) · ×1
  • Duplicated block (33 lines × 2) REDACTED:539 — REDACTED:539-571 | backend/app/api/endpoints/linear.py:369-401 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: `IntegrationValidator` names `...services.integration_validator` in one and `app.services.integration_validator` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (31–32 lines × 2) · ×1
  • Duplicated block (31–32 lines × 2) backend/app/services/account_linking.py:156 — backend/app/services/account_linking.py:156-187 | backend/app/services/account_linking.py:199-229 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (30–31 lines × 3) · ×1
  • Duplicated block (30–31 lines × 3) backend/app/api/endpoints/rootly.py:2381 — backend/app/api/endpoints/rootly.py:2381-2410 | backend/app/api/endpoints/rootly.py:2492-2522 | backend/app/api/endpoints/rootly.py:2619-2648 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/api/endpoints/rootly.py:2381` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×1
  • Duplicated block (31 lines × 2) backend/app/services/integration_validator.py:462 — backend/app/services/integration_validator.py:462-492 | backend/app/services/integration_validator.py:690-720 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/services/integration_validator.py:462` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `integration` to `LinearIntegration` in one and `JiraIntegration` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (17–29 lines × 4) · ×1
  • Duplicated block (17–29 lines × 4) backend/app/api/endpoints/rootly.py:2312 — backend/app/api/endpoints/rootly.py:2312-2333 | backend/app/api/endpoints/rootly.py:2423-2444 | backend/app/api/endpoints/rootly.py:2534-2562 | backend/app/api/endpoints/rootly.py:2660-2676 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/api/endpoints/rootly.py:2312` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (27–29 lines × 2) · ×1
  • Duplicated block (27–29 lines × 2) backend/app/api/endpoints/manual_mappings.py:1111 — backend/app/api/endpoints/manual_mappings.py:1111-1139 | backend/app/services/user_sync_service.py:1531-1557 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/api/endpoints/manual_mappings.py:1111` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×1
  • Duplicated block (28 lines × 2) REDACTED:2323 — REDACTED:2323-2350 | REDACTED:2650-2677 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:2353` calls `get` and `REDACTED:2678` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (24–27 lines × 4) · ×1
  • Duplicated block (24–27 lines × 4) backend/app/api/endpoints/rootly.py:2278 — backend/app/api/endpoints/rootly.py:2278-2301 | backend/app/api/endpoints/rootly.py:2387-2412 | backend/app/api/endpoints/rootly.py:2498-2524 | backend/app/api/endpoints/rootly.py:2625-2650 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (23–27 lines × 2) · ×1
  • Duplicated block (23–27 lines × 2) backend/app/services/unified_burnout_analyzer.py:5377 — backend/app/services/unified_burnout_analyzer.py:5377-5403 | backend/app/services/unified_burnout_analyzer.py:5742-5764 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (22–26 lines × 3) · ×1
  • Duplicated block (22–26 lines × 3) backend/app/api/endpoints/invitations.py:348 — backend/app/api/endpoints/invitations.py:348-373 | backend/app/api/endpoints/invitations.py:451-472 | backend/app/api/endpoints/invitations.py:588-609 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/api/endpoints/invitations.py:348` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19–25 lines × 3) · ×1
  • Duplicated block (19–25 lines × 3) REDACTED:226 — REDACTED:226-250 | REDACTED:356-380 | REDACTED:478-496 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:226` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19–24 lines × 2) · ×1
  • Duplicated block (19–24 lines × 2) backend/app/services/token_manager.py:171 — backend/app/services/token_manager.py:171-189 | backend/app/services/token_manager.py:257-280 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/services/token_manager.py:171` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (19–23 lines × 3) · ×1
  • Duplicated block (19–23 lines × 3) backend/app/api/endpoints/manual_mappings.py:627 — backend/app/api/endpoints/manual_mappings.py:627-649 | backend/app/api/endpoints/manual_mappings.py:864-882 | backend/app/api/endpoints/manual_mappings.py:1084-1102 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (20–23 lines × 2) · ×1
  • Duplicated block (20–23 lines × 2) backend/app/api/endpoints/linear.py:900 — backend/app/api/endpoints/linear.py:900-922 | backend/app/api/endpoints/linear.py:1381-1400 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (21–23 lines × 2) · ×1
  • Duplicated block (21–23 lines × 2) backend/mock_data_helpers/assign_analysis_to_user.py:144 — backend/mock_data_helpers/assign_analysis_to_user.py:144-164 | backend/mock_data_helpers/load_demo_analyses.py:292-314 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (18–19 lines × 4) · ×1
  • Duplicated block (18–19 lines × 4) backend/app/api/endpoints/rootly.py:1168 — backend/app/api/endpoints/rootly.py:1168-1186 | backend/app/api/endpoints/rootly.py:1582-1599 | backend/app/api/endpoints/rootly.py:1992-2010 | backend/app/api/endpoints/rootly.py:2103-2121 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `backend/app/api/endpoints/rootly.py:1579` calls `PagerDutyAPIClient` and `backend/app/api/endpoints/rootly.py:1989` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (17–19 lines × 2) · ×1
  • Duplicated block (17–19 lines × 2) backend/app/services/auto_refresh_scheduler.py:182 — backend/app/services/auto_refresh_scheduler.py:182-198 | backend/app/services/auto_refresh_scheduler.py:252-270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/services/auto_refresh_scheduler.py:182` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–18 lines × 2) · ×1
  • Duplicated block (15–18 lines × 2) REDACTED:879 — REDACTED:879-896 | REDACTED:1103-1117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:879` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:897` calls `debug` and `REDACTED:1118` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (16–18 lines × 2) · ×1
  • Duplicated block (16–18 lines × 2) backend/app/core/rootly_client.py:417 — backend/app/core/rootly_client.py:417-434 | backend/app/core/rootly_client.py:449-464 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (17 lines × 5) · ×1
  • Duplicated block (17 lines × 5) backend/app/api/endpoints/rootly.py:2163 — backend/app/api/endpoints/rootly.py:2163-2179 | backend/app/api/endpoints/rootly.py:2324-2340 | backend/app/api/endpoints/rootly.py:2435-2451 | backend/app/api/endpoints/rootly.py:2553-2569 | backend/app/api/endpoints/rootly.py:2667-2683 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `backend/app/api/endpoints/rootly.py:2453` calls `info` and `backend/app/api/endpoints/rootly.py:2342` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (15–17 lines × 3) · ×1
  • Duplicated block (15–17 lines × 3) REDACTED:1276 — REDACTED:1276-1290 | REDACTED:1436-1450 | REDACTED:2024-2040 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (15–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) backend/app/api/endpoints/rootly.py:1390 — backend/app/api/endpoints/rootly.py:1390-1404 | backend/app/api/endpoints/rootly.py:1449-1465 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14–16 lines × 5) · ×1
  • Duplicated block (14–16 lines × 5) backend/app/services/jira_user_sync_service.py:244 — backend/app/services/jira_user_sync_service.py:244-259 | backend/app/services/user_sync_service.py:1091-1104 | backend/app/services/user_sync_service.py:1320-1333 | backend/app/services/user_sync_service.py:1443-1456 | backend/app/services/user_sync_service.py:1596-1609 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `backend/app/services/user_sync_service.py:1590` calls `EnhancedLinearMatcher` and `backend/app/services/user_sync_service.py:1314` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×1
  • Duplicated block (16 lines × 3) backend/app/auth/integration_oauth.py:42 — backend/app/auth/integration_oauth.py:42-57 | backend/app/auth/integration_oauth.py:188-204 | backend/app/auth/oauth.py:127-142 — before extracting anything, compare `backend/app/auth/integration_oauth.py` and `backend/app/auth/oauth.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) backend/app/auth/integration_oauth.py:395 — backend/app/auth/integration_oauth.py:395-410 | backend/app/auth/integration_oauth.py:413-427 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (14–16 lines × 2) · ×1
  • Duplicated block (14–16 lines × 2) backend/app/services/github_only_burnout_analyzer.py:419 — backend/app/services/github_only_burnout_analyzer.py:419-434 | backend/app/services/github_only_burnout_analyzer.py:470-483 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15 lines × 4) · ×1
  • Duplicated block (15 lines × 4) backend/app/auth/integration_oauth.py:41 — backend/app/auth/integration_oauth.py:41-56 | backend/app/auth/integration_oauth.py:187-203 | backend/app/auth/integration_oauth.py:663-677 | backend/app/auth/oauth.py:126-141 — before extracting anything, compare `backend/app/auth/integration_oauth.py` and `backend/app/auth/oauth.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 74 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/app/auth/integration_oauth.py:41` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) REDACTED:701 — REDACTED:701-715 | REDACTED:766-780 | REDACTED:1195-1209 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:701` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:699` calls `isnot` and `REDACTED:764` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10–13 lines × 6) · ×1
  • Duplicated block (10–13 lines × 6) REDACTED:449 — REDACTED:449-461 | REDACTED:607-616 | REDACTED:646-655 | REDACTED:723-735 | REDACTED:788-800 | REDACTED:1224-1233 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:449` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:618` calls `extract_analysis_summary` and `REDACTED:462` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×1
  • Duplicated block (13 lines × 4) backend/app/services/enhanced_jira_matcher.py:98 — backend/app/services/enhanced_jira_matcher.py:98-110 | backend/app/services/enhanced_jira_matcher.py:156-168 | backend/app/services/enhanced_linear_matcher.py:98-110 | backend/app/services/enhanced_linear_matcher.py:156-168 — before extracting anything, compare `backend/app/services/enhanced_jira_matcher.py` and `backend/app/services/enhanced_linear_matcher.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) REDACTED:1153 — REDACTED:1153-1161 | backend/app/services/unified_burnout_analyzer.py:5195-5204 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (7–9 lines × 5) · ×1
  • Duplicated block (7–9 lines × 5) backend/app/api/endpoints/linear.py:1210 — backend/app/api/endpoints/linear.py:1210-1216 | backend/app/services/integration_validator.py:540-546 | backend/app/services/integration_validator.py:847-853 | backend/app/services/token_manager.py:184-192 | backend/app/services/token_manager.py:274-282 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Note first that the copies are not typed on the same thing: the declarations holding them bind `integration` to `LinearIntegration` in one and `Union[JiraIntegration, LinearIntegration]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `backend/app/services/token_manager.py:195` calls `commit` and `backend/app/services/token_manager.py:284` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) backend/app/api/endpoints/ai_usage.py:128 — backend/app/api/endpoints/ai_usage.py:128-136 | backend/app/api/endpoints/ai_usage.py:146-153 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) backend/app/api/endpoints/analysis.py:599 — backend/app/api/endpoints/analysis.py:599-605 | backend/app/api/endpoints/analysis.py:678-685 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×1
  • Duplicated block (6 lines × 2) backend/app/utils/visual_logger.py:125 — backend/app/utils/visual_logger.py:125-131 | backend/app/utils/visual_logger.py:167-172 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×1
  • Duplicated block (5 lines × 4) backend/app/core/rootly_client.py:1290 — backend/app/core/rootly_client.py:1290-1296 | backend/app/core/rootly_client.py:1298-1302 | backend/app/core/rootly_client.py:1304-1308 | backend/app/core/rootly_client.py:1310-1314 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) backend/app/services/github_mapping_service.py:125 — backend/app/services/github_mapping_service.py:125-131 | backend/app/services/jira_mapping_service.py:100-106 | backend/app/services/linear_mapping_service.py:100-106 — before extracting anything, compare `backend/app/services/jira_mapping_service.py` and `backend/app/services/linear_mapping_service.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) backend/app/api/endpoints/github.py:28 — backend/app/api/endpoints/github.py:28-32 | backend/app/api/endpoints/llm.py:23-27 | REDACTED:97-101 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×1
  • Duplicated block (11 lines × 3) backend/app/core/api_cache.py:30 — backend/app/core/api_cache.py:30-40 | backend/app/core/validation_cache.py:30-40 | backend/app/services/github_org_cache.py:27-37 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: GitHubOAuth (LCOM4 4) backend/app/auth/oauth.py:100 — GitHubOAuth'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.
P5 · DR & Backup · No DR/backup evidence · ×1
  • No DR/backup evidence — A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced — a volume that survives a container recreate is not a tested restore from catastrophic loss.
P8 · Schema migrations · Schema created by SQLAlchemy create_all() outside the migrations · ×1
  • Schema created by SQLAlchemy create_all() outside the migrations backend/app/models/base.py:163 — This repository versions its schema (versioned SQL), but SQLAlchemy create_all() here builds or alters the schema from the model as well, outside that history — the two paths can disagree about the shape, and a change made this way is never a reviewed migration. Turn it off and let versioned SQL own the schema.
R10 · Code Duplication · Duplication concentrated across 4 sibling directories (62 clone groups) · ×1
  • Duplication concentrated across 4 sibling directories (62 clone groups) frontend/src/app/dashboard/page.tsx:178 — 62 duplicated blocks under frontend/src/ have copies in at least two of the sibling directories app, components, contexts, hooks — 37 of them are reported below, and 25 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 62 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 62 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 62 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 8 sibling directories (21 clone groups) · ×1
  • Duplication concentrated across 8 sibling directories (21 clone groups) frontend/src/app/disclaimer/page.tsx:135 — 21 duplicated blocks under frontend/src/app/ have copies in at least two of the sibling directories auth, dashboard, disclaimer, integrations, management, methodology (+2 more sibling(s) not listed) — 13 of them are reported below, and 8 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 21 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 21 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 21 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 (335 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (335 matched lines × 2 locations) frontend/src/components/dashboard/ObjectiveDataCard.tsx:244 — frontend/src/components/dashboard/ObjectiveDataCard.tsx:244 · frontend/src/components/dashboard/UserObjectiveDataCard.tsx:182 — the two spans are one implementation copied and then locally edited — 2050 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 (300 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (300 matched lines × 2 locations) frontend/src/components/integrations/github-integration-card.tsx:50 — frontend/src/components/integrations/github-integration-card.tsx:50 · frontend/src/components/integrations/slack-integration-card.tsx:49 — the two spans are one implementation copied and then locally edited — 1513 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 (289 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (289 matched lines × 2 locations) frontend/src/components/dashboard/AlertsCountCard.tsx:308 — frontend/src/components/dashboard/AlertsCountCard.tsx:308 · frontend/src/components/dashboard/UserAlertsCard.tsx:234 — the two spans are one implementation copied and then locally edited — 2522 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 (189 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (189 matched lines × 2 locations) frontend/src/app/integrations/handlers/jira-handlers.ts:7 — frontend/src/app/integrations/handlers/jira-handlers.ts:7 · frontend/src/app/integrations/handlers/linear-handlers.ts:7 — the two spans are one implementation copied and then locally edited — 1073 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 (122 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (122 matched lines × 2 locations) frontend/src/app/integrations/components/JiraConnectedCard.tsx:46 — frontend/src/app/integrations/components/JiraConnectedCard.tsx:46 · frontend/src/app/integrations/components/LinearConnectedCard.tsx:39 — the two spans are one implementation copied and then locally edited — 634 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) frontend/src/app/integrations/components/IntegrationCardItem.tsx:74 — frontend/src/app/integrations/components/IntegrationCardItem.tsx:74 · REDACTED:2991 — the two spans are one implementation copied and then locally edited — 692 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 (109 identical lines × 2 files) · ×1
  • Wholesale file copy (109 identical lines × 2 files) frontend/src/components/dashboard/AnthropicUsageCard.tsx:3 — frontend/src/components/dashboard/AnthropicUsageCard.tsx:3 · frontend/src/components/dashboard/OpenAIUsageCard.tsx:3 — these 2 files are line-for-line copies of one another — 109 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 (98 lines × 2 locations) · ×1
  • Duplicated block (98 lines × 2 locations) frontend/src/app/setup/jira/callback/page.tsx:9 — frontend/src/app/setup/jira/callback/page.tsx:9 · frontend/src/app/setup/linear/callback/page.tsx:9 — 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 (87 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (87 matched lines × 2 locations) frontend/src/components/ui/dialog.tsx:9 — frontend/src/components/ui/dialog.tsx:9 · frontend/src/components/ui/sheet.tsx:10 — the two spans are one implementation copied and then locally edited — 454 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 (84 lines × 2 locations) · ×1
  • Duplicated block (84 lines × 2 locations) frontend/src/app/integrations/components/JiraManualSetupForm.tsx:181 — frontend/src/app/integrations/components/JiraManualSetupForm.tsx:181 · frontend/src/app/integrations/components/LinearManualSetupForm.tsx:134 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block with local edits (84 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (84 matched lines × 2 locations) frontend/src/components/dashboard/ObjectiveDataCard.tsx:49 — frontend/src/components/dashboard/ObjectiveDataCard.tsx:49 · frontend/src/components/dashboard/UserObjectiveDataCard.tsx:46 — the two spans are one implementation copied and then locally edited — 678 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 (80 lines × 2 locations) · ×1
  • Duplicated block (80 lines × 2 locations) REDACTED:434 — REDACTED:434 · REDACTED:542 — 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 (71 lines × 2 locations) · ×1
  • Duplicated block (71 lines × 2 locations) frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx:125 — frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx:125 · frontend/src/app/integrations/components/RootlyIntegrationForm.tsx:215 — the 2 copies are spread across 2 files, 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 (66 lines × 2 locations) · ×1
  • Duplicated block (66 lines × 2 locations) frontend/src/components/integrations/jira-integration-card.tsx:243 — frontend/src/components/integrations/jira-integration-card.tsx:243 · frontend/src/components/integrations/slack-integration-card.tsx:192 — 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 · Wholesale file copy (62 identical lines × 2 files) · ×1
  • Wholesale file copy (62 identical lines × 2 files) frontend/src/app/integrations/components/AnthropicUsageConnectedCard.tsx:1 — frontend/src/app/integrations/components/AnthropicUsageConnectedCard.tsx:1 · frontend/src/app/integrations/components/OpenAIUsageConnectedCard.tsx:1 — these 2 files are line-for-line copies of one another — 62 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 (55 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (55 matched lines × 2 locations) frontend/src/app/integrations/dialogs/JiraDisconnectDialog.tsx:12 — frontend/src/app/integrations/dialogs/JiraDisconnectDialog.tsx:12 · frontend/src/app/integrations/dialogs/LinearDisconnectDialog.tsx:12 — the two spans are one implementation copied and then locally edited — 218 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 (55 lines × 2 locations) · ×1
  • Duplicated block (55 lines × 2 locations) frontend/src/app/integrations/handlers/integration-handlers.ts:116 — frontend/src/app/integrations/handlers/integration-handlers.ts:116 · frontend/src/app/integrations/handlers/integration-handlers.ts:175 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block with local edits (54 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (54 matched lines × 2 locations) frontend/src/components/dashboard/GitHubAllMetricsPopup.tsx:20 — frontend/src/components/dashboard/GitHubAllMetricsPopup.tsx:20 · frontend/src/components/dashboard/RiskFactorsAllPopup.tsx:22 — the two spans are one implementation copied and then locally edited — 302 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 (52 lines × 2 locations) · ×1
  • Duplicated block (52 lines × 2 locations) REDACTED:2489 — REDACTED:2489 · REDACTED:2557 — 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 (52 lines × 3 locations) · ×1
  • Duplicated block (52 lines × 3 locations) frontend/src/app/management/components/UserMappingDrawer.tsx:248 — frontend/src/app/management/components/UserMappingDrawer.tsx:248 · frontend/src/app/management/components/UserMappingDrawer.tsx:331 · frontend/src/app/management/components/UserMappingDrawer.tsx:422 — all 3 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (50 lines × 2 locations) · ×1
  • Duplicated block (50 lines × 2 locations) frontend/src/components/dashboard/SurveyResultsCard.tsx:225 — frontend/src/components/dashboard/SurveyResultsCard.tsx:225 · frontend/src/components/dashboard/SurveyResultsCard.tsx:317 — 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 (47 lines × 3 locations) · ×1
  • Duplicated block (47 lines × 3 locations) frontend/src/components/dashboard/AnthropicUsageCard.tsx:8 — frontend/src/components/dashboard/AnthropicUsageCard.tsx:8 · frontend/src/components/dashboard/MemberOpenAIUsageCard.tsx:8 · frontend/src/components/dashboard/OpenAIUsageCard.tsx:8 — the 3 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. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block (46 lines × 2 locations) · ×1
  • Duplicated block (46 lines × 2 locations) frontend/src/components/integrations/enhancement-cards.tsx:47 — frontend/src/components/integrations/enhancement-cards.tsx:47 · frontend/src/components/integrations/enhancement-cards.tsx:160 — 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 (45 lines × 2 locations) · ×1
  • Duplicated block (45 lines × 2 locations) REDACTED:1183 — REDACTED:1183 · REDACTED:1279 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (44 lines × 2 locations) · ×1
  • Duplicated block (44 lines × 2 locations) frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx:231 — frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx:231 · frontend/src/app/integrations/components/RootlyIntegrationForm.tsx:443 — the 2 copies are spread across 2 files, 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 (39 lines × 2 locations) · ×1
  • Duplicated block (39 lines × 2 locations) frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx:82 — frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx:82 · frontend/src/app/integrations/components/RootlyIntegrationForm.tsx:170 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (38 lines × 4 locations) · ×1
  • Duplicated block (38 lines × 4 locations) frontend/src/components/dashboard/TicketingCard.tsx:199 — frontend/src/components/dashboard/TicketingCard.tsx:199 · frontend/src/components/dashboard/TicketingCard.tsx:300 · frontend/src/components/dashboard/TicketingCard.tsx:385 · frontend/src/components/dashboard/TicketingCard.tsx:486 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
R10 · Code Duplication · Duplicated block (37 lines × 2 locations) · ×1
  • Duplicated block (37 lines × 2 locations) frontend/src/components/integrations/integrations-cards.tsx:169 — frontend/src/components/integrations/integrations-cards.tsx:169 · frontend/src/components/integrations/integrations-cards.tsx:209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (36 lines × 3 locations) · ×1
  • Duplicated block (36 lines × 3 locations) frontend/src/app/integrations/handlers/github-handlers.ts:7 — frontend/src/app/integrations/handlers/github-handlers.ts:7 · frontend/src/app/integrations/handlers/jira-handlers.ts:7 · frontend/src/app/integrations/handlers/linear-handlers.ts:7 — the 3 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. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block (35 lines × 3 locations) · ×1
  • Duplicated block (35 lines × 3 locations) frontend/src/components/ui/alert-dialog.tsx:43 — frontend/src/components/ui/alert-dialog.tsx:43 · frontend/src/components/ui/dialog.tsx:51 · frontend/src/components/ui/sheet.tsx:72 — the 3 copies are spread across 3 files, 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.
R2 · Cyclomatic Complexity · Complex function IntegrationsPage (cyclomatic 129, cognitive 113) · ×1
  • Complex function IntegrationsPage (cyclomatic 129, cognitive 113) REDACTED:179 — IntegrationsPage has cyclomatic complexity 129 and cognitive complexity 113; 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 DashboardContent (cyclomatic 127, cognitive 105) · ×1
  • Complex function DashboardContent (cyclomatic 127, cognitive 105) frontend/src/app/dashboard/page.tsx:133 — DashboardContent has cyclomatic complexity 127 and cognitive complexity 105; 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 addIntegration (cyclomatic 63, cognitive 108) · ×1
  • Complex function addIntegration (cyclomatic 63, cognitive 108) frontend/src/app/integrations/handlers/integration-handlers.ts:234 — addIntegration has cyclomatic complexity 63 and cognitive complexity 108; 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 loadIntegrations (cyclomatic 61, cognitive 97) · ×1
  • Complex function loadIntegrations (cyclomatic 61, cognitive 97) frontend/src/hooks/useDashboard.ts:1411 — loadIntegrations has cyclomatic complexity 61 and cognitive complexity 97; 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 UserAlertsCard (cyclomatic 60, cognitive 56) · ×1
  • Complex function UserAlertsCard (cyclomatic 60, cognitive 56) frontend/src/components/dashboard/UserAlertsCard.tsx:150 — UserAlertsCard has cyclomatic complexity 60 and cognitive complexity 56; 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 RootlyIntegrationForm (cyclomatic 55, cognitive 46) · ×1
  • Complex function RootlyIntegrationForm (cyclomatic 55, cognitive 46) frontend/src/app/integrations/components/RootlyIntegrationForm.tsx:30 — RootlyIntegrationForm has cyclomatic complexity 55 and cognitive complexity 46; 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 MappingDrawer (cyclomatic 54, cognitive 47) · ×1
  • Complex function MappingDrawer (cyclomatic 54, cognitive 47) frontend/src/components/mapping-drawer.tsx:71 — MappingDrawer has cyclomatic complexity 54 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 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 TeamPageContent (cyclomatic 53, cognitive 45) · ×1
  • Complex function TeamPageContent (cyclomatic 53, cognitive 45) frontend/src/app/management/page.tsx:82 — TeamPageContent has cyclomatic complexity 53 and cognitive complexity 45; 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 51, cognitive 50) · ×1
  • Complex function (anonymous) (cyclomatic 51, cognitive 50) frontend/src/app/management/page.tsx:1528 — (anonymous) has cyclomatic complexity 51 and cognitive complexity 50; 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 DataRetentionSettings (cyclomatic 50, cognitive 44) · ×1
  • Complex function DataRetentionSettings (cyclomatic 50, cognitive 44) frontend/src/app/management/components/DataRetentionSettings.tsx:22 — DataRetentionSettings has cyclomatic complexity 50 and cognitive complexity 44; 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 startAnalysis (cyclomatic 45, cognitive 98) · ×1
  • Complex function startAnalysis (cyclomatic 45, cognitive 98) frontend/src/hooks/useDashboard.ts:1866 — startAnalysis has cyclomatic complexity 45 and cognitive complexity 98; 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 SlackSurveyTabs (cyclomatic 43, cognitive 39) · ×1
  • Complex function SlackSurveyTabs (cyclomatic 43, cognitive 39) frontend/src/components/SlackSurveyTabs.tsx:43 — SlackSurveyTabs has cyclomatic complexity 43 and cognitive complexity 39; 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 AlertsCountCard (cyclomatic 41, cognitive 39) · ×1
  • Complex function AlertsCountCard (cyclomatic 41, cognitive 39) frontend/src/components/dashboard/AlertsCountCard.tsx:623 — AlertsCountCard has cyclomatic complexity 41 and cognitive complexity 39; 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 pollAnalysis (cyclomatic 36, cognitive 57) · ×1
  • Complex function pollAnalysis (cyclomatic 36, cognitive 57) frontend/src/hooks/useDashboard.ts:2204 — pollAnalysis has cyclomatic complexity 36 and cognitive complexity 57; 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 34, cognitive 46) · ×1
  • Complex function (anonymous) (cyclomatic 34, cognitive 46) frontend/src/hooks/useDashboard.ts:823 — (anonymous) has cyclomatic complexity 34 and cognitive complexity 46; 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 OrganizationManagementDialog (cyclomatic 34, cognitive 29) · ×1
  • Complex function OrganizationManagementDialog (cyclomatic 34, cognitive 29) frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:82 — OrganizationManagementDialog has cyclomatic complexity 34 and cognitive complexity 29; 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 33, cognitive 55) · ×1
  • Complex function (anonymous) (cyclomatic 33, cognitive 55) frontend/e2e/data-retention.spec.ts:110 — (anonymous) has cyclomatic complexity 33 and cognitive complexity 55; 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 runAnalysisWithTimeRange (cyclomatic 33, cognitive 38) · ×1
  • Complex function runAnalysisWithTimeRange (cyclomatic 33, cognitive 38) frontend/src/hooks/useDashboard.ts:2027 — runAnalysisWithTimeRange has cyclomatic complexity 33 and cognitive complexity 38; 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 32, cognitive 30) · ×1
  • Complex function (anonymous) (cyclomatic 32, cognitive 30) REDACTED:2971 — (anonymous) has cyclomatic complexity 32 and cognitive complexity 30; 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 AIInsightsCard (cyclomatic 32, cognitive 23) · ×1
  • Complex function AIInsightsCard (cyclomatic 32, cognitive 23) frontend/src/app/integrations/components/AIInsightsCard.tsx:35 — AIInsightsCard has cyclomatic complexity 32 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 selectDefaultAnalysis (cyclomatic 30, cognitive 39) · ×1
  • Complex function selectDefaultAnalysis (cyclomatic 30, cognitive 39) frontend/src/hooks/useDashboard.ts:1138 — selectDefaultAnalysis has cyclomatic complexity 30 and cognitive complexity 39; 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 29, cognitive 28) · ×1
  • Complex function (anonymous) (cyclomatic 29, cognitive 28) REDACTED:4142 — (anonymous) has cyclomatic complexity 29 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 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 fetchSyncedUsers (cyclomatic 28, cognitive 37) · ×1
  • Complex function fetchSyncedUsers (cyclomatic 28, cognitive 37) frontend/src/app/integrations/handlers/team-handlers.ts:234 — fetchSyncedUsers has cyclomatic complexity 28 and cognitive complexity 37; 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 updateUserCorrelation (cyclomatic 28, cognitive 33) · ×1
  • Complex function updateUserCorrelation (cyclomatic 28, cognitive 33) frontend/src/app/management/handlers/user-mapping-handlers.ts:7 — updateUserCorrelation has cyclomatic complexity 28 and cognitive complexity 33; 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 handleConnectAI (cyclomatic 27, cognitive 39) · ×1
  • Complex function handleConnectAI (cyclomatic 27, cognitive 39) frontend/src/app/integrations/handlers/ai-handlers.ts:44 — handleConnectAI has cyclomatic complexity 27 and cognitive complexity 39; 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 27, cognitive 34) · ×1
  • Complex function (anonymous) (cyclomatic 27, cognitive 34) frontend/e2e/data-retention-dashboard.spec.ts:98 — (anonymous) has cyclomatic complexity 27 and cognitive complexity 34; 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 UserMappingDrawer (cyclomatic 27, cognitive 26) · ×1
  • Complex function UserMappingDrawer (cyclomatic 27, cognitive 26) frontend/src/app/management/components/UserMappingDrawer.tsx:45 — UserMappingDrawer has cyclomatic complexity 27 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 ObjectiveDataCard (cyclomatic 27, cognitive 23) · ×1
  • Complex function ObjectiveDataCard (cyclomatic 27, cognitive 23) frontend/src/components/dashboard/ObjectiveDataCard.tsx:322 — ObjectiveDataCard has cyclomatic complexity 27 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 authenticateUser (cyclomatic 27, cognitive 21) · ×1
  • Complex function authenticateUser (cyclomatic 27, cognitive 21) REDACTED:18 — authenticateUser has cyclomatic complexity 27 and cognitive complexity 21; 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 testConnection (cyclomatic 26, cognitive 31) · ×1
  • Complex function testConnection (cyclomatic 26, cognitive 31) frontend/src/app/integrations/handlers/integration-handlers.ts:11 — testConnection has cyclomatic complexity 26 and cognitive complexity 31; 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 pollAnalysis (cyclomatic 25, cognitive 42) · ×1
  • Complex function pollAnalysis (cyclomatic 25, cognitive 42) frontend/src/hooks/useDashboard.ts:271 — pollAnalysis has cyclomatic complexity 25 and cognitive complexity 42; 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 syncUsersToCorrelation (cyclomatic 25, cognitive 40) · ×1
  • Complex function syncUsersToCorrelation (cyclomatic 25, cognitive 40) frontend/src/app/integrations/handlers/team-handlers.ts:60 — syncUsersToCorrelation has cyclomatic complexity 25 and cognitive complexity 40; 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 AlertBreakdownChart (cyclomatic 25, cognitive 22) · ×1
  • Complex function AlertBreakdownChart (cyclomatic 25, cognitive 22) frontend/src/components/dashboard/AlertsCountCard.tsx:264 — AlertBreakdownChart has cyclomatic complexity 25 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 ManualSurveyDeliveryModal (cyclomatic 25, cognitive 20) · ×1
  • Complex function ManualSurveyDeliveryModal (cyclomatic 25, cognitive 20) frontend/src/components/ManualSurveyDeliveryModal.tsx:44 — ManualSurveyDeliveryModal has cyclomatic complexity 25 and cognitive complexity 20; 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 runAutoMapping (cyclomatic 24, cognitive 26) · ×1
  • Complex function runAutoMapping (cyclomatic 24, cognitive 26) frontend/src/components/mapping-drawer.tsx:330 — runAutoMapping has cyclomatic complexity 24 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 UserIncidentCard (cyclomatic 24, cognitive 19) · ×1
  • Complex function UserIncidentCard (cyclomatic 24, cognitive 19) frontend/src/components/dashboard/UserIncidentCard.tsx:150 — UserIncidentCard has cyclomatic complexity 24 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 24, cognitive 17) · ×1
  • Complex function (anonymous) (cyclomatic 24, cognitive 17) frontend/src/components/dashboard/MemberDetailModal.tsx:460 — (anonymous) has cyclomatic complexity 24 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 handleInvite (cyclomatic 23, cognitive 36) · ×1
  • Complex function handleInvite (cyclomatic 23, cognitive 36) frontend/src/app/integrations/handlers/organization-handlers.ts:7 — handleInvite has cyclomatic complexity 23 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 getVulnerabilityTags (cyclomatic 23, cognitive 32) · ×1
  • Complex function getVulnerabilityTags (cyclomatic 23, cognitive 32) frontend/src/lib/githubMetricUtils.ts:113 — getVulnerabilityTags has cyclomatic complexity 23 and cognitive complexity 32; 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 getAllVulnerabilityTags (cyclomatic 23, cognitive 32) · ×1
  • Complex function getAllVulnerabilityTags (cyclomatic 23, cognitive 32) frontend/src/lib/githubMetricUtils.ts:199 — getAllVulnerabilityTags has cyclomatic complexity 23 and cognitive complexity 32; 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: 4535 lines of code REDACTED:1 — REDACTED has 4535 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 · frontend/src/hooks/useDashboard.ts · ×1
  • frontend/src/hooks/useDashboard.ts: 2504 lines of code frontend/src/hooks/useDashboard.ts:1 — frontend/src/hooks/useDashboard.ts has 2504 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 · frontend/src/app/management/page.tsx · ×1
  • frontend/src/app/management/page.tsx: 2041 lines of code frontend/src/app/management/page.tsx:1 — frontend/src/app/management/page.tsx has 2041 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 · frontend/src/app/dashboard/page.tsx · ×1
  • frontend/src/app/dashboard/page.tsx: 2019 lines of code frontend/src/app/dashboard/page.tsx:1 — frontend/src/app/dashboard/page.tsx has 2019 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 · frontend/src/components/mapping-drawer.tsx · ×1
  • frontend/src/components/mapping-drawer.tsx: 1200 lines of code frontend/src/components/mapping-drawer.tsx:1 — frontend/src/components/mapping-drawer.tsx has 1200 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 · frontend/src/components/SlackSurveyTabs.tsx · ×1
  • frontend/src/components/SlackSurveyTabs.tsx: 1008 lines of code frontend/src/components/SlackSurveyTabs.tsx:1 — frontend/src/components/SlackSurveyTabs.tsx has 1008 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 · frontend/src/components/dashboard/AlertsCountCard.tsx · ×1
  • frontend/src/components/dashboard/AlertsCountCard.tsx: 773 lines of code frontend/src/components/dashboard/AlertsCountCard.tsx:1 — frontend/src/components/dashboard/AlertsCountCard.tsx has 773 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 · frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx · ×1
  • frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx: 772 lines of code frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:1 — frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx has 772 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 · frontend/src/components/dashboard/ObjectiveDataCard.tsx · ×1
  • frontend/src/components/dashboard/ObjectiveDataCard.tsx: 717 lines of code frontend/src/components/dashboard/ObjectiveDataCard.tsx:1 — frontend/src/components/dashboard/ObjectiveDataCard.tsx has 717 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 · frontend/src/components/dashboard/TeamMembersList.tsx · ×1
  • frontend/src/components/dashboard/TeamMembersList.tsx: 651 lines of code frontend/src/components/dashboard/TeamMembersList.tsx:1 — frontend/src/components/dashboard/TeamMembersList.tsx has 651 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 · frontend/src/components/dashboard/UserObjectiveDataCard.tsx · ×1
  • frontend/src/components/dashboard/UserObjectiveDataCard.tsx: 615 lines of code frontend/src/components/dashboard/UserObjectiveDataCard.tsx:1 — frontend/src/components/dashboard/UserObjectiveDataCard.tsx has 615 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 · frontend/src/app/integrations/handlers/integration-handlers.ts · ×1
  • frontend/src/app/integrations/handlers/integration-handlers.ts: 576 lines of code frontend/src/app/integrations/handlers/integration-handlers.ts:1 — frontend/src/app/integrations/handlers/integration-handlers.ts has 576 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 · frontend/src/components/dashboard/UserAlertsCard.tsx · ×1
  • frontend/src/components/dashboard/UserAlertsCard.tsx: 576 lines of code frontend/src/components/dashboard/UserAlertsCard.tsx:1 — frontend/src/components/dashboard/UserAlertsCard.tsx has 576 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 · frontend/src/components/landing-page.tsx · ×1
  • frontend/src/components/landing-page.tsx: 573 lines of code frontend/src/components/landing-page.tsx:1 — frontend/src/components/landing-page.tsx has 573 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 · frontend/src/components/dashboard/TicketingCard.tsx · ×1
  • frontend/src/components/dashboard/TicketingCard.tsx: 554 lines of code frontend/src/components/dashboard/TicketingCard.tsx:1 — frontend/src/components/dashboard/TicketingCard.tsx has 554 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 · frontend/src/app/management/components/UserMappingDrawer.tsx · ×1
  • frontend/src/app/management/components/UserMappingDrawer.tsx: 544 lines of code frontend/src/app/management/components/UserMappingDrawer.tsx:1 — frontend/src/app/management/components/UserMappingDrawer.tsx has 544 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 · frontend/src/components/dashboard/MemberDetailModal.tsx · ×1
  • frontend/src/components/dashboard/MemberDetailModal.tsx: 540 lines of code frontend/src/components/dashboard/MemberDetailModal.tsx:1 — frontend/src/components/dashboard/MemberDetailModal.tsx has 540 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 · frontend/src/app/methodology/page.tsx · ×1
  • frontend/src/app/methodology/page.tsx: 534 lines of code frontend/src/app/methodology/page.tsx:1 — frontend/src/app/methodology/page.tsx has 534 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 · frontend/src/app/integrations/components/AIInsightsCard.tsx · ×1
  • frontend/src/app/integrations/components/AIInsightsCard.tsx: 507 lines of code frontend/src/app/integrations/components/AIInsightsCard.tsx:1 — frontend/src/app/integrations/components/AIInsightsCard.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 · frontend/src/app/integrations/components/UnifiedSlackCard.tsx · ×1
  • frontend/src/app/integrations/components/UnifiedSlackCard.tsx: 502 lines of code frontend/src/app/integrations/components/UnifiedSlackCard.tsx:1 — frontend/src/app/integrations/components/UnifiedSlackCard.tsx has 502 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 · frontend/src/components/AccountSettingsDialog.tsx · ×1
  • frontend/src/components/AccountSettingsDialog.tsx: 484 lines of code frontend/src/components/AccountSettingsDialog.tsx:1 — frontend/src/components/AccountSettingsDialog.tsx has 484 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 · frontend/src/app/integrations/handlers/mapping-handlers.ts · ×1
  • frontend/src/app/integrations/handlers/mapping-handlers.ts: 480 lines of code frontend/src/app/integrations/handlers/mapping-handlers.ts:1 — frontend/src/app/integrations/handlers/mapping-handlers.ts has 480 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 · frontend/src/app/integrations/components/RootlyIntegrationForm.tsx · ×1
  • frontend/src/app/integrations/components/RootlyIntegrationForm.tsx: 479 lines of code frontend/src/app/integrations/components/RootlyIntegrationForm.tsx:1 — frontend/src/app/integrations/components/RootlyIntegrationForm.tsx has 479 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 · frontend/src/components/dashboard/TeamHealthOverview.tsx · ×1
  • frontend/src/components/dashboard/TeamHealthOverview.tsx: 463 lines of code frontend/src/components/dashboard/TeamHealthOverview.tsx:1 — frontend/src/components/dashboard/TeamHealthOverview.tsx has 463 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 · frontend/src/components/integrations/github-integration-card.tsx · ×1
  • frontend/src/components/integrations/github-integration-card.tsx: 446 lines of code frontend/src/components/integrations/github-integration-card.tsx:1 — frontend/src/components/integrations/github-integration-card.tsx has 446 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 · frontend/src/lib/types.ts · ×1
  • frontend/src/lib/types.ts: 430 lines of code frontend/src/lib/types.ts:1 — frontend/src/lib/types.ts has 430 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R5 · Dependency Freshness · Dependency Freshness · ×1
  • Dependency Freshness — 42 outdated package(s); JS/npm CVEs scored in D30
R6 · Tooling · This package's lint script runs in no CI job · ×1
  • This package's lint script runs in no CI job frontend/package.json:9 — The package in `frontend` declares the lint script `lint` (`oxlint`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `frontend` (or the workspace's task runner).
R7 · Dead Code · Dead file (~416 LoC) · ×1
  • Dead file (~416 LoC) frontend/src/components/integrations/api-service.ts — no import path from any entry point (28 application, 3 tooling, 10 test roots considered), but 3 in-repo import(s) from 3 other file(s) do name it (frontend/src/components/integrations/enhancement-cards.tsx, frontend/src/components/integrations/integrations-cards.tsx, frontend/src/components/integrations/integrations-layout.tsx) — 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 (~398 LoC) · ×1
  • Dead file (~398 LoC) frontend/src/components/jira-mapping-grid.tsx — no import path from any entry point (28 application, 3 tooling, 10 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 (~375 LoC) · ×1
  • Dead file (~375 LoC) frontend/src/components/integrations/jira-integration-card.tsx — no import path from any entry point (28 application, 3 tooling, 10 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 (~298 LoC) · ×1
  • Dead file (~298 LoC) frontend/src/components/integrations/enhancement-cards.tsx — no import path from any entry point (28 application, 3 tooling, 10 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/components/integrations/integrations-layout.tsx) — 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 (~285 LoC) · ×1
  • Dead file (~285 LoC) frontend/src/hooks/use-integrations-state.ts — no import path from any entry point (28 application, 3 tooling, 10 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/components/integrations/integrations-layout.tsx) — 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 (~265 LoC) · ×1
  • Dead file (~265 LoC) frontend/src/components/InvitationAcceptanceModal.tsx — no import path from any entry point (28 application, 3 tooling, 10 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 (~262 LoC) · ×1
  • Dead file (~262 LoC) frontend/src/components/dashboard/TrendsCard.tsx — no import path from any entry point (28 application, 3 tooling, 10 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) frontend/src/components/integrations/integrations-cards.tsx — no import path from any entry point (28 application, 3 tooling, 10 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/components/integrations/integrations-layout.tsx) — 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 (~227 LoC) · ×1
  • Dead file (~227 LoC) frontend/src/components/integrations/integrations-layout.tsx — no import path from any entry point (28 application, 3 tooling, 10 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/app/integrations/page-new.tsx) — 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 (~211 LoC) · ×1
  • Dead file (~211 LoC) frontend/src/components/BurnoutFactorsV0.tsx — no import path from any entry point (28 application, 3 tooling, 10 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 (~202 LoC) · ×1
  • Dead file (~202 LoC) frontend/src/app/integrations/components/SlackIntegrationCard.tsx — no import path from any entry point (28 application, 3 tooling, 10 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 (~198 LoC) · ×1
  • Dead file (~198 LoC) frontend/src/components/dashboard/HealthTrendsChart.tsx — no import path from any entry point (28 application, 3 tooling, 10 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 (~189 LoC) · ×1
  • Dead file (~189 LoC) frontend/src/components/dashboard/charts/GitHubCommitsTimeline.tsx — no import path from any entry point (28 application, 3 tooling, 10 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 (~143 LoC) · ×1
  • Dead file (~143 LoC) frontend/src/components/SyncProgressModal.tsx — no import path from any entry point (28 application, 3 tooling, 10 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 (~142 LoC) · ×1
  • Dead file (~142 LoC) frontend/src/lib/health-check.ts — no import path from any entry point (28 application, 3 tooling, 10 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/hooks/use-backend-health.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 (~111 LoC) · ×1
  • Dead file (~111 LoC) frontend/src/components/integrations/validation.ts — no import path from any entry point (28 application, 3 tooling, 10 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/components/integrations/integrations-cards.tsx) — 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 (~107 LoC) · ×1
  • Dead file (~107 LoC) frontend/src/hooks/use-performance-monitor.ts — no import path from any entry point (28 application, 3 tooling, 10 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/components/integrations/integrations-layout.tsx) — 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 (~91 LoC) · ×1
  • Dead file (~91 LoC) frontend/src/hooks/use-backend-health.ts — no import path from any entry point (28 application, 3 tooling, 10 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 (~86 LoC) · ×1
  • Dead file (~86 LoC) frontend/src/components/integrations/integrations-header.tsx — no import path from any entry point (28 application, 3 tooling, 10 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/components/integrations/integrations-layout.tsx) — 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 (~81 LoC) · ×1
  • Dead file (~81 LoC) frontend/fix-eslint-entities.js — no import path from any entry point (28 application, 3 tooling, 10 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 (~56 LoC) · ×1
  • Dead file (~56 LoC) frontend/src/hooks/useInfiniteScroll.ts — no import path from any entry point (28 application, 3 tooling, 10 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 (~55 LoC) · ×1
  • Dead file (~55 LoC) frontend/src/hooks/use-toast-simple.tsx — no import path from any entry point (28 application, 3 tooling, 10 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/src/components/simple-toast-display.tsx) — 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 (~44 LoC) · ×1
  • Dead file (~44 LoC) frontend/src/components/dashboard/SurveySparkline.tsx — no import path from any entry point (28 application, 3 tooling, 10 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 (~43 LoC) · ×1
  • Dead file (~43 LoC) frontend/src/components/simple-toast-display.tsx — no import path from any entry point (28 application, 3 tooling, 10 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 (~42 LoC) · ×1
  • Dead file (~42 LoC) frontend/src/components/ui/radio-group.tsx — no import path from any entry point (28 application, 3 tooling, 10 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 (~36 LoC) · ×1
  • Dead file (~36 LoC) frontend/src/app/integrations/page-new.tsx — no import path from any entry point (28 application, 3 tooling, 10 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 (~33 LoC) · ×1
  • Dead file (~33 LoC) frontend/src/components/ui/toaster.tsx — no import path from any entry point (28 application, 3 tooling, 10 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 (~32 LoC) · ×1
  • Dead file (~32 LoC) frontend/src/components/dashboard/ChartModeToggle.tsx — no import path from any entry point (28 application, 3 tooling, 10 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 (~28 LoC) · ×1
  • Dead file (~28 LoC) frontend/src/components/ui/sonner.tsx — no import path from any entry point (28 application, 3 tooling, 10 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 (~26 LoC) · ×1
  • Dead file (~26 LoC) frontend/src/components/ui/progress.tsx — no import path from any entry point (28 application, 3 tooling, 10 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 (~15 LoC) · ×1
  • Dead file (~15 LoC) frontend/src/hooks/use-toast-mock.ts — no import path from any entry point (28 application, 3 tooling, 10 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 'newrelic' · ×1
  • Unused dependency 'newrelic' package.json:3 — Declared in the root package.json 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 '@newrelic/browser-agent' · ×1
  • Unused dependency '@newrelic/browser-agent' frontend/package.json:19 — Declared in frontend/package.json 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 'next-themes' · ×1
  • Unused dependency 'next-themes' frontend/package.json:45 — Declared in frontend/package.json 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.
SC1 · Supply-chain hygiene · JavaScript dependencies are not locked · ×1
  • JavaScript dependencies are not locked package.json:2 — package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / REDACTED beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
Minor — 214 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×43
  • Orphaned file frontend/src/app/integrations/handlers/mapping-handlers.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 backend/app/core/platform_scoring.py: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 frontend/src/components/integrations/slack-integration-card.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 backend/app/agents/tools/code_quality_analyzer.py: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 frontend/src/components/integrations/api-service.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 frontend/src/components/integrations/enhancement-cards.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 backend/app/auth/oauth.py: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 frontend/src/app/integrations/components/SlackIntegrationCard.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 frontend/src/components/BurnoutFactorsV0.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 frontend/src/components/integrations/integrations-cards.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 frontend/src/hooks/use-integrations-state.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 backend/app/core/error_handler.py: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 frontend/src/components/ui/dropdown-menu.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 frontend/src/components/integrations/integrations-layout.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 frontend/src/app/integrations/components/GitHubIntegrationCard.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 frontend/src/components/TeamManagementDialog.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 frontend/src/components/ui/select.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 backend/scripts/cleanup_duplicate_user_correlations.py: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 frontend/src/components/SyncProgressModal.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 backend/app/models/user_mapping.py: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 backend/app/services/organization_auto_assignment.py: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 frontend/src/components/ui/toast.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 frontend/src/app/integrations/dialogs/NewMappingDialog.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 frontend/src/components/ui/alert-dialog.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 frontend/src/components/ui/sheet.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.
  • + 18 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx:54 — `!tokenValue || !isValidToken(tokenValue) || tokenValue === lastTestedToken` appears character-identically in 2 files — frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx, frontend/src/app/integrations/components/RootlyIntegrationForm.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 frontend/src/app/setup/jira/callback/page.tsx:79 — `(data && (data.detail || data.message)) || text || 'Failed to complete OAuth flow'` appears character-identically in 2 files — frontend/src/app/setup/jira/callback/page.tsx, frontend/src/app/setup/linear/callback/page.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 frontend/src/components/dashboard/ObjectiveDataCard.tsx:705 — `Math.floor(dailyChartData.length / 7) || 0` appears character-identically in 2 files — frontend/src/components/dashboard/ObjectiveDataCard.tsx, frontend/src/components/dashboard/UserObjectiveDataCard.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 frontend/src/components/dashboard/HealthTrendsChart.tsx:130 — `currentAnalysis && currentAnalysis.status === 'completed'` appears character-identically in 2 files — frontend/src/components/dashboard/HealthTrendsChart.tsx, frontend/src/hooks/useDashboard.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 frontend/src/components/dashboard/insights/AIInsightsCard.tsx:89 — `currentAnalysis?.status === 'running' || currentAnalysis?.status === 'pending'` appears character-identically in 2 files — frontend/src/components/dashboard/insights/AIInsightsCard.tsx, frontend/src/components/dashboard/insights/AIInsightsModal.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 frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:136 — `data.detail || 'Failed to accept invitation'` appears character-identically in 2 files — frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx, frontend/src/components/InvitationAcceptanceModal.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 frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:186 — `data.detail || 'Failed to reject invitation'` appears character-identically in 2 files — frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx, frontend/src/components/InvitationAcceptanceModal.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 frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx:259 — `duplicateInfo.existing_integration?.name || 'Unknown'` appears character-identically in 2 files — frontend/src/app/integrations/components/PagerDutyIntegrationForm.tsx, frontend/src/app/integrations/components/RootlyIntegrationForm.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 frontend/src/app/setup/jira/callback/page.tsx:84 — `e?.message || 'Network error completing OAuth flow'` appears character-identically in 2 files — frontend/src/app/setup/jira/callback/page.tsx, frontend/src/app/setup/linear/callback/page.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 frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:166 — `error.message || 'Failed to accept invitation'` appears character-identically in 2 files — frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx, frontend/src/components/InvitationAcceptanceModal.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 frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:197 — `error.message || 'Failed to reject invitation'` appears character-identically in 2 files — frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx, frontend/src/components/InvitationAcceptanceModal.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 frontend/src/app/integrations/handlers/github-handlers.ts:192 — `errorData.detail || 'Connection test failed'` appears character-identically in 2 files — frontend/src/app/integrations/handlers/github-handlers.ts, frontend/src/app/integrations/handlers/slack-handlers.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 frontend/src/components/dashboard/AlertsCountCard.tsx:381 — `hoverIndex !== null && hoverIndex > chartDays.length * 0.65` appears character-identically in 2 files — frontend/src/components/dashboard/AlertsCountCard.tsx, frontend/src/components/dashboard/UserAlertsCard.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 frontend/src/components/dashboard/AlertsCountCard.tsx:428 — `hoveredChip !== null && hoveredChip !== m.key` appears character-identically in 2 files — frontend/src/components/dashboard/AlertsCountCard.tsx, frontend/src/components/dashboard/UserAlertsCard.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 frontend/src/components/dashboard/AlertsCountCard.tsx:331 — `i % xLabelStep === 0 || i === chartDays.length - 1` appears character-identically in 2 files — frontend/src/components/dashboard/AlertsCountCard.tsx, frontend/src/components/dashboard/UserAlertsCard.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:4141 — `mapping.target_identifier || mapping.error_message || ''` appears character-identically in 2 files — REDACTED, frontend/src/components/mapping-drawer.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 frontend/src/components/dashboard/GitHubAllMetricsPopup.tsx:45 — `member.metrics?.avg_response_time_minutes || 0` appears character-identically in 2 files — frontend/src/components/dashboard/GitHubAllMetricsPopup.tsx, frontend/src/components/dashboard/TeamMembersList.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 frontend/src/app/integrations/hooks/useValidation.ts:6 — `process.env.NEXT_PUBLIC_API_URL || "http://localhost:8000"` appears character-identically in 7 files — frontend/src/app/integrations/hooks/useValidation.ts, frontend/src/app/management/components/DataRetentionSettings.tsx, frontend/src/app/unsubscribe/page.tsx, frontend/src/components/AccountSettingsDialog.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:20 — `process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000'` appears character-identically in 19 files — REDACTED, frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx, frontend/src/app/integrations/types.ts, frontend/src/app/setup/jira/callback/page.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 frontend/src/app/integrations/handlers/jira-handlers.ts:211 — `result.message || 'Connection test failed'` appears character-identically in 2 files — frontend/src/app/integrations/handlers/jira-handlers.ts, frontend/src/app/integrations/handlers/linear-handlers.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 frontend/src/components/dashboard/MemberDetailModal.tsx:322 — `result.status === 'success' && result.data?.daily_commits` appears character-identically in 2 files — frontend/src/components/dashboard/MemberDetailModal.tsx, frontend/src/components/dashboard/charts/GitHubCommitsTimeline.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 frontend/src/components/dashboard/MemberDetailModal.tsx:94 — `result.status === 'success' && result.data?.daily_health` appears character-identically in 2 files — frontend/src/components/dashboard/MemberDetailModal.tsx, frontend/src/components/dashboard/UserObjectiveDataCard.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 frontend/src/app/setup/jira/callback/page.tsx:26 — `searchParams.get('error_description') || ''` appears character-identically in 2 files — frontend/src/app/setup/jira/callback/page.tsx, frontend/src/app/setup/linear/callback/page.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 frontend/src/app/integrations/handlers/mapping-handlers.ts:436 — `selectedManualMappingPlatform || 'github'` appears character-identically in 2 files — frontend/src/app/integrations/handlers/mapping-handlers.ts, 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 frontend/src/components/dashboard/AlertsCountCard.tsx:669 — `totalForNoise !== null && afterHoursCount !== null` appears character-identically in 2 files — frontend/src/components/dashboard/AlertsCountCard.tsx, frontend/src/components/dashboard/UserAlertsCard.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.
  • + 15 more in this group — see findings.md.
X4 · Structured logging · Interpolated log message defeats structured logging · ×40
  • Interpolated log message defeats structured logging backend/mock_data_helpers/manage_demo_analyses.py:75 — `error` at line 75 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/mock_data_helpers/manage_demo_analyses.py:81 — `error` at line 81 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/mock_data_helpers/manage_demo_analyses.py:82 — `error` at line 82 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/mock_data_helpers/manage_demo_analyses.py:86 — `info` at line 86 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/mock_data_helpers/manage_demo_analyses.py:203 — `error` at line 203 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/mock_data_helpers/manage_demo_analyses.py:204 — `error` at line 204 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/mock_data_helpers/manage_demo_analyses.py:213 — `info` at line 213 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/mock_data_helpers/manage_demo_analyses.py:214 — `info` at line 214 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/mock_data_helpers/manage_demo_analyses.py:218 — `info` at line 218 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/mock_data_helpers/manage_demo_analyses.py:221 — `warning` at line 221 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/mock_data_helpers/manage_demo_analyses.py:256 — `warning` at line 256 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/mock_data_helpers/manage_demo_analyses.py:259 — `info` at line 259 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/mock_data_helpers/manage_demo_analyses.py:263 — `error` at line 263 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/mock_data_helpers/manage_demo_analyses.py:267 — `error` at line 267 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/migrations/migration_runner.py:64 — `error` at line 64 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/migrations/migration_runner.py:90 — `info` at line 90 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/migrations/migration_runner.py:92 — `error` at line 92 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/migrations/migration_runner.py:105 — `info` at line 105 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/migrations/migration_runner.py:112 — `error` at line 112 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/migrations/migration_runner.py:115 — `info` at line 115 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/migrations/migration_runner.py:123 — `info` at line 123 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/migrations/migration_runner.py:127 — `error` at line 127 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/migrations/migration_runner.py:163 — `warning` at line 163 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/migrations/migration_runner.py:166 — `error` at line 166 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging backend/migrations/migration_runner.py:1448 — `info` at line 1448 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • + 15 more in this group — see findings.md.
D24 · Comment Value · redundant comment · ×28
  • redundant comment frontend/e2e/smoke.spec.ts:46 — "Check for GitHub sign in button" repeats the code it sits on: 4 of its 5 words (git, hub, sign, button) are already in `const githubButton = page.locator('button:has-text("Sign in with GitHub")');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:135 — "Set success status" repeats the code it sits on: 3 of its 3 words (set, success, status) are already in `setStatus('success')`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/app/dashboard/page.tsx:380 — "Risk Factors All Popup State" repeats the code it sits on: 4 of its 4 words (risk, factors, popup, state) are already in `const [showAllRiskFactorsPopup, setShowAllRiskFactorsPopup] = useState(false)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/app/integrations/components/UnifiedSlackCard.tsx:103 — "Check if we have user info" repeats the code it sits on: 3 of its 3 words (check, user, info) are already in `if (!userInfo)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/app/integrations/handlers/github-handlers.ts:150 — "Dismiss loading toast" repeats the code it sits on: 3 of its 3 words (dismiss, loading, toast) are already in `toast.dismiss(loadingToast)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/app/integrations/hooks/useValidation.ts:69 — "Set validating state" repeats the code it sits on: 3 of its 3 words (set, validating, state) are already in `setState({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/app/integrations/hooks/useValidation.ts:76 — "Create new abort controller for this request" repeats the code it sits on: 4 of its 5 words (create, new, abort, controller) are already in `abortControllerRef.current = new AbortController();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:198 — 6 comments in this file only repeat the code they sit on (lines 198, 223, 241, 250, 330, 408), for example "GitHub/Slack integration state". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/app/integrations/types.ts:314 — "API Base URL" repeats the code it sits on: 3 of its 3 words (api, base, url) are already in `export const API_BASE = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8000'`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/app/management/page.tsx:519 — 7 comments in this file only repeat the code they sit on (lines 519, 856, 1055, 1069, 1083, 1116, 1494), for example "Check if organization changed". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/components/dashboard/GitHubAllMetricsPopup.tsx:98 — "Filter out OCH tag" repeats the code it sits on: 3 of its 3 words (filter, och, tag) are already in `const tags = allTags.filter(tag => !tag.label.startsWith('OCH:'))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/components/dashboard/GitHubAllMetricsPopup.tsx:132 — "Remove 'border' classes from the color class" repeats the code it sits on: 4 of its 5 words (border, classes, color, class) are already in `const noBorderClass = colorClass.replace(/border[\w-]*/g, '').trim()`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/components/dashboard/MemberDetailModal.tsx:58 — "Individual Daily Health Chart component" repeats the code it sits on: 4 of its 5 words (individual, daily, health, chart) are already in `function IndividualDailyHealthChart({ memberData, analysisId, currentAnalysis }: {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/components/dashboard/TeamHealthOverview.tsx:29 — "Calculate team OCH score from member scores" repeats the code it sits on: 5 of its 6 words (calculate, team, och, score, scores) are already in `function calculateTeamOCHScore(currentAnalysis: any): number | null`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/components/dashboard/TeamHealthOverview.tsx:83 — "Get health status description" repeats the code it sits on: 4 of its 4 words (get, health, status, description) are already in `function getHealthStatusDescription(ochScore: number): string`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/components/dashboard/TeamMembersList.tsx:585 — "Filter members with valid scores" repeats the code it sits on: 4 of its 4 words (filter, members, valid, scores) are already in `const validMembers = allMembers.filter((member) => hasMemberRiskScore(member))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/components/dashboard/TicketingCard.tsx:85 — "Check if Jira priority is high/critical" repeats the code it sits on: 4 of its 5 words (jira, priority, high, critical) are already in `function isJiraHighCritical(priority: string | null): boolean`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/components/dashboard/TicketingCard.tsx:91 — "Check if Linear priority is urgent/high" repeats the code it sits on: 4 of its 5 words (linear, priority, urgent, high) are already in `function isLinearUrgentHigh(priority: number | null): boolean`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/components/dashboard/UserIncidentCard.tsx:329 — "Get severity color" repeats the code it sits on: 3 of its 3 words (get, severity, color) are already in `const getSeverityColor = (sev: string) =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/components/dashboard/UserIncidentCard.tsx:339 — "Get status color" repeats the code it sits on: 3 of its 3 words (get, status, color) are already in `const getStatusColor = (st: string) =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/components/dashboard/dialogs/DeleteAnalysisDialog.tsx:61 — "Find the integration for this analysis" repeats the code it sits on: 3 of its 3 words (find, integration, analysis) are already in `const integration = integrations.find(i => i.id === Number(analysisToDelete.integration_id)) ||`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/components/mapping-drawer.tsx:80 — "Inline editing states" repeats the code it sits on: 3 of its 3 words (inline, editing, states) are already in `const [inlineEditingId, setInlineEditingId] = useState<number | string | null>(null)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/components/mapping-drawer.tsx:87 — "Auto-mapping states" repeats the code it sits on: 3 of its 3 words (auto, mapping, states) are already in `const [runningAutoMapping, setRunningAutoMapping] = useState(false)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/hooks/use-backend-health.ts:53 — "Subscribe to health changes" repeats the code it sits on: 3 of its 3 words (subscribe, health, changes) are already in `const unsubscribe = healthChecker.subscribe(handleHealthChange)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment frontend/src/hooks/useDashboard.ts:80 — "Mapping drawer states" repeats the code it sits on: 3 of its 3 words (mapping, drawer, states) are already in `const [mappingDrawerOpen, setMappingDrawerOpen] = useState(false)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • + 3 more in this group — see findings.md.
X7 · Silent fallback defaults · Pending state with no failure state · ×20
  • Pending state with no failure state frontend/src/components/landing-page.tsx:253 — The view draws `Connecting...` under `isLoading === "okta"`, 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 frontend/src/components/landing-page.tsx:307 — The view draws `Connecting to Google...` under `isLoading === "google"`, 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 frontend/src/components/landing-page.tsx:328 — The view draws `Connecting to GitHub...` under `isLoading === "github"`, 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 frontend/src/components/notifications/NotificationDrawer.tsx:122 — The view draws `Loading notifications...` under `isLoading && notifications . length === 0`, 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 frontend/src/components/notifications/NotificationDrawer.tsx:149 — The view draws `Loading more...` under `isLoading`, 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 frontend/src/components/dashboard/UserObjectiveDataCard.tsx:350 — The view draws `Loading trends...` under `loading`, but `loading` 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 frontend/src/app/management/components/UserMappingDrawer.tsx:288 — The view draws `<div class="flex items-center justify-center py-4">` under `loadingOptions`, but `loadingOptions` 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 frontend/src/app/management/components/UserMappingDrawer.tsx:371 — The view draws `<div class="flex items-center justify-center py-4">` under `loadingOptions`, but `loadingOptions` 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 frontend/src/app/management/components/UserMappingDrawer.tsx:462 — The view draws `<div class="flex items-center justify-center py-4">` under `loadingOptions`, but `loadingOptions` 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 frontend/src/app/management/components/UserMappingDrawer.tsx:550 — The view draws `<Loader2 class="w-3 h-3 animate-spin mr-1"/>` under `saving`, but `saving` 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 frontend/src/app/integrations/dialogs/JiraWorkspaceSelector.tsx:120 — The view draws `<div class="flex items-center justify-center py-8">` under `loading`, but `loading` 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 frontend/src/app/integrations/dialogs/JiraWorkspaceSelector.tsx:200 — The view draws `Selecting...` under `selecting`, but `selecting` 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 frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:335 — The view draws `<Loader2 class="w-4 h-4 animate-spin"/>` under `processingInvitationId === invitation . id`, but `processingInvitationId` 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 frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:347 — The view draws `<Loader2 class="w-4 h-4 animate-spin"/>` under `processingInvitationId === invitation . id`, but `processingInvitationId` 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 frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:446 — The view draws `<Loader2 class="w-3.5 h-3.5 animate-spin"/>` under `processingInvitationId === invitation . id`, but `processingInvitationId` 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 frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:584 — The view draws `<Loader2 class="w-3 h-3 animate-spin"/>` under `removingUserId === member . id`, but `removingUserId` 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 frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:738 — The view draws `<Loader2 class="w-4 h-4 animate-spin"/>` under `processingInvitationId === confirmingInvitationId`, but `processingInvitationId` 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 frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx:809 — The view draws `<Loader2 class="w-4 h-4 animate-spin"/>` under `processingInvitationId === confirmingInvitationId`, but `processingInvitationId` 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 frontend/src/app/integrations/components/AnthropicUsageConnectedCard.tsx:55 — The view draws `<Loader2 class="w-3 h-3 mr-2 animate-spin"/>` under `isTesting`, but `isTesting` 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 frontend/src/app/integrations/components/OpenAIUsageConnectedCard.tsx:56 — The view draws `<Loader2 class="w-3 h-3 mr-2 animate-spin"/>` under `isTesting`, but `isTesting` 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.
X7 · Silent fallback defaults · Silent fallback default in catch · ×6
  • Silent fallback default in catch backend/app/core/pagerduty_client.py:193 — `_get_total_count` swallows every exception into `return 0` — 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 backend/app/services/unified_burnout_analyzer.py:6157 — `_extract_incident_title` swallows every exception into `return 'Untitled incident'` — 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 backend/app/services/unified_burnout_analyzer.py:6205 — `_get_severity_level` 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 backend/app/services/unified_burnout_analyzer.py:6221 — `_compare_severity` swallows every exception into `return 0` — 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 backend/app/services/weekly_digest_service.py:43 — `_ensure_dict` 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 backend/app/services/weekly_digest_service.py:89 — `_get_user_timezone` swallows every exception into `return 'UTC'` — 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.
D16 · Bus Factor · Off-boarding risk · ×3
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 24 significant file(s) lose their only recent owner: backend/app/services/token_manager.py, backend/app/services/github_mapping_service.py, frontend/src/app/integrations/components/JiraManualSetupForm.tsx, frontend/src/app/integrations/handlers/linear-handlers.ts, frontend/src/app/integrations/components/LinearManualSetupForm.tsx, backend/app/core/api_cache.py, frontend/src/components/api-keys/CreateKeyDialog.tsx, frontend/src/app/integrations/components/LinearConnectedCard.tsx (+16 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 24 significant file(s) lose their only recent owner: backend/app/services/weekly_digest_service.py, frontend/src/components/dashboard/UserAlertsCard.tsx, frontend/src/app/management/components/UserMappingDrawer.tsx, backend/app/services/auto_refresh_scheduler.py, backend/app/services/retention_preview.py, backend/app/services/ai_usage_collector.py, frontend/src/app/management/components/DataRetentionSettings.tsx, backend/app/services/retention_cleanup.py (+16 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 17 significant file(s) lose their only recent owner: frontend/src/components/mapping-drawer.tsx, frontend/src/components/SlackSurveyTabs.tsx, backend/app/services/enhanced_github_matcher.py, backend/app/agents/burnout_agent.py, backend/app/api/endpoints/invitations.py, backend/app/middleware/security.py, backend/app/services/slack_token_service.py, backend/app/services/enhanced_slack_collector.py (+9 more). Pair on, review, or document these before any departure.
D31 · IaC & Container Security · Low IaC · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×2
  • Projects may be oversized for their cohesion backend/requirements.txt:1 — `backend` (59023 LoC, 284 module-visible types across 15 directories) overshoots its size bounds. 2 of 2 build unit(s) (Python, npm) overshoot their size bounds, lowering Project Cohesion to 0.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 frontend/package.json:1 — `frontend` (44841 LoC, 253 module-visible types across 34 directories) overshoots its size bounds. 2 of 2 build unit(s) (Python, npm) overshoot their size bounds, lowering Project Cohesion to 0.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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
C4 · Data Retention · Partial data-retention evidence · ×1
  • Partial data-retention evidence — A retention mechanism is present, but the data-lifecycle is not yet complete — missing: an expiry limit — a declared maximum age / TTL after which the data is no longer kept.
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:35 — 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 35).
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Low CVE · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 43 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: frontend/src/app/integrations/handlers/mapping-handlers.ts, backend/app/core/platform_scoring.py, frontend/src/components/integrations/slack-integration-card.tsx, backend/app/agents/tools/code_quality_analyzer.py, frontend/src/components/integrations/api-service.ts, frontend/src/components/integrations/enhancement-cards.tsx, backend/app/auth/oauth.py, frontend/src/app/integrations/components/SlackIntegrationCard.tsx (and 35 more) (44 orphaned of 260 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 260 of the 344 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
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.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `frontend`.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:6 — No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 4 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 bun · ×1
  • Dependabot does not watch bun REDACTED:3 — `REDACTED` schedules updates, but no `package-ecosystem` entry covers `bun`, 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.
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.)
R7 · Dead Code · Unused export 'updateTokenPreference' · ×1
  • Unused export 'updateTokenPreference' frontend/src/app/integrations/handlers/ai-handlers.ts:154 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'checkMultipleWorkspaces' · ×1
  • Unused export 'checkMultipleWorkspaces' frontend/src/app/integrations/handlers/jira-handlers.ts:224 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'loadJiraWorkspaces' · ×1
  • Unused export 'loadJiraWorkspaces' frontend/src/app/integrations/handlers/jira-handlers.ts:246 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'selectJiraWorkspace' · ×1
  • Unused export 'selectJiraWorkspace' frontend/src/app/integrations/handlers/jira-handlers.ts:273 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'loadLinearTeams' · ×1
  • Unused export 'loadLinearTeams' frontend/src/app/integrations/handlers/linear-handlers.ts:224 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'selectLinearTeams' · ×1
  • Unused export 'selectLinearTeams' frontend/src/app/integrations/handlers/linear-handlers.ts:251 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'syncSlackUserIds' · ×1
  • Unused export 'syncSlackUserIds' frontend/src/app/integrations/handlers/team-handlers.ts:179 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'default' · ×1
  • Unused export 'default' frontend/src/components/notifications/NotificationDrawer.tsx:169 — Nothing imports this binding — it is safe to review for removal.
S1 · Web-Security Posture · No security response headers detected · ×1
  • No security response headers detected backend/vercel.json:1 — None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is configured — defense in depth, even when a reverse proxy could set them. This is reported because `vercel.json` configures this repository's static hosting, including its response headers, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.)
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 10/121 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.
X23 · Unguarded diagnostic materialisation · Diagnostic log message is built whether or not it is wanted · ×1
  • Diagnostic log message is built whether or not it is wanted backend/app/services/unified_burnout_analyzer.py:1782 — `debug` at line 1782 is called with an argument built by `list(user.keys())` (line 1782), whose cost grows with the collection it walks. Python evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isEnabledFor(logging.DEBUG)` test, no debug flag, no `lambda` the logger calls only when the level is on.
X5 · Nullable reference types · Strict null checking is not enabled everywhere the repository type-checks · ×1
  • Strict null checking is not enabled everywhere the repository type-checks — 0/1 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
X5 · Nullable reference types · Null assertions (`!`) override strict null checking · ×1
  • Null assertions (`!`) override strict null checking — ~0.3 `!` null assertions per 1k TypeScript source lines — 15 assertion(s) across the 49127 source line(s) of the 186 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: frontend/src/app/management/page.tsx (3), frontend/src/app/integrations/dialogs/OrganizationManagementDialog.tsx (2), frontend/src/app/integrations/handlers/team-handlers.ts (2). 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 — 1 finding(s)
D24 · Comment Value · doc comments repeat the names · ×1
  • doc comments repeat the names frontend/src/app/integrations/handlers/integration-handlers.ts:499 — 0 of 3 documented parameters and 4 of 107 summaries in `rootly-burnout-detector-frontend` only repeat the member or parameter name (e.g. "Delete integration" for `deleteIntegration`). 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-96ec0591f5364cda8f40ac8ca5babc11/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-96ec0591f5364cda8f40ac8ca5babc11/history-1.json --exit-code 0 --source .2artifacts/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=2353" --report-format json --report-path /tmp/watchdog-gitleaks-96ec0591f5364cda8f40ac8ca5babc11/history-2.json --exit-code 0 --source .6artifacts/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-96ec0591f5364cda8f40ac8ca5babc11/tree.json --exit-code 0 --source .0artifacts/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 .5artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .3artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .13artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep --config /opt/semgrep-rules/gdpr.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 .5artifacts/raw/semgrep-gdpr.json
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 01a1e9e7-d9aa-780b-b544-b49212b525f3 · 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