Public report of rusty4444/ares, 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, 16:00 UTC · Survey ID cd_27eb16b08ba24ec391dd13f6ac5270b8

rusty4444/ares

Measured 17 November 2026, 16:00 UTC, at code version a756db8

First survey, so nothing to compare with yet
CAI score 54.3out of 100 Adequate
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 medium codebase: 99,492 lines of product code in 5 projects, tests not counted · Estimated rebuild effort: about 1.8 person-years · Weakest lens: Accessibility, 41.2

Findings by how serious they are

21 critical 730 serious 50 minor

15 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, 16:00 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 ▸

64of 64 dimensions measured by tools.
790of 801 findings point to an exact file and line, so you can open each one in the code. The other 11 concern the repository as a whole, such as missing documentation.
64dimensions across 8 lenses, read from 99,492 lines of product code in 5 projects.
Chapters

Executive summary

rusty4444/ares falls short of our standard for production, held back most by its Accessibility lens, the interface's usability with a keyboard or assistive technology. It scores 54.3 out of 100 and is rated Adequate, and 19 of its 21 critical findings are security problems in the build pipeline.

Accessibility, at 41.2, is the weakest lens and counts most in the score. The best first step is making the controls keyboard-usable, worth about 9.6 points. Labelling the form fields and buttons comes next, worth about 5.5 points. Raising Accessibility to 70 would lift the score to about 64.2.

Nineteen pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. One control can't be used without a mouse, and one form field can't be read by a screen reader. Making the controls work with a keyboard, labelling the form fields and pinning each tool to an exact version would close these risks.

The product code is 99,492 lines, about €260,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.
Accessibility 41.2 · counts for 45%Performance 60.0 · counts for 25%Production Readiness 62.5 · counts for 14%Security and Compliance 65.6 · counts for 8%Code Health 77.1 · counts for 4%Maturity 88.6 · counts for 2%Architecture 92.5 · counts for 1%Domain Modelling 100.0 · counts for 1%

If Accessibility rose from 41.2 to 70, the lowest score rated Strong, the score would rise from 54.3 to about 64.2.

Code composition: what the lines of code are
Product code 38%Tests 62%
Rebuild cost: about €260,000 · Estimate
Cost to rebuild€87,000 to €440,000, for 1,448 to 4,594 hours of work, about 1.8 person-years for 1 to 4 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.8 at a score of 54. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 99,492 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
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Raises the score by about 9.6 points · Medium effort · Keyboard semantics
2
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Raises the score by about 5.5 points · Medium effort · Forms & labels
3
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Raises the score by about 4.7 points · Medium effort · Page structure

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 €260,000 to build again, about 1.8 person-years of work. Its weakest lens is Accessibility, at 41.2 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href. Of all the actions in this report, it raises the score most for the work it takes: about 9.6 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.9 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 12% on every change. The history of the code shows how much it changes: about 321,392 lines over the last 90 days, which is about 1,303,423 lines a year. At that pace, the extra work comes to an estimated 170.6 to 1023.8 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.

41 modules, with 15 dependencies between them. One loop runs through 2 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 1 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 com.eyedeadevelopment.fluttertts.FlutterTtsPlugin2 com.hermesagent.hermes_android.AndroidWakeCapture3 com.hermesagent.hermes_android.AttachmentFileSaver4 com.hermesagent.hermes_android.AttachmentPdfStore5 com.hermesagent.hermes_android.ConnectionKeepAliveService6 com.hermesagent.hermes_android.EngineScopedPreferencesPlugin7 com.hermesagent.hermes_android.JoinableSpeechRecognizer8 com.hermesagent.hermes_android.MobilePushBridge9 com.hermesagent.hermes_android.MobilePushPlugin10 com.hermesagent.hermes_android.MobilePushTransport11 com.hermesagent.hermes_android.VoiceWakeWorker12 graphify-out13 repository.l10n14 scripts15 scripts.paging_contract_fuzz16 scripts.prepare_voice_inputs17 server18 server.mobile-push19 server.mobile-push.dashboard20 server.mobile-push.mobile_push.api21 server.mobile-push.mobile_push.config22 server.mobile-push.mobile_push.inbox23 server.mobile-push.mobile_push.service24 server.mobile-push.mobile_push.transport25 tools26 tools.background_smoke_gateway27 tools.fake_gateway.fake_gateway28 tools.fake_gateway.test_fake_gateway29 com.eyedeadevelopment.fluttertts30 com.hermesagent.hermes_android.HandsFreeVoiceEngine31 repository.core32 server.mobile-push.mobile_push33 server.mobile-push.mobile_push.scope34 server.mobile-push.mobile_push.store35 tools.fake_gateway36 com.hermesagent.hermes_android37 repository38 repository.nextgen39 com.hermesagent.hermes_android.ApkUpdateSource40 com.hermesagent.hermes_android.HandsFreeVoicePlugin
1 com.eyedeadevelopment.fluttertts.FlutterTtsPlugin
2 com.hermesagent.hermes_android.AndroidWakeCapture
3 com.hermesagent.hermes_android.AttachmentFileSaver
4 com.hermesagent.hermes_android.AttachmentPdfStore
5 com.hermesagent.hermes_android.ConnectionKeepAliveService
6 com.hermesagent.hermes_android.EngineScopedPreferencesPlugin
7 com.hermesagent.hermes_android.JoinableSpeechRecognizer
8 com.hermesagent.hermes_android.MobilePushBridge
9 com.hermesagent.hermes_android.MobilePushPlugin
10 com.hermesagent.hermes_android.MobilePushTransport
11 com.hermesagent.hermes_android.VoiceWakeWorker
12 graphify-out
13 repository.l10n
14 scripts
15 scripts.paging_contract_fuzz
16 scripts.prepare_voice_inputs
17 server
18 server.mobile-push
19 server.mobile-push.dashboard
20 server.mobile-push.mobile_push.api
21 server.mobile-push.mobile_push.config
22 server.mobile-push.mobile_push.inbox
23 server.mobile-push.mobile_push.service
24 server.mobile-push.mobile_push.transport
25 tools
26 tools.background_smoke_gateway
27 tools.fake_gateway.fake_gateway
28 tools.fake_gateway.test_fake_gateway
29 com.eyedeadevelopment.fluttertts2
30 com.hermesagent.hermes_android.HandsFreeVoiceEngine5
31 repository.core11
32 server.mobile-push.mobile_push11
33 server.mobile-push.mobile_push.scope1
34 server.mobile-push.mobile_push.store1
35 tools.fake_gateway1
36 com.hermesagent.hermes_android162
37 repository18
38 repository.nextgen28
39 com.hermesagent.hermes_android.ApkUpdateSource1
40 com.hermesagent.hermes_android.HandsFreeVoicePlugin1
Uses a module listed above itPart of a loopThe module itself
1 com.eyedeadevelopment.fluttertts.FlutterTtsPlugin2 com.hermesagent.hermes_android.AndroidWakeCapture3 com.hermesagent.hermes_android.AttachmentFileSaver4 com.hermesagent.hermes_android.AttachmentPdfStore5 com.hermesagent.hermes_android.ConnectionKeepAliveService6 com.hermesagent.hermes_android.EngineScopedPreferencesPlugin7 com.hermesagent.hermes_android.JoinableSpeechRecognizer8 com.hermesagent.hermes_android.MobilePushBridge9 com.hermesagent.hermes_android.MobilePushPlugin10 com.hermesagent.hermes_android.MobilePushTransport11 com.hermesagent.hermes_android.VoiceWakeWorker12 graphify-out13 repository.l10n14 scripts15 scripts.paging_contract_fuzz16 scripts.prepare_voice_inputs17 server18 server.mobile-push19 server.mobile-push.dashboard20 server.mobile-push.mobile_push.api21 server.mobile-push.mobile_push.config22 server.mobile-push.mobile_push.inbox23 server.mobile-push.mobile_push.service24 server.mobile-push.mobile_push.transport25 tools26 tools.background_smoke_gateway27 tools.fake_gateway.fake_gateway28 tools.fake_gateway.test_fake_gateway29 com.eyedeadevelopment.fluttertts30 com.hermesagent.hermes_android.HandsFreeVoiceEngine31 repository.core32 server.mobile-push.mobile_push33 server.mobile-push.mobile_push.scope34 server.mobile-push.mobile_push.store35 tools.fake_gateway36 com.hermesagent.hermes_android37 repository38 repository.nextgen39 com.hermesagent.hermes_android.ApkUpdateSource40 com.hermesagent.hermes_android.HandsFreeVoicePlugincom.eyedeadevelopment.fluttertts.FlutterTtsPlugin1com.hermesagent.hermes_android.AndroidWakeCapture2com.hermesagent.hermes_android.AttachmentFileSaver3com.hermesagent.hermes_android.AttachmentPdfStore4com.hermesagent.hermes_android.ConnectionKeepAliveService5com.hermesagent.hermes_android.EngineScopedPreferencesPlugin6com.hermesagent.hermes_android.JoinableSpeechRecognizer7com.hermesagent.hermes_android.MobilePushBridge8com.hermesagent.hermes_android.MobilePushPlugin9com.hermesagent.hermes_android.MobilePushTransport10com.hermesagent.hermes_android.VoiceWakeWorker11graphify-out12repository.l10n13scripts14scripts.paging_contract_fuzz15scripts.prepare_voice_inputs16server17server.mobile-push18server.mobile-push.dashboard19server.mobile-push.mobile_push.api20server.mobile-push.mobile_push.config21server.mobile-push.mobile_push.inbox22server.mobile-push.mobile_push.service23server.mobile-push.mobile_push.transport24tools25tools.background_smoke_gateway26tools.fake_gateway.fake_gateway27tools.fake_gateway.test_fake_gateway28com.eyedeadevelopment.fluttertts29com.hermesagent.hermes_android.HandsFreeVoiceEngine30repository.core31server.mobile-push.mobile_push32server.mobile-push.mobile_push.scope33server.mobile-push.mobile_push.store34tools.fake_gateway35com.hermesagent.hermes_android36repository37repository.nextgen38com.hermesagent.hermes_android.ApkUpdateSource39com.hermesagent.hermes_android.HandsFreeVoicePlugin40251111111162182811+1 more modules (most-connected shown)

At a glance — Code Health · 77.1 · Adequate · gated by D1, D2 ·

At a glance — Architecture · 92.5 · Exemplary ·

At a glance — Maturity · 88.6 · Strong ·

At a glance — Readiness · 62.5 · Adequate · gated by P3 ·

At a glance — Security · 65.6 · Adequate · gated by D36 ·

At a glance — Domain Modelling · 100.0 · Exemplary ·

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

At a glance — Performance · 60.0 · Adequate ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A05:2025 — Injection19High / Critical
A03:2025 — Software Supply Chain Failures4Medium
A02:2025 — Security Misconfiguration1Medium

Roadmap

Top priorities: Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href; Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label; Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.

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

Do thisHelpsEffortDimension
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+9.6 ptsMediumKeyboard semantics
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+5.5 ptsMediumForms & labels
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+4.7 ptsMediumPage structure
Python: await the async equivalent (asyncio.sleep, an async HTTP client such as httpx.AsyncClient or aiohttp, asyncio.create_subprocess_exec), or move the blocking call off the loop with `await asyncio.to_thread(...)`; never call asyncio.run inside a coroutine — await the coroutine.+2.6 ptsMediumAsync & latency hygiene
Resolve the 1 REDACTED finding(s) in Vulnerability-disclosure Policy — start with REDACTED.+0.6 ptsLowVulnerability-disclosure Policy
Set security response headers on what the server sends — `response.headers.set('X-Content-Type-Options', 'nosniff')` in a `dart:io` handler, or a shelf middleware that adds `Content-Security-Policy`, `X-Content-Type-Options` and a frame policy to every `Response`.+1.2 ptsMediumWeb-Security Posture
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.+0.8 ptsMediumObservability
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing.+0.2 ptsLowSupply-chain Provenance & Signing

File quality

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

FileScoreBandWorst signal
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
lib/core/screens/chat_screen.dart4.8MixedCyclomatic Complexity: _ChatScreenState._buildInputBar (cyclomatic 83)
lib/main.dart4.8MixedCyclomatic Complexity: HermesAppState._runNotificationNavigation (cyclomatic 53)
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
lib/core/screens/session_list_screen.dart5.5MixedCyclomatic Complexity: _SessionListScreenState._buildBody (cyclomatic 71)
lib/core/screens/workspace_screen.dart5.5MixedCyclomatic Complexity: _WorkspaceScreenState._loadWorkspaceSessionsData (cyclomatic 24)
lib/core/widgets/delegated_task_timeline.dart5.9MixedCyclomatic Complexity: _DelegatedTaskTimelineState.build (cyclomatic 24)
lib/core/services/normal_gateway_application_session.dart7.0MixedCyclomatic Complexity: NormalGatewayChatOwner._event (cyclomatic 119)
lib/core/services/mobile_push_service.dart7.0MixedCyclomatic Complexity: MobilePushService._refresh (cyclomatic 59)
lib/core/screens/workspace_sessions_screen.dart7.0MixedCyclomatic Complexity: WorkspaceSessionsScreenState._buildLoaded (cyclomatic 51)
lib/core/services/connection_manager.dart7.0MixedCyclomatic Complexity: GatewayChatClient.sendMessageStreaming (cyclomatic 44)
lib/core/services/gateway_turn_coordinator.dart7.0MixedCyclomatic Complexity: GatewayTurnCoordinator.submit (cyclomatic 36)
lib/core/services/gateway_turn_journal.dart7.0MixedCyclomatic Complexity: GatewayTurnJournalEntry._fromJson (cyclomatic 30)
lib/core/services/projects_repository.dart7.0MixedCyclomatic Complexity: ProjectsRepository._reconcileSnapshot (cyclomatic 27)
lib/core/screens/cron_screen.dart7.0MixedCyclomatic Complexity: _CronScreenState._showEditJobDialog (cyclomatic 26)
lib/core/services/desktop_gateway_client.dart7.0MixedCyclomatic Complexity: DesktopGatewayClient._handleServerRequest (cyclomatic 24)
lib/core/models/gateway_turn_contract.dart7.0MixedCyclomatic Complexity: GatewayTurnRecoveryCapability._fromRecoveryPayload (cyclomatic 39)
lib/core/controllers/hands_free_conversation_controller.dart7.0MixedCyclomatic Complexity: HandsFreeConversationController._event (cyclomatic 34)
lib/core/services/ws_client.dart7.0MixedCyclomatic Complexity: WsClient.parseGatewayEvent (cyclomatic 33)

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

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

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

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

Could not be resolved — 15

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

Methodology & how to trust this report

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 64 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 — 64 dimensions across the health lenses
D1D2D3D4D5D6D7D13D14D15D16D17D19D20D26D28D29D30D34D35D36D37D43D44AC2AC3AC4AC6AX10AX3AX4AX6AX9DM5GD1IC1M1M2M3M4P1P10P2P3P6P7PF3S1X1X12X14X16X18X2X20X21X25X27X28X29X3X30X4X5

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, 790 of 801 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 · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic

Every finding is locatable in findings.md. Run 01a1ea3c-ef8f-7395-b7ab-f84fad5e99ff.

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 Python half could not be measured — the pytest suite ran, but the analyzer could not read its coverage for server/mobile-push, so a figure over the rest would be a part of the suite. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
  • 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 source is present (.py, .dart, .kt) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D12 Dependency Hygiene — 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. Not scored — 3 Maven/Gradle manifest(s) were read, stating a version for 10 dependency(ies) and leaving 0 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
  • 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 a Gradle build (build.gradle/build.gradle.kts), but the licence verdict published here was taken over its pub package dependencies. Nothing was read about its Gradle dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D20 ADR 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 ADR lexicon (adr-lexicon-1) covers de, en, it, nl. A record identified as another language, or whose language could not be identified (fewer than 25 words of prose, or no clear winner), is never read with English rules: its missing-section, status, consequence-cost and same-question rules abstain, and only the structural rules (title, single option, dangling link, enforcement field) run.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • 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's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `android/app/src/main/kotlin/com/hermesagent/hermes_android/MobilePushTransport.kt` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AX1 Captive dependencies — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in lib/core/services/composer_draft_store.dart, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXB1 Runtime evidence locked — no reproducible boot — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: 1 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — 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 authorization 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 authorization controls.
  • C3 Audit Trail — 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 audit 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 audit controls.
  • C4 Data Retention — 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 retention 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 retention controls.
  • C5 Data-Subject Rights — 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 data-subject rights 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 data-subject rights controls.
  • 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.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • 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. 18 further occurrence(s) are not listed individually; the score already reflects all 58.

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.
  • D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • 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.
  • 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.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • 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.
  • 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.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • 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.
  • 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 Complexity3.2 / 10Weak✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

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

164 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was NormalGatewayChatOwner._event at 119. 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 _WorkspaceScreenState._openMoreEntry at 17 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: lib/core/widgets/gateway_activity_card.dart (_GatewayActivityRow._emojiFor at 17). 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.

NormalGatewayChatOwner._event (cyclomatic 119)lib/core/services/normal_gateway_application_session.dart:1851
_ChatScreenState._buildInputBar (cyclomatic 83)lib/core/screens/chat_screen.dart:7111
_SessionListScreenState._buildBody (cyclomatic 71)lib/core/screens/session_list_screen.dart:1515
_ChatScreenState._applyNormalSnapshot (cyclomatic 66)lib/core/screens/chat_screen.dart:1158
NormalGatewayChatOwner._settle (cyclomatic 61)lib/core/services/normal_gateway_application_session.dart:2505

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

What to do

  1. Bring the 5 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with NormalGatewayChatOwner._event (cyclomatic 119), _ChatScreenState._buildInputBar (cyclomatic 83), _SessionListScreenState._buildBody (cyclomatic 71). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 5 together lifts Cyclomatic Complexity from 3.2 to about 4.8/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

249 method(s) exceeded the cognitive complexity threshold of 15; the worst was NormalGatewayChatOwner._event at 173.

NormalGatewayChatOwner._event (cognitive 173)lib/core/services/normal_gateway_application_session.dart:1851
MobilePushService._refresh (cognitive 115)lib/core/services/mobile_push_service.dart:469
NormalGatewayChatOwner._settle (cognitive 111)lib/core/services/normal_gateway_application_session.dart:2505
_ChatScreenState._submitMessage (cognitive 104)lib/core/screens/chat_screen.dart:4781
_SessionListScreenState._buildBody (cognitive 97)lib/core/screens/session_list_screen.dart:1515

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

What to do

  1. Bring the 17 bodies over 60 down to 60 or less in Cognitive Complexity — start with NormalGatewayChatOwner._event (cognitive 173), MobilePushService._refresh (cognitive 115), NormalGatewayChatOwner._settle (cognitive 111). — 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 17 together lifts Cognitive 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: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes8.4 / 10Strong✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

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

100 god class(es) detected.

MethodTooLong: _SessionListScreenState._buildBody · ×37lib/core/screens/session_list_screen.dart:1515
FileTooLong: screens/chat_screen.dart · ×25lib/core/screens/chat_screen.dart
ClassTooLong: _ChatScreenState · ×23lib/core/screens/chat_screen.dart:713
TooManyMethods: _ChatScreenState · ×15lib/core/screens/chat_screen.dart:713

What to do

  1. Resolve the 37 MethodTooLong finding(s) in God Classes — start with chat_screen.dart (13), main.dart (4), normal_gateway_application_session.dart (3). — One of this dimension's main actionable groups (37 warning-level).
  2. Resolve the 25 FileTooLong finding(s) in God Classes — start with chat_screen.dart, main.dart, connection_manager.dart. — One of this dimension's main actionable groups (25 warning-level).
  3. Resolve the 23 ClassTooLong finding(s) in God Classes — start with connection_manager.dart (3), main.dart (3), chat_screen.dart (2). — One of this dimension's main actionable groups (23 warning-level).

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

D4 · Code Duplication8.7 / 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 8.7 / 10 · rule-coverage 100% · ceiling Verified

45 duplicated block group(s) detected. 3.1 % of the production lines (3,118 of 99,492) are in a reported copy. A further 63 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 6 of the 108 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Edited copy of a member (17 corresponding lines) · ×7lib/core/services/background_work_prefs.dart:72
Edited copy of a member (12 corresponding lines) · ×6lib/core/screens/chat_screen.dart:2946
Edited copy of a member (15 corresponding lines) · ×5lib/core/widgets/theme_palette_picker.dart:66
Duplicated block (11 lines × 2) · ×5lib/core/screens/session_list_screen.dart:820
Duplicated block (10 lines × 2) · ×4lib/core/models/project_sessions_tree.dart:162

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

What to do

  1. Resolve the 7 Edited copy of a member (17 corresponding lines) finding(s) in Code Duplication — start with provider_usage_screen.dart (2), background_work_prefs.dart, workspace_screen.dart. — One of this dimension's main actionable groups (7 warning-level).
  2. Resolve the 6 Edited copy of a member (12 corresponding lines) finding(s) in Code Duplication — start with chat_screen.dart, hermes_project.dart, projects_pane.dart. — One of this dimension's main actionable groups (6 warning-level).
  3. Resolve the 5 Edited copy of a member (15 corresponding lines) finding(s) in Code Duplication — start with theme_palette_picker.dart, desktop_gateway_client.dart, chat_screen.dart. — 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

5 production modules (Gradle+Python+pub), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 0 module(s) off the main sequence, with abstractness counted on 3 of the 5 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)9.6 / 10Stronggated by 7 serious findings✓ 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.6 / 10 · rule-coverage 100% · ceiling Verified

7 of 237 classes have LCOM4 above 3.

Low cohesion: _ChatScreenState (LCOM4 9) · ×7lib/core/screens/chat_screen.dart:713

What to do

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

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

D7 · Architectural Integrity6.0 / 10Adequate✓ Tool-verified

What it measures: Whether the code respects its intended layering / architecture rules.

Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.

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

No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).

Detailed fixes: d7_recommendation.md.

D13 · Secret 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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

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

0 of 163 resolved pub package(s) use a banned license. Licences were read from pub.dev's analysis of each package's licence file, over every package this repository's pubspec.lock resolves from pub.dev, direct and transitive, at the locked version; the 7 package(s) the lock marks direct dev are excluded, and SDK, path and git packages have no registry release to read. pub.dev analyses only recent releases, so for 44 package(s) locked at an older version the licence read is that of the package's latest analysed release, not of the locked one. 1 of them carry no licence pub.dev recognises; that is missing data, not a violation, and none of them is charged. ★ COVERAGE OF THIS VERDICT: it grades this repository's pub package dependencies and nothing else. The repository also declares a Gradle build (build.gradle/build.gradle.kts), 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.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots8.6 / 10Strong✓ 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 8.6 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: lib/core/screens/chat_screen.dart (144×83=11952); lib/core/services/normal_gateway_application_session.dart (39×119=4641); lib/main.dart (67×53=3551) Repeated repair below the complexity floor: lib/core/services/gateway_turn_application_controller.dart (14 of 17 changes were fixes); lib/core/utils/chat_display_items.dart (13 of 21 changes were fixes); lib/core/services/turn_notification_service.dart (12 of 17 changes were fixes)

Hotspot: lib/core/screens/chat_screen.dart · ×35lib/core/screens/chat_screen.dart:7111
Repeated repair: lib/core/services/gateway_turn_application_controller.dart · ×20lib/core/services/gateway_turn_application_controller.dart:397

What to do

  1. Resolve the 35 Hotspot finding(s) in Churn × Complexity Hotspots — start with chat_screen.dart, normal_gateway_application_session.dart, main.dart. — One of this dimension's main actionable groups (35 warning-level).
  2. Resolve the 20 Repeated repair finding(s) in Churn × Complexity Hotspots — start with gateway_turn_application_controller.dart, chat_display_items.dart, turn_notification_service.dart. — One of this dimension's main actionable groups (20 warning-level).

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

D16 · Bus Factor9.6 / 10Exemplary✓ Tool-verified

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

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

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

10 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is scripts/paging_contract_fuzz.py. Counted over 235 of the 295 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 · ×2
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

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

D17 · Explicit Debt10.0 / 10Exemplary○ Nothing flagged

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

0 deducted task-comment markers across 99492 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.

✓ On the Gold path — maintain.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality10.0 / 10Exemplary○ Nothing flagged

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

0 of 70 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question, a date that is no calendar day). How well each record argues its case is not measured.

✓ On the Gold path — maintain.

Detailed fixes: d20_recommendation.md.

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

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

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

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

1 of 5 build units (Gradle, Python, Xcode, pub) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesionpubspec.yaml:1

What to do

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

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

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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

Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

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

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)10.0 / 10Adequategated by 19 critical findings○ Nothing flagged

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

19 finding(s): 0 critical, 19 high, 0 medium, 0 low. 19 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. Separately, one or more rules could not re-parse an embedded snippet in 2 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED

What to do

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

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

D30 · Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

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

No known-vulnerable dependencies in any ecosystem this repository declares.

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

D34 · Knowledge Freshness10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Documented

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

Orphaned files with no living knowledge
Orphaned filelib/core/widgets/gateway_sensitive_prompt_dialog.dart:1

✓ On the Gold path — maintain.

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

D35 · Change Coupling9.9 / 10Stronggated by 1 serious finding✓ 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.9 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: chat_screen.dart↔composer_draft_store.dart 70%

Change coupling: chat_screen.dart ↔ composer_draft_store.dartlib/core/screens/chat_screen.dart:1

What to do

  1. Resolve the 1 Change coupling finding(s) in Change Coupling — start with chat_screen.dart. — 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

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — 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 recommendation-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 Policy4.0 / 10Weak✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (REDACTED 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 REDACTED (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 4.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (REDACTED) is present but lists no reporting contact.

REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Vulnerability-disclosure Policy — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d37_recommendation.md · top locations in Appendix A, every location in findings.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 4 platform declaration(s) and 15 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.

AC2 · Forms & labels4.3 / 10Weak✓ Tool-verified

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. — graphify-out/graph.html:57

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 structure5.0 / 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>. — graphify-out/graph.html:7

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC4 · Keyboard semantics1.0 / 10Critical✓ Tool-verified

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

  • A script attaches a click listener to this <div>, but it has no role, no tabindex and no key handler, so it can only be operated with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — graphify-out/graph.html:54

What to do

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

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.

AX10 · Code composition9.4 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

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

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

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

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

AX6 · Interface segregation9.7 / 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.

  • `GatewayTurnApplicationSession` declares 20 abstract methods: `setAsyncEventListener`, `removeAsyncEventListener`, `setTurnSettledListener`, `removeTurnSettledListener`, `ownsApprovalRequest`, `tryRespondToApproval`, `tryRespondToClarify`, `tryRespondToSudo`, `tryRespondToSecret`, `stageAttachment`, `detachAttachments`, `submit`, `recoverPending`, `interrupt`, `close`, `setSessionBoundListener`, `removeSessionBoundListener`, `hasActiveTurn`, `addTurnActivityListener`, `removeTurnActivityListener`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — lib/core/services/gateway_turn_application_controller.dart:22
  • `AppLocalizations` declares 1609 abstract methods: `fallback_title`, `fallback_notice`, `fallback_unavailable`, `fallback_discovery_unavailable`, `fallback_empty`, `fallback_incomplete`, `fallback_add`, `fallback_save`, `fallback_save_failed`, `fallback_saved`, `fallback_legacy_title`, `fallback_legacy_notice`, `fallback_priority`, `fallback_move_up`, `fallback_move_down`, `fallback_routing_read_only`, `cron_model_default`, `cron_model_notice`, `model_management_unavailable`, `model_management_subtitle`, `usage`, `nous_portal`, `portal_menu_subtitle`, `portal_read_only`, `portal_status`, `portal_free_tier`, `portal_signed_in`, `portal_signed_out`, `portal_account_tier`, `portal_recorded_usage`, `portal_all_providers`, `portal_period`, `portal_sessions`, `portal_input`, `portal_output`, `portal_estimated`, `portal_actual`, `portal_recorded_models`, `portal_no_models`, `portal_unavailable`, and 1569 more. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — lib/l10n/app_localizations.dart:21

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether an entity protects its own invariants — a class whose identity is derived from its fields (value equality) but whose fields are publicly mutable bypasses that invariant. Encapsulated state keeps identity-bearing fields immutable.

Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

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

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

IC1 · Incompleteness & stubs10.0 / 10Exemplary○ Nothing flagged

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

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

M1 · Documentation (README)8.5 / 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.

M2 · Architecture documentation8.0 / 10Strong✓ 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.

M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

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

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

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

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

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

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

  • Only 1/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `ios`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
P3 · Security & performance tooling0.0 / 10Critical✓ 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 the Dart analyzer's security lints plus `semgrep --config=auto` as a CI step. What was searched, so you can tell an absence from a miss: the 3 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:4
  • `android/app/build.gradle.kts` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — android/app/build.gradle.kts:166

What to do

  • Add a SAST step to CI running what this repository's stack ships: the Dart analyzer's security lints plus `semgrep --config=auto` — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P6 · Release Hygiene10.0 / 10Exemplary✓ 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.

P7 · Outbound HTTP resilience10.0 / 10Exemplary○ Nothing flagged

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.

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

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

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

  • `capture` is async and calls subprocess.check_output — a blocking call inside async code stalls the event loop — every other task on it waits for as long as it runs. — tools/capture_task_history_fixture.py:38
  • `deliverExport` is async and calls listSync, deleteSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs. — lib/core/services/config_backup_io.dart:41

What to do

  • Python: await the async equivalent (asyncio.sleep, an async HTTP client such as httpx.AsyncClient or aiohttp, asyncio.create_subprocess_exec), or move the blocking call off the loop with `await asyncio.to_thread(...)`; never call asyncio.run inside a coroutine — await the coroutine.
  • Dart: await the async dart:io API (readAsString, writeAsString, Process.run, Future.delayed) instead of the *Sync variant or sleep(), or move heavy synchronous work to another isolate with Isolate.run.
S1 · Web-Security Posture6.0 / 10Adequate✓ Tool-verified

Other · Security — Read from this repository's Dart source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS certificate validation — facts about code that hold whether or not it serves anything itself. The TLS protocol version is not read: `dart:io` leaves the protocol floor to the platform's TLS library and has no switch that admits an obsolete version. This repository serves HTTP itself (lib/core/services/hermes_sign_in.dart:863 — `HttpServer.bind(`), so its Dart source was also read for the server controls: TLS served or HSTS set, security response headers, cookie flags and inbound validation — each credited where its Dart spelling appears in production source, not proven on every route. Every server it binds listens on the loopback interface only, so its traffic never leaves the device and HTTPS enforcement is N/A, as it is for a native app's loopback redirect listener (RFC 8252 §7.3).

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 set on a response this repository's Dart server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: lib/core/services/hermes_sign_in.dart:863 — `HttpServer.bind(`.
  • No handler of this repository's Dart server answers 400, 413 or 422 (`Response.badRequest`, `HttpStatus.badRequest`, `statusCode = 400`) and no validation package (luthor, acanthis, ez_validator, json_schema, …) is imported — nothing shows inbound requests being checked, and refused, before a handler acts on them. A check that answers its failure with 200 and an error body is not seen. (−2.0 on this card.) The server: lib/core/services/hermes_sign_in.dart:863 — `HttpServer.bind(`.

What to do

  • Set security response headers on what the server sends — `response.headers.set('X-Content-Type-Options', 'nosniff')` in a `dart:io` handler, or a shelf middleware that adds `Content-Security-Policy`, `X-Content-Type-Options` and a frame policy to every `Response`.
  • Validate what the server reads from a request — path, query, headers, body size and shape — and answer what fails with 400 (413 for an oversized body) before a handler acts on it, so a client and a proxy can tell a refusal from a success.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

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

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

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

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

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X2 · Cancellation propagation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether functions that make a cancellable request accept or pass on a CancelToken (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.

X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `NullPointerException` (Java, Kotlin, Scala), `ArgumentError.notNull` (Dart) or `ArgumentNullException` (F#'s `nullArg`) tells the caller a parameter was null when it provably was not.

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements (or a repository exception type deriving from it) controlled by an `if` — directly or through the `using`, `lock` or `try` that wraps the throw — whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`); in the `else` branch, for a conjunct of the admitting condition that is FALSE of a non-null `p`. Range guards are read for bounds that leave nothing and for a `p > C.Count` bound whose index then reaches `C[p]`, `C.RemoveAt(p)` or a method of the same type that indexes with it. Deterministic, provable per finding. Advisory.

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.

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. Whether a `for … in` loop leaves the `List`, `Map` or `Set` it is walking alone — Dart's collection iterators check that the collection has not changed since the loop began, so a body that adds to or removes from the very collection the loop is walking (or the map whose `keys`, `values` or `entries` it walks) makes the next step throw `ConcurrentModificationError` and the remaining elements are never seen. Whether a `for (x in c)` or `c.forEach { … }` leaves the collection it is walking alone — a `mutableListOf`/`ArrayList`, `mutableMapOf`/`HashMap` or `mutableSetOf`/`HashSet` is a `java.util` collection on the JVM and is walked by its own fail-fast iterator, so a body that adds to or removes from the very collection the loop is walking makes the next step throw `ConcurrentModificationException` and the remaining elements 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.

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

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

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

X3 · Exception handling5.8 / 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.

  • `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. — server/mobile-push/mobile_push/service.py:101
  • `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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. (×30) — lib/main.dart:651, lib/main.dart:2725, lib/main.dart:2737, …
  • 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. (×9) — lib/nextgen/data/chat_controller.dart:1828, lib/nextgen/data/chat_controller.dart:1835, lib/core/services/connection_manager.dart:3083, …

What to do

  • Swallowed exception (caught, then discarded)
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 logging10.0 / 10Exemplary○ Nothing flagged

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.

X5 · Nullable reference types8.8 / 10Strong✓ Tool-verified

Other · Code Health — Whether Dart's sound null safety is on and is not undermined by null assertions — a package whose `environment: sdk:` lower bound is 2.12 or above is null safe, so `String` cannot hold null and `String?` must be checked before use, and each postfix `!` is a run-time `Null check operator used on a null value` the author has told the analyzer cannot happen.

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

WCAG coverage — what static analysis assessed

Statically assessed 12 of 55 WCAG 2.2 Level A/AA success criteria (22%; ≈24% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 43 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
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
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

Not statically assessed — these 43 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.1.1, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 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 Health77.1Adequate — gated by D1, D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture92.5ExemplarySolid.
Maturity88.6StrongSolid.
Readiness62.5Adequate — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security65.6Adequate — gated by D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling100.0ExemplaryStrongest area.
Accessibility41.2Weak — gated by AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60.0AdequateAcceptable, with room to improve.
Unscored — 4 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.

  • P12 CI test-gate honesty — 2 observation(s) recorded · 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'.
  • X10 Duplicated predicate — 31 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 5 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 — Not assessed: these audit 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 audit 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.
  • C4 Data Retention — Not assessed: these retention 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 retention 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.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights 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 data-subject rights 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.
  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 51 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
  • AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
  • AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Java code is a Spring, JSR-330 or CDI singleton bean. No class in this Kotlin code is a Spring, JSR-330 or CDI singleton bean. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads. Dart isolates share no mutable memory, so no two requests write one object at the same instant.
  • 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
  • AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization 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 authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D10 Test Quality — ~165181 lines of test source are present (.py, .dart, .kt) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — no .dart test runner
  • D12 Dependency Hygiene — Not scored — 3 Maven/Gradle manifest(s) were read, stating a version for 10 dependency(ies) and leaving 0 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
  • 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 — Naming consistency does not read html yet; not measured.
  • D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go only; the exposed Python surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .dart, .kt, .py, .swift, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — None of 0 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.dart), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 1 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • 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.
  • D8 Code Coverage — Coverage not measured — Python suite
  • DM1 Aggregate boundaries — not scored for Dart: aggregate-vs-value-object classification cannot be told apart in source (every class-holding-class reads alike), and a child COLLECTION (legitimate membership) vs a single embedded aggregate is indistinguishable — reported as guidance rather than measured
  • DM2 Strongly-typed ids — no in-repo typed-id idiom — primitive-obsession recorded as advisory DM8, DM2 not gated
  • DM3 Integration-event coupling — not scored for Dart: a cross-package domain leak cannot be told apart in source from a legitimate shared-kernel package, and most repositories ship a single package — reported as guidance rather than measured
  • DM4 Rich vs anemic domain model — this Dart repository declares no domain-layer entity carrying stored data (every type is a typed-id wrapper, DTO/config, ORM row or presentation container), so DM4's rich-vs-anemic read has no population to be taken over
  • DM6 Domain ↔ infrastructure boundary — this Dart repository maps no type to a persistence framework (drift/floor/isar/objectbox/hive), so DM6's domain↔infrastructure fusion read has no population to be taken over
  • DM7 Repository granularity — not scored for Dart: 'a repository per CHILD entity' needs the aggregate-root structure, which is not source-resolvable — reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, which this analysis does not build from source alone for this language. Reported as guidance rather than measured
  • 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
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for classes extending benchmark_harness's `BenchmarkBase`, `AsyncBenchmarkBase` or `PerfBenchmarkBase` (directly or through a base of your own), `benchmark(…)` calls under the pub `benchmark` package, Flutter's `benchmarkWidgets`, `watchPerformance` or `traceAction` in a test importing flutter_test, integration_test or flutter_driver, or benchmark_harness, benchmark or web_benchmarks in a pubspec.yaml, 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.
  • 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
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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.
  • 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 — 21 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <input> without a programmatic label · ×1
  • <input> without a programmatic label graphify-out/graph.html:57 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×1
  • Click handler on a non-interactive <div> graphify-out/graph.html:54 — A script attaches a click listener to this <div>, but it has no role, no tabindex and no key handler, so it can only be operated with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
Serious — 730 finding(s)
D3 · God Classes · MethodTooLong · ×37
  • MethodTooLong: _SessionListScreenState._buildBody lib/core/screens/session_list_screen.dart:1515 — MethodTooLong — _buildBody runs 386 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 286 over it, 3.86× 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.
  • MethodTooLong: NormalGatewayChatOwner._event lib/core/services/normal_gateway_application_session.dart:1851 — MethodTooLong — _event runs 320 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 220 over it, 3.20× 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.
  • MethodTooLong: _ChatScreenState._buildInputBar lib/core/screens/chat_screen.dart:7111 — MethodTooLong — _buildInputBar 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.
  • MethodTooLong: _AddDialogState.build lib/main.dart:3007 — MethodTooLong — build runs 275 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 175 over it, 2.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _ChatScreenState._submitMessage lib/core/screens/chat_screen.dart:4781 — MethodTooLong — _submitMessage runs 210 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 110 over it, 2.10× 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.
  • MethodTooLong: HomeScreenState._showDashboardAuthDialog lib/main.dart:1891 — MethodTooLong — _showDashboardAuthDialog runs 192 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 92 over it, 1.92× 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.
  • MethodTooLong: _ChatScreenState._applyNormalSnapshot lib/core/screens/chat_screen.dart:1158 — MethodTooLong — _applyNormalSnapshot runs 187 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 87 over it, 1.87× 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.
  • MethodTooLong: _ChatScreenState.build lib/core/screens/chat_screen.dart:6806 — MethodTooLong — build runs 178 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× 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.
  • MethodTooLong: _CronScreenState._buildBody lib/core/screens/cron_screen.dart:641 — MethodTooLong — _buildBody runs 169 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 69 over it, 1.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.
  • MethodTooLong: NormalGatewayChatOwner.submitPrepared lib/core/services/normal_gateway_application_session.dart:1594 — MethodTooLong — submitPrepared runs 164 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× 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.
  • MethodTooLong: _ChatScreenState._sendRecoverableGatewayMessage lib/core/screens/chat_screen.dart:5242 — MethodTooLong — _sendRecoverableGatewayMessage runs 163 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 63 over it, 1.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WorkspaceSessionsScreenState._buildLoaded lib/core/screens/workspace_sessions_screen.dart:1403 — MethodTooLong — _buildLoaded runs 163 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 63 over it, 1.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GatewayChatClient.sendMessageStreaming lib/core/services/connection_manager.dart:2136 — MethodTooLong — sendMessageStreaming runs 155 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× 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.
  • MethodTooLong: _MobilePushSettingsState.build lib/core/widgets/mobile_push_settings.dart:140 — MethodTooLong — build runs 151 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 51 over it, 1.51× 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.
  • MethodTooLong: NormalGatewayChatOwner._settle lib/core/services/normal_gateway_application_session.dart:2505 — MethodTooLong — _settle runs 148 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× 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.
  • MethodTooLong: MobilePushBridge.command android/app/src/main/kotlin/com/hermesagent/hermes_android/MobilePushBridge.kt:151 — MethodTooLong — command runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× 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.
  • MethodTooLong: _ChatScreenState.initState lib/core/screens/chat_screen.dart:930 — MethodTooLong — initState runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× 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.
  • MethodTooLong: WorkspaceSessionsScreenState._buildSessionRow lib/core/screens/workspace_sessions_screen.dart:1642 — MethodTooLong — _buildSessionRow runs 134 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 34 over it, 1.34× 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.
  • MethodTooLong: _ChatScreenState._sendDesktopGatewayMessage lib/core/screens/chat_screen.dart:5080 — MethodTooLong — _sendDesktopGatewayMessage runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× 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.
  • MethodTooLong: MobilePushService._refresh lib/core/services/mobile_push_service.dart:469 — MethodTooLong — _refresh runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.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.
  • MethodTooLong: _AddDialogState._validateAndSaveOwned lib/main.dart:2839 — MethodTooLong — _validateAndSaveOwned runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _ChatModelPickerSheetState.build lib/core/screens/chat_screen.dart:212 — MethodTooLong — build runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: HermesAppState._runNotificationNavigation lib/main.dart:1020 — MethodTooLong — _runNotificationNavigation runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: _ChatScreenState._buildBody lib/core/screens/chat_screen.dart:8063 — MethodTooLong — _buildBody runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× 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.
  • MethodTooLong: _SettingsScreenState._buildBody lib/core/screens/settings_screen.dart:60 — MethodTooLong — _buildBody runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× 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.
  • + 12 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×35
  • Hotspot: lib/core/screens/chat_screen.dart lib/core/screens/chat_screen.dart:7111 — lib/core/screens/chat_screen.dart changed 144 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 83 in _ChatScreenState._buildInputBar at line 7111. 99 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/screens/chat_screen.dart`: 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: lib/core/services/normal_gateway_application_session.dart lib/core/services/normal_gateway_application_session.dart:1851 — lib/core/services/normal_gateway_application_session.dart changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 119 in NormalGatewayChatOwner._event at line 1851. 34 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/services/normal_gateway_application_session.dart`: 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: lib/main.dart lib/main.dart:1020 — lib/main.dart changed 67 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in HermesAppState._runNotificationNavigation at line 1020. 45 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/main.dart`: 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: lib/core/services/connection_manager.dart lib/core/services/connection_manager.dart:2136 — lib/core/services/connection_manager.dart changed 72 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in GatewayChatClient.sendMessageStreaming at line 2136. 46 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/services/connection_manager.dart`: 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: lib/core/screens/session_list_screen.dart lib/core/screens/session_list_screen.dart:1515 — lib/core/screens/session_list_screen.dart changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 71 in _SessionListScreenState._buildBody at line 1515. 18 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/screens/session_list_screen.dart`: 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: lib/core/screens/workspace_screen.dart lib/core/screens/workspace_screen.dart:1559 — lib/core/screens/workspace_screen.dart changed 83 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in _WorkspaceScreenState._loadWorkspaceSessionsData at line 1559. 31 of those changes were fix/bug commits, and the other 52 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/screens/workspace_screen.dart`: 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: lib/core/screens/workspace_sessions_screen.dart lib/core/screens/workspace_sessions_screen.dart:1403 — lib/core/screens/workspace_sessions_screen.dart changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in WorkspaceSessionsScreenState._buildLoaded at line 1403. 19 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/screens/workspace_sessions_screen.dart`: 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: lib/core/services/desktop_gateway_client.dart lib/core/services/desktop_gateway_client.dart:936 — lib/core/services/desktop_gateway_client.dart changed 43 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in DesktopGatewayClient._handleServerRequest at line 936. 32 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/services/desktop_gateway_client.dart`: 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: lib/core/services/mobile_push_service.dart lib/core/services/mobile_push_service.dart:469 — lib/core/services/mobile_push_service.dart changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in MobilePushService._refresh at line 469. 10 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/services/mobile_push_service.dart`: 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: lib/core/services/ws_client.dart lib/core/services/ws_client.dart:586 — lib/core/services/ws_client.dart changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in WsClient._handleMessage at line 586. 19 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/services/ws_client.dart`: 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: lib/core/services/gateway_turn_coordinator.dart lib/core/services/gateway_turn_coordinator.dart:609 — lib/core/services/gateway_turn_coordinator.dart changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in GatewayTurnCoordinator.submit at line 609. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/services/gateway_turn_coordinator.dart`: 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: lib/core/services/delegated_task_history.dart lib/core/services/delegated_task_history.dart:106 — lib/core/services/delegated_task_history.dart changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in DashboardTaskHistory.fetch at line 106. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/services/delegated_task_history.dart`: 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: lib/core/services/projects_repository.dart lib/core/services/projects_repository.dart:444 — lib/core/services/projects_repository.dart changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in ProjectsRepository._create at line 444. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/services/projects_repository.dart`: 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: lib/core/screens/cron_screen.dart lib/core/screens/cron_screen.dart:412 — lib/core/screens/cron_screen.dart changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in _CronScreenState._showEditJobDialog at line 412. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/screens/cron_screen.dart`: 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: android/app/src/main/kotlin/com/hermesagent/hermes_android/MobilePushBridge.kt android/app/src/main/kotlin/com/hermesagent/hermes_android/MobilePushBridge.kt:151 — android/app/src/main/kotlin/com/hermesagent/hermes_android/MobilePushBridge.kt changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in MobilePushBridge.command at line 151. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- android/app/src/main/kotlin/com/hermesagent/hermes_android/MobilePushBridge.kt`: 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: lib/core/widgets/mobile_push_settings.dart lib/core/widgets/mobile_push_settings.dart:140 — lib/core/widgets/mobile_push_settings.dart changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in _MobilePushSettingsState.build at line 140. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/widgets/mobile_push_settings.dart`: 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: lib/nextgen/ui/chat_view.dart lib/nextgen/ui/chat_view.dart:768 — lib/nextgen/ui/chat_view.dart changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in _NgChatViewState._composer at line 768. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/nextgen/ui/chat_view.dart`: 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: lib/core/models/background_report.dart lib/core/models/background_report.dart:32 — lib/core/models/background_report.dart changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in BackgroundReport.fromMessage at line 32. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/models/background_report.dart`: 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: lib/core/widgets/delegated_task_timeline.dart lib/core/widgets/delegated_task_timeline.dart:97 — lib/core/widgets/delegated_task_timeline.dart changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in _DelegatedTaskTimelineState.build at line 97. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/widgets/delegated_task_timeline.dart`: 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: lib/core/services/config_backup_service.dart lib/core/services/config_backup_service.dart:147 — lib/core/services/config_backup_service.dart changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in ConfigBackupService.import at line 147. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/services/config_backup_service.dart`: 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: lib/core/widgets/gateway_insight_card.dart lib/core/widgets/gateway_insight_card.dart:149 — lib/core/widgets/gateway_insight_card.dart changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in GatewaySubagentCard.build at line 149. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/widgets/gateway_insight_card.dart`: 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: lib/core/services/client_certificate_service.dart lib/core/services/client_certificate_service.dart:223 — lib/core/services/client_certificate_service.dart changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in ClientCertificateService.importIdentityDocument at line 223. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/services/client_certificate_service.dart`: 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: lib/nextgen/ui/model_sheet.dart lib/nextgen/ui/model_sheet.dart:193 — lib/nextgen/ui/model_sheet.dart changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in _ModelSheetState.build at line 193. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/nextgen/ui/model_sheet.dart`: 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: lib/nextgen/ui/settings_page.dart lib/nextgen/ui/settings_page.dart:75 — lib/nextgen/ui/settings_page.dart changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in _NgSettingsPageState.build at line 75. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/nextgen/ui/settings_page.dart`: 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: lib/nextgen/ui/sessions_sidebar.dart lib/nextgen/ui/sessions_sidebar.dart:442 — lib/nextgen/ui/sessions_sidebar.dart changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in _NgSessionsSidebarState.build at line 442. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/nextgen/ui/sessions_sidebar.dart`: 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.
  • + 10 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×31
  • Swallowed exception (caught, then discarded) server/mobile-push/mobile_push/service.py:101 — `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) lib/main.dart:651 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/main.dart:2725 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/main.dart:2737 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/nextgen/ui/sessions_sidebar.dart:238 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/core/utils/home_turn_signals.dart:146 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/core/services/ai_search_query_rewriter.dart:116 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/core/services/app_update_service.dart:224 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/core/services/app_update_service.dart:420 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/core/services/composer_draft_store.dart:348 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/core/services/config_backup_io.dart:34 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/core/services/connection_manager.dart:467 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/core/services/connection_manager.dart:477 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/core/services/connection_manager.dart:873 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/core/services/connection_manager.dart:882 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/core/services/connection_manager.dart:2042 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/core/services/dashboard_api_client.dart:441 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/core/services/gateway_turn_journal.dart:1025 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/core/services/hands_free_speech.dart:54 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/core/services/hands_free_speech.dart:116 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/core/services/mobile_push_service.dart:157 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/core/services/project_folder_provisioner.dart:264 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/core/services/quick_chat_store.dart:137 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/core/services/turn_notification_service.dart:909 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) lib/core/screens/chat_screen.dart:2252 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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.
  • + 6 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×25
  • FileTooLong: screens/chat_screen.dart lib/core/screens/chat_screen.dart — FileTooLong — 6532 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: _ChatScreenState (713-8358). The bar is 500 significant lines; this is 6032 over it, 13.06× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: lib/main.dart lib/main.dart — FileTooLong — 2551 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2051 over it, 5.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: services/connection_manager.dart lib/core/services/connection_manager.dart — FileTooLong — 2494 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1994 over it, 4.99× 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/normal_gateway_application_session.dart lib/core/services/normal_gateway_application_session.dart — FileTooLong — 2273 significant lines (blank, comment-only and punctuation-only lines excluded), about 71% of them inside a single declaration: NormalGatewayChatOwner (730-2887). The bar is 500 significant lines; this is 1773 over it, 4.55× 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/gateway_turn_coordinator.dart lib/core/services/gateway_turn_coordinator.dart — FileTooLong — 1473 significant lines (blank, comment-only and punctuation-only lines excluded), about 71% of them inside a single declaration: GatewayTurnCoordinator (497-1931). The bar is 500 significant lines; this is 973 over it, 2.95× 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: screens/session_list_screen.dart lib/core/screens/session_list_screen.dart — FileTooLong — 1425 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: _SessionListScreenState (79-2017). The bar is 500 significant lines; this is 925 over it, 2.85× 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: screens/workspace_screen.dart lib/core/screens/workspace_screen.dart — FileTooLong — 1416 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: _WorkspaceScreenState (270-2178). The bar is 500 significant lines; this is 916 over it, 2.83× 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: screens/workspace_sessions_screen.dart lib/core/screens/workspace_sessions_screen.dart — FileTooLong — 1333 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: WorkspaceSessionsScreenState (494-1861). The bar is 500 significant lines; this is 833 over it, 2.67× 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/ws_client.dart lib/core/services/ws_client.dart — FileTooLong — 1122 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: WsClient (251-1656). The bar is 500 significant lines; this is 622 over it, 2.24× 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/desktop_gateway_client.dart lib/core/services/desktop_gateway_client.dart — FileTooLong — 1003 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: DesktopGatewayClient (34-1447). The bar is 500 significant lines; this is 503 over it, 2.01× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: services/projects_repository.dart lib/core/services/projects_repository.dart — FileTooLong — 828 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: ProjectsRepository (224-1340). The bar is 500 significant lines; this is 328 over it, 1.66× 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/attachment_document_service.dart lib/core/services/attachment_document_service.dart — FileTooLong — 808 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 308 over it, 1.62× 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/gateway_turn_journal.dart lib/core/services/gateway_turn_journal.dart — FileTooLong — 753 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 253 over it, 1.51× 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/turn_notification_service.dart lib/core/services/turn_notification_service.dart — FileTooLong — 706 significant lines (blank, comment-only and punctuation-only lines excluded), about 61% of them inside a single declaration: TurnNotificationService (275-943). The bar is 500 significant lines; this is 206 over it, 1.41× 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/hermes_sign_in.dart lib/core/services/hermes_sign_in.dart — FileTooLong — 692 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 192 over it, 1.38× 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: models/gateway_turn_contract.dart lib/core/models/gateway_turn_contract.dart — FileTooLong — 687 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 187 over it, 1.37× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: widgets/project_detail_screen.dart lib/core/widgets/project_detail_screen.dart — FileTooLong — 683 significant lines (blank, comment-only and punctuation-only lines excluded), about 78% of them inside a single declaration: _ProjectDetailScreenState (94-871). The bar is 500 significant lines; this is 183 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: screens/settings_screen.dart lib/core/screens/settings_screen.dart — FileTooLong — 639 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 139 over it, 1.28× 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: screens/cron_screen.dart lib/core/screens/cron_screen.dart — FileTooLong — 619 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: _CronScreenState (44-886). The bar is 500 significant lines; this is 119 over it, 1.24× 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/mobile_push_service.dart lib/core/services/mobile_push_service.dart — FileTooLong — 609 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: MobilePushService (39-816). The bar is 500 significant lines; this is 109 over it, 1.22× 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: theme/hermes_theme.dart lib/core/theme/hermes_theme.dart — FileTooLong — 564 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 64 over it, 1.13× 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: widgets/projects_pane.dart lib/core/widgets/projects_pane.dart — FileTooLong — 561 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 61 over it, 1.12× 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: controllers/hands_free_conversation_controller.dart lib/core/controllers/hands_free_conversation_controller.dart — FileTooLong — 551 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: HandsFreeConversationController (119-704). The bar is 500 significant lines; this is 51 over it, 1.10× 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/gateway_turn_application_controller.dart lib/core/services/gateway_turn_application_controller.dart — FileTooLong — 504 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4 over it, 1.01× 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/delegated_task_history.dart lib/core/services/delegated_task_history.dart — FileTooLong — 502 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2 over it, 1.00× 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.
D3 · God Classes · ClassTooLong · ×23
  • ClassTooLong: _ChatScreenState lib/core/screens/chat_screen.dart:713 — ClassTooLong — 5609 significant lines (blank, comment-only and punctuation-only lines excluded), 208 methods. The bar is 400 significant lines; this is 5209 over it, 14.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NormalGatewayChatOwner lib/core/services/normal_gateway_application_session.dart:730 — ClassTooLong — 1621 significant lines (blank, comment-only and punctuation-only lines excluded), 67 methods. The bar is 400 significant lines; this is 1221 over it, 4.05× 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: _SessionListScreenState lib/core/screens/session_list_screen.dart:79 — ClassTooLong — 1372 significant lines (blank, comment-only and punctuation-only lines excluded), 55 methods. The bar is 400 significant lines; this is 972 over it, 3.43× 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: _WorkspaceScreenState lib/core/screens/workspace_screen.dart:270 — ClassTooLong — 1318 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods. The bar is 400 significant lines; this is 918 over it, 3.30× 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: GatewayTurnCoordinator lib/core/services/gateway_turn_coordinator.dart:496 — ClassTooLong — 1053 significant lines (blank, comment-only and punctuation-only lines excluded), 54 methods. The bar is 400 significant lines; this is 653 over it, 2.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: WorkspaceSessionsScreenState lib/core/screens/workspace_sessions_screen.dart:494 — ClassTooLong — 980 significant lines (blank, comment-only and punctuation-only lines excluded), 44 methods. The bar is 400 significant lines; this is 580 over it, 2.45× 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: DesktopGatewayClient lib/core/services/desktop_gateway_client.dart:29 — ClassTooLong — 953 significant lines (blank, comment-only and punctuation-only lines excluded), 69 methods. The bar is 400 significant lines; this is 553 over it, 2.38× 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: WsClient lib/core/services/ws_client.dart:250 — ClassTooLong — 945 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 400 significant lines; this is 545 over it, 2.36× 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: DashboardClient lib/core/services/connection_manager.dart:2496 — ClassTooLong — 843 significant lines (blank, comment-only and punctuation-only lines excluded), 61 methods. The bar is 400 significant lines; this is 443 over it, 2.11× 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: _AddDialogState lib/main.dart:2383 — ClassTooLong — 749 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 349 over it, 1.87× 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: ProjectsRepository lib/core/services/projects_repository.dart:223 — ClassTooLong — 716 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 316 over it, 1.79× 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: ConnectionManager lib/core/services/connection_manager.dart:176 — ClassTooLong — 708 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 308 over it, 1.77× 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: HomeScreenState lib/main.dart:1394 — ClassTooLong — 702 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 302 over it, 1.76× 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: HermesAppState lib/main.dart:345 — ClassTooLong — 701 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 301 over it, 1.75× 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: _CronScreenState lib/core/screens/cron_screen.dart:44 — ClassTooLong — 595 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 195 over it, 1.49× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: MobilePushService lib/core/services/mobile_push_service.dart:36 — ClassTooLong — 585 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 185 over it, 1.46× 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: _ProjectDetailScreenState lib/core/widgets/project_detail_screen.dart:94 — ClassTooLong — 536 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 136 over it, 1.34× 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: MessageBubble lib/core/screens/chat_screen.dart:8360 — ClassTooLong — 504 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 104 over it, 1.26× 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: HandsFreeConversationController lib/core/controllers/hands_free_conversation_controller.dart:117 — ClassTooLong — 464 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 64 over it, 1.16× 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: ApiClient lib/core/services/connection_manager.dart:1262 — ClassTooLong — 438 significant lines (blank, comment-only and punctuation-only lines excluded), 29 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: TurnNotificationService lib/core/services/turn_notification_service.dart:275 — ClassTooLong — 433 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 33 over it, 1.08× 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: LegacyBackgroundMessage lib/core/models/legacy_background_message.dart:1 — ClassTooLong — 423 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 23 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.
  • ClassTooLong: NormalGatewayApplicationSession lib/core/services/normal_gateway_application_session.dart:152 — ClassTooLong — 402 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 2 over it, 1.01× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D15 · Churn × Complexity Hotspots · Repeated repair · ×20
  • Repeated repair: lib/core/services/gateway_turn_application_controller.dart lib/core/services/gateway_turn_application_controller.dart:397 — lib/core/services/gateway_turn_application_controller.dart changed 17 times in last 90 days and 14 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is GatewayTurnApplicationController.close at line 397), 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(chat): keep Stop and Send available during active responses”; “fix: close remaining mTLS RC credential and transport gaps”; “fix: allow retained recovery owners to detach after close”; “fix: fence notification approvals and retain received outcomes”. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/services/gateway_turn_application_controller.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/core/utils/chat_display_items.dart lib/core/utils/chat_display_items.dart:31 — lib/core/utils/chat_display_items.dart changed 21 times in last 90 days and 13 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 1 (its worst body is ChatDisplaySection.withReceivedOutcomes at line 31), 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(chat): align slash commands with the gateway wire contract”; “fix: secure and ground Nous Portal in gateway contracts”; “fix(chat): retain timestamps on completed earlier previews”; “fix(chat): show provenance-aware message timestamps (#198)”. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/utils/chat_display_items.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/core/services/turn_notification_service.dart lib/core/services/turn_notification_service.dart:409 — lib/core/services/turn_notification_service.dart changed 17 times in last 90 days and 12 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is TurnNotificationService._cleanOrphanedOngoingChats at line 409), 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(android): replace exclamation notification icon with Ares hoplite silhouette”; “NextGen: Kyllene-style notifications and catch-up; fix Insights timeout”; “fix: fence notification approvals and retain received outcomes”; “fix(android): bind background policy and permission to confirmed observations”. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/services/turn_notification_service.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/core/services/composer_draft_store.dart lib/core/services/composer_draft_store.dart:142 — lib/core/services/composer_draft_store.dart changed 9 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is ComposerDraftStore.bind at line 142), 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(chat): preserve paste recovery across submission handoff”; “fix: preserve draft authority through hydration outages”; “fix: refresh durable draft authority after preferences reloads”; “Fix late draft alias chronology and gateway owner handoffs”. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/services/composer_draft_store.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/core/models/chat_timeline.dart lib/core/models/chat_timeline.dart:344 — lib/core/models/chat_timeline.dart changed 7 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is ChatTimeline.textSnapshot at line 344), 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(chat): preserve live canonical suffix and reasoning pin identity”; “fix: preserve settled alias output and history read authority”; “fix: reconcile late identity alias handoffs on Android v2.1.31”; “fix: retain canonical chat view state across routes”. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/models/chat_timeline.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/core/models/connection.dart lib/core/models/connection.dart:176 — lib/core/models/connection.dart changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is SavedConnection.toMap at line 176), 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: use normalized dashboard origin for all feature clients (#233)”; “fix: bound LAN discovery and preserve verified endpoint identity”; “fix: honour the Port field when it holds 8642 on an HTTPS host”; “fix: send the Hermes profile in every JSON-RPC payload, not the socket URL”. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/models/connection.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/core/services/project_folder_provisioner.dart lib/core/services/project_folder_provisioner.dart:99 — lib/core/services/project_folder_provisioner.dart changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is DashboardFolderProvisioner.provision at line 99), 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(projects): apply root edits immediately per saved connection (#232)”; “fix(review): close final recovery and cache races”; “fix(review): address PR #106 third change-request set (3 blockers)”; “fix(review): address PR #106 second change-request set (4 blockers)”. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/services/project_folder_provisioner.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/core/services/mobile_push_api.dart lib/core/services/mobile_push_api.dart:56 — lib/core/services/mobile_push_api.dart changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is MobilePushApi.capabilities at line 56), 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(push): carry reviewed registration and account-mutation fences”; “fix: isolate mobile push requests by selected vetted profile”; “fix(android): fence precommit push registrations and preserve scope blanks”; “fix(android): recover durable push registration handshakes”. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/services/mobile_push_api.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: tools/capture_internal_message_fixture.py tools/capture_internal_message_fixture.py:35 — tools/capture_internal_message_fixture.py changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is capture_internal_message_fixture.guard at line 35), 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: deliver scoped third-party source and build notices”; “fix(chat): preserve merged human rows before legacy matching”; “fix(chat): validate legacy fields and scan literal result delimiters”; “fix(chat): preserve merged human turns and isolate report storage”. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- tools/capture_internal_message_fixture.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: server/mobile-push/mobile_push/api.py server/mobile-push/mobile_push/api.py:62 — server/mobile-push/mobile_push/api.py changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is api.principal at line 62), 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(push): carry reviewed registration and account-mutation fences”; “fix: isolate mobile push requests by selected vetted profile”; “fix(android): fence precommit push registrations and preserve scope blanks”; “fix: bind mobile push to request profiles and recover handshake acknowledgements”. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- server/mobile-push/mobile_push/api.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/core/models/gateway_insight.dart lib/core/models/gateway_insight.dart:274 — lib/core/models/gateway_insight.dart changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is GatewaySubagentActivity.fromGatewayEvent at line 274), 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: preserve settled alias output and history read authority”; “fix: bridge application-owned task inspection and validated root push routing”; “fix: verify delegated compression references and expose partial history”; “fix: harden delegated task history protocol and localise overlay”. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/models/gateway_insight.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/publish_github_release.py scripts/publish_github_release.py:60 — scripts/publish_github_release.py changed 4 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 10 (its worst body is publish_github_release.remote_tag_commit at line 60), 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: gate release publication on all APK identities and assets”; “fix: publish exact source and relink materials with RC APKs”; “fix: bind release publication to exact remote tag commit”. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- scripts/publish_github_release.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/core/services/config_backup.dart lib/core/services/config_backup.dart:341 — lib/core/services/config_backup.dart changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is ConfigBackupCodec.decrypt at line 341), 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: close remaining mTLS RC credential and transport gaps”; “fix(mtls): secure key handling, search transport, and backup round-trip”; “fix: send the Hermes profile on the Desktop Gateway socket”. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/services/config_backup.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/core/widgets/gateway_approval_dialog.dart lib/core/widgets/gateway_approval_dialog.dart:28 — lib/core/widgets/gateway_approval_dialog.dart changed 4 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 _GatewayApprovalDialogState._respond at line 28), 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: block approval Back dismissal during submission”; “fix(approvals): keep dismissal on the route that opened the dialog”; “fix(i18n): localize remaining reviewer-flagged strings”. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/widgets/gateway_approval_dialog.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/core/screens/nous_portal_screen.dart lib/core/screens/nous_portal_screen.dart:158 — lib/core/screens/nous_portal_screen.dart changed 4 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 11 (its worst body is _NousPortalScreenState.build at line 158), 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: use normalized dashboard origin for all feature clients (#233)”; “fix: recover Portal from synchronous TLS client failures”; “fix: secure and ground Nous Portal in gateway contracts”. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/screens/nous_portal_screen.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/core/services/chat_history_window.dart lib/core/services/chat_history_window.dart:36 — lib/core/services/chat_history_window.dart changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is ChatHistoryWindow.fetchRecent at line 36), 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(chat): preserve paging while cold history is pending”; “fix(chat): reconcile live replies using committed message receipts”; “fix(chat): cover longer tool-heavy turns on first load”. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/services/chat_history_window.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/core/models/provider_oauth.dart lib/core/models/provider_oauth.dart:81 — lib/core/models/provider_oauth.dart changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is OAuthDeviceSession.fromJson at line 81), 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: stop treating historical OAuth approval as current account identity”; “fix(oauth): require scoped account readback and reject approval redirects”; “fix: localise provider OAuth across shipped languages”. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/models/provider_oauth.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: scripts/verify_release_apks.py scripts/verify_release_apks.py:222 — scripts/verify_release_apks.py changed 3 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 11 (its worst body is verify_release_apks.verify_signer at line 222), 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: deliver scoped third-party source and build notices”; “fix: accept observed apksigner V2 records fail closed”; “fix: reject non-RFC JSON constants in APK preflight”. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- scripts/verify_release_apks.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: lib/core/services/chat_presentation_state.dart lib/core/services/chat_presentation_state.dart:30 — lib/core/services/chat_presentation_state.dart changed 3 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 14 (its worst body is ChatPresentationRegistry.bind at line 30), 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: preserve draft authority through hydration outages”; “Fix late draft alias chronology and gateway owner handoffs”; “fix: reconcile late identity alias handoffs on Android v2.1.31”. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- lib/core/services/chat_presentation_state.dart`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: server/mobile-push/dashboard/plugin_api.py server/mobile-push/dashboard/plugin_api.py:26 — server/mobile-push/dashboard/plugin_api.py changed 3 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 2 (its worst body is plugin_api.request_profile at line 26), 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(push): carry reviewed registration and account-mutation fences”; “fix: isolate mobile push requests by selected vetted profile”; “fix: bind mobile push to request profiles and recover handshake acknowledgements”. 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-20..2026-11-18, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-20 02:26:53 +11:00' --until='2026-11-18 02:26:53 +11:00' --full-history --no-merges -- server/mobile-push/dashboard/plugin_api.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.
D3 · God Classes · TooManyMethods · ×15
  • TooManyMethods: _ChatScreenState lib/core/screens/chat_screen.dart:713 — TooManyMethods — 208 methods. The bar is 30 methods; this is 178 over it, 6.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: DesktopGatewayClient lib/core/services/desktop_gateway_client.dart:29 — TooManyMethods — 69 methods. The bar is 30 methods; this is 39 over it, 2.30× 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: NormalGatewayChatOwner lib/core/services/normal_gateway_application_session.dart:730 — TooManyMethods — 67 methods. The bar is 30 methods; this is 37 over it, 2.23× 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: DashboardClient lib/core/services/connection_manager.dart:2496 — TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: _WorkspaceScreenState lib/core/screens/workspace_screen.dart:270 — TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× 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: _SessionListScreenState lib/core/screens/session_list_screen.dart:79 — TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× 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: GatewayTurnCoordinator lib/core/services/gateway_turn_coordinator.dart:496 — TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× 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: WsClient lib/core/services/ws_client.dart:250 — TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.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.
  • TooManyMethods: WorkspaceSessionsScreenState lib/core/screens/workspace_sessions_screen.dart:494 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× 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: ProjectsRepository lib/core/services/projects_repository.dart:223 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× 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: MobilePushService lib/core/services/mobile_push_service.dart:36 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× 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: HermesAppState lib/main.dart:345 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× 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: ConnectionManager lib/core/services/connection_manager.dart:176 — TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× 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: TurnNotificationService lib/core/services/turn_notification_service.dart:275 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× 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: HandsFreeConversationController lib/core/controllers/hands_free_conversation_controller.dart:117 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 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.
X3 · Exception handling · Swallowed exception (empty catch) · ×9
  • Swallowed exception (empty catch) lib/nextgen/data/chat_controller.dart:1828 — 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) lib/nextgen/data/chat_controller.dart:1835 — 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) lib/core/services/connection_manager.dart:3083 — 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) lib/core/services/projects_repository.dart:505 — 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) lib/core/services/shared_attachment_preparer.dart:36 — 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) lib/core/screens/settings_screen.dart:571 — 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) lib/core/screens/settings_screen.dart:585 — 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) lib/core/screens/workspace_screen.dart:703 — 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) lib/core/screens/workspace_screen.dart:826 — 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.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×7
  • Edited copy of a member (17 corresponding lines) lib/core/services/background_work_prefs.dart:72 — lib/core/services/background_work_prefs.dart:72-89 | lib/core/services/turn_notification_service.dart:380-396 — These two members are one piece of code written twice and then edited apart: 17 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 (17 corresponding lines) lib/core/screens/provider_usage_screen.dart:79 — lib/core/screens/provider_usage_screen.dart:79-95 | lib/core/screens/workspace_screen.dart:1168-1184 — These two members are one piece of code written twice and then edited apart: 17 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 (17 corresponding lines) lib/core/screens/workspace_screen.dart:499 — lib/core/screens/workspace_screen.dart:499-521 | lib/core/screens/workspace_screen.dart:523-539 — These two members are one piece of code written twice and then edited apart: 17 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 (17 corresponding lines) lib/core/screens/provider_usage_screen.dart:129 — lib/core/screens/provider_usage_screen.dart:129-145 | lib/core/screens/provider_usage_screen.dart:147-165 — These two members are one piece of code written twice and then edited apart: 17 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 (17 corresponding lines) lib/main.dart:554 — lib/main.dart:554-570 | lib/main.dart:1399-1417 — These two members are one piece of code written twice and then edited apart: 17 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 (17 corresponding lines) lib/core/models/gateway_insight.dart:16 — lib/core/models/gateway_insight.dart:16-32 | lib/core/models/gateway_insight.dart:106-124 — These two members are one piece of code written twice and then edited apart: 17 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 (17 corresponding lines) lib/core/widgets/gateway_activity_card.dart:89 — lib/core/widgets/gateway_activity_card.dart:89-105 | lib/core/widgets/gateway_insight_card.dart:40-57 — These two members are one piece of code written twice and then edited apart: 17 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×7
  • Low cohesion: _ChatScreenState (LCOM4 9) lib/core/screens/chat_screen.dart:713 — _ChatScreenState's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ConfigBackupIo (LCOM4 5) lib/core/services/config_backup_io.dart:13 — ConfigBackupIo's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: HermesAppState (LCOM4 4) lib/main.dart:345 — HermesAppState's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: HomeScreenState (LCOM4 4) lib/main.dart:1394 — HomeScreenState's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: _SessionListScreenState (LCOM4 4) lib/core/screens/session_list_screen.dart:79 — _SessionListScreenState's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: _WorkspaceScreenState (LCOM4 4) lib/core/screens/workspace_screen.dart:270 — _WorkspaceScreenState's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: _DelegatedTaskTimelineState (LCOM4 4) lib/core/widgets/delegated_task_timeline.dart:49 — _DelegatedTaskTimelineState'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.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×6
  • Edited copy of a member (12 corresponding lines) lib/core/screens/chat_screen.dart:2946 — lib/core/screens/chat_screen.dart:2946-2957 | lib/core/screens/chat_screen.dart:2959-2977 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) lib/core/models/hermes_project.dart:22 — lib/core/models/hermes_project.dart:22-33 | lib/core/models/project_sessions_tree.dart:52-65 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) lib/core/widgets/projects_pane.dart:176 — lib/core/widgets/projects_pane.dart:176-189 | lib/core/widgets/projects_pane.dart:222-233 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) lib/core/widgets/auxiliary_models.dart:37 — lib/core/widgets/auxiliary_models.dart:37-48 | lib/core/widgets/fallback_models.dart:47-61 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) lib/core/services/dashboard_api_client.dart:331 — lib/core/services/dashboard_api_client.dart:331-346 | lib/core/services/dashboard_api_client.dart:348-359 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) lib/core/services/android_launch_intent_service.dart:16 — lib/core/services/android_launch_intent_service.dart:16-27 | lib/core/services/android_share_intent_service.dart:81-93 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×5
  • Edited copy of a member (15 corresponding lines) lib/core/widgets/theme_palette_picker.dart:66 — lib/core/widgets/theme_palette_picker.dart:66-81 | lib/core/widgets/theme_palette_picker.dart:201-215 — 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) lib/core/services/desktop_gateway_client.dart:1210 — lib/core/services/desktop_gateway_client.dart:1210-1224 | lib/core/services/desktop_gateway_client.dart:1226-1240 — 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) lib/core/screens/chat_screen.dart:7658 — lib/core/screens/chat_screen.dart:7658-7672 | lib/core/widgets/attachment_draft_tile.dart:128-145 — 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) lib/core/services/gateway_turn_application_controller.dart:536 — lib/core/services/gateway_turn_application_controller.dart:536-553 | lib/core/services/gateway_turn_application_controller.dart:555-569 — 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) lib/core/screens/model_management_screen.dart:267 — lib/core/screens/model_management_screen.dart:267-284 | lib/core/screens/skills_screen.dart:56-70 — 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 · Duplicated block (11 lines × 2) · ×5
  • Duplicated block (11 lines × 2) lib/core/screens/session_list_screen.dart:820 — lib/core/screens/session_list_screen.dart:820-830 | lib/core/screens/workspace_sessions_screen.dart:1310-1322 — 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 `lib/core/screens/session_list_screen.dart:820` 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 (11 lines × 2) lib/core/services/normal_gateway_pending_store.dart:57 — lib/core/services/normal_gateway_pending_store.dart:57-67 | lib/core/services/operational_activity_store.dart:72-82 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) lib/core/widgets/config_backup_card.dart:335 — lib/core/widgets/config_backup_card.dart:335-345 | lib/core/widgets/config_backup_card.dart:377-387 — 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 `lib/core/widgets/config_backup_card.dart:335` 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 (11 lines × 2) lib/core/widgets/gateway_approval_dialog.dart:145 — lib/core/widgets/gateway_approval_dialog.dart:145-155 | lib/core/widgets/gateway_sensitive_prompt_dialog.dart:94-104 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) lib/main.dart:1813 — lib/main.dart:1813-1823 | lib/main.dart:2023-2033 — 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 `lib/main.dart:1813` 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) · ×4
  • Duplicated block (10 lines × 2) lib/core/models/project_sessions_tree.dart:162 — lib/core/models/project_sessions_tree.dart:162-171 | lib/core/models/projects_tree_overview.dart:124-133 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/core/models/projects_tree_overview.dart:134` calls `_scopedIds` and `lib/core/models/project_sessions_tree.dart:172` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) lib/core/screens/chat_screen.dart:8086 — lib/core/screens/chat_screen.dart:8086-8095 | lib/core/screens/cron_screen.dart:658-667 — 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 `lib/core/screens/chat_screen.dart:8086` 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) lib/core/screens/cron_screen.dart:647 — lib/core/screens/cron_screen.dart:647-656 | lib/core/screens/skills_screen.dart:75-84 — 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 `lib/core/screens/cron_screen.dart:647` 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 (10 lines × 2) lib/core/services/connection_manager.dart:3090 — lib/core/services/connection_manager.dart:3090-3099 | lib/core/services/connection_manager.dart:3315-3324 — 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 `lib/core/services/connection_manager.dart:3090` 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 · Edited copy of a member (9 corresponding lines) · ×3
  • Edited copy of a member (9 corresponding lines) lib/core/services/client_certificate_service.dart:652 — lib/core/services/client_certificate_service.dart:652-660 | lib/core/services/client_certificate_service.dart:662-670 — 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.
  • Edited copy of a member (9 corresponding lines) lib/core/models/client_certificate.dart:64 — lib/core/models/client_certificate.dart:64-77 | lib/core/services/config_backup.dart:48-56 — 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.
  • Edited copy of a member (9 corresponding lines) scripts/verify_play_bundle.py:124 — scripts/verify_play_bundle.py:124-133 | scripts/verify_release_apks.py:343-351 — 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 · Duplicated block (13 lines × 2) · ×3
  • Duplicated block (13 lines × 2) lib/core/services/chat_assets_client.dart:69 — lib/core/services/chat_assets_client.dart:69-81 | lib/core/services/remote_files_client.dart:129-141 — 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 (13 lines × 2) lib/core/widgets/gateway_clarify_dialog.dart:195 — lib/core/widgets/gateway_clarify_dialog.dart:195-207 | lib/core/widgets/gateway_sensitive_prompt_dialog.dart:91-103 — 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 `lib/core/widgets/gateway_clarify_dialog.dart:195` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) lib/core/widgets/project_detail_screen.dart:281 — lib/core/widgets/project_detail_screen.dart:281-293 | lib/core/widgets/projects_pane.dart:242-254 — 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 `lib/core/widgets/project_detail_screen.dart:281` 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 (8 lines × 2) · ×3
  • Duplicated block (8 lines × 2) lib/core/controllers/voice_recording_controller.dart:77 — lib/core/controllers/voice_recording_controller.dart:77-84 | lib/core/controllers/voice_recording_controller.dart:143-150 — 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 `lib/core/controllers/voice_recording_controller.dart:77` 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 × 2) lib/core/services/connection_manager.dart:749 — lib/core/services/connection_manager.dart:749-756 | lib/core/services/connection_manager.dart:768-775 — 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 `lib/core/services/connection_manager.dart:749` 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 (8 lines × 2) android/app/src/main/kotlin/com/hermesagent/hermes_android/HandsFreeVoiceEngine.kt:123 — android/app/src/main/kotlin/com/hermesagent/hermes_android/HandsFreeVoiceEngine.kt:123-130 | android/app/src/main/kotlin/com/hermesagent/hermes_android/HandsFreeVoiceEngine.kt:135-142 — 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 (6 lines × 2) · ×3
  • Duplicated block (6 lines × 2) lib/core/models/connection.dart:234 — lib/core/models/connection.dart:234-239 | lib/core/services/config_backup.dart:211-216 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) lib/core/screens/model_management_screen.dart:74 — lib/core/screens/model_management_screen.dart:74-79 | lib/core/screens/provider_usage_screen.dart:72-77 — 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 (6 lines × 2) lib/core/services/capability_registry.dart:169 — lib/core/services/capability_registry.dart:169-174 | lib/core/services/projects_gateway_client.dart:298-303 — 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 · Edited copy of a member (25 corresponding lines) · ×2
  • Edited copy of a member (25 corresponding lines) lib/core/models/connection.dart:217 — lib/core/models/connection.dart:217-249 | lib/core/services/config_backup.dart:196-220 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) lib/core/widgets/projects_pane.dart:769 — lib/core/widgets/projects_pane.dart:769-794 | lib/core/widgets/projects_pane.dart:817-841 — 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 (31 corresponding lines) · ×2
  • Edited copy of a member (31 corresponding lines) lib/core/services/attachment_controller.dart:215 — lib/core/services/attachment_controller.dart:215-262 | lib/core/services/attachment_controller.dart:264-294 — 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.
  • Edited copy of a member (31 corresponding lines) lib/core/widgets/hermes_components.dart:223 — lib/core/widgets/hermes_components.dart:223-253 | lib/core/widgets/hermes_components.dart:280-317 — 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 (10 corresponding lines) · ×2
  • Edited copy of a member (10 corresponding lines) lib/core/services/normal_gateway_pending_store.dart:150 — lib/core/services/normal_gateway_pending_store.dart:150-165 | lib/core/services/normal_gateway_pending_store.dart:167-176 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) scripts/attach_path_probe.py:31 — scripts/attach_path_probe.py:31-45 | scripts/legacy_attach_probe.py:22-31 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×2
  • Edited copy of a member (11 corresponding lines) android/app/src/main/kotlin/com/hermesagent/hermes_android/HandsFreeVoiceEngine.kt:122 — android/app/src/main/kotlin/com/hermesagent/hermes_android/HandsFreeVoiceEngine.kt:122-132 | android/app/src/main/kotlin/com/hermesagent/hermes_android/HandsFreeVoiceEngine.kt:134-144 — These two members are one piece of code written twice and then edited apart: 11 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 (11 corresponding lines) lib/core/screens/memory_screen.dart:42 — lib/core/screens/memory_screen.dart:42-54 | lib/core/screens/nous_portal_screen.dart:39-49 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×2
  • Edited copy of a member (19 corresponding lines) lib/core/controllers/voice_recording_controller.dart:92 — lib/core/controllers/voice_recording_controller.dart:92-112 | lib/core/controllers/voice_recording_controller.dart:178-196 — 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.
  • Edited copy of a member (19 corresponding lines) lib/core/services/gateway_turn_application_controller.dart:593 — lib/core/services/gateway_turn_application_controller.dart:593-613 | lib/core/services/gateway_turn_coordinator.dart:364-382 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×2
  • Edited copy of a member (6 corresponding lines) lib/core/models/legacy_background_message.dart:95 — lib/core/models/legacy_background_message.dart:95-103 | lib/core/models/legacy_background_message.dart:205-210 — These two members are one piece of code written twice and then edited apart: 6 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 (6 corresponding lines) lib/core/services/chat_model_override_store.dart:89 — lib/core/services/chat_model_override_store.dart:89-94 | lib/core/services/composer_draft_store.dart:74-79 — These two members are one piece of code written twice and then edited apart: 6 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 (5 corresponding lines) · ×2
  • Edited copy of a member (5 corresponding lines) lib/core/services/projects_repository.dart:916 — lib/core/services/projects_repository.dart:916-923 | lib/core/services/theme_preference.dart:77-81 — These two members are one piece of code written twice and then edited apart: 5 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 (5 corresponding lines) lib/main.dart:86 — lib/main.dart:86-93 | lib/nextgen/ui/capabilities_page.dart:37-41 — These two members are one piece of code written twice and then edited apart: 5 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 (17 lines × 2) · ×2
  • Duplicated block (17 lines × 2) lib/core/screens/chat_screen.dart:5614 — lib/core/screens/chat_screen.dart:5614-5630 | lib/core/services/normal_gateway_application_session.dart:2298-2314 — 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 `lib/core/screens/chat_screen.dart:5614` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) lib/core/widgets/activity_pane.dart:308 — lib/core/widgets/activity_pane.dart:308-324 | lib/core/widgets/home_pane.dart:306-322 — 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 (14 lines × 2) · ×2
  • Duplicated block (14 lines × 2) lib/core/services/gateway_turn_coordinator.dart:870 — lib/core/services/gateway_turn_coordinator.dart:870-883 | lib/core/services/gateway_turn_coordinator.dart:1845-1858 — 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 `lib/core/services/gateway_turn_coordinator.dart:870` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (14 lines × 2) lib/core/widgets/config_backup_card.dart:62 — lib/core/widgets/config_backup_card.dart:62-75 | lib/core/widgets/config_backup_card.dart:178-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. Read the line range as the matched WINDOW rather than a finished unit: at `lib/core/widgets/config_backup_card.dart:62` 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 (11–12 lines × 2) · ×2
  • Duplicated block (11–12 lines × 2) lib/core/screens/provider_oauth_screen.dart:73 — lib/core/screens/provider_oauth_screen.dart:73-84 | lib/core/screens/provider_usage_screen.dart:84-94 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11–12 lines × 2) lib/core/widgets/theme_palette_picker.dart:70 — lib/core/widgets/theme_palette_picker.dart:70-81 | lib/core/widgets/theme_palette_picker.dart:205-215 — 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 `lib/core/widgets/theme_palette_picker.dart:70` 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 (12 lines × 2) · ×2
  • Duplicated block (12 lines × 2) lib/core/services/connection_manager.dart:3280 — lib/core/services/connection_manager.dart:3280-3291 | lib/core/services/connection_manager.dart:3341-3352 — 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 `lib/core/services/connection_manager.dart:3280` 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 × 2) lib/core/services/desktop_gateway_client.dart:1211 — lib/core/services/desktop_gateway_client.dart:1211-1222 | lib/core/services/desktop_gateway_client.dart:1227-1238 — 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 `lib/core/services/desktop_gateway_client.dart:1211` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×2
  • Duplicated block (9 lines × 2) lib/core/services/attachment_draft_service.dart:559 — lib/core/services/attachment_draft_service.dart:559-567 | lib/core/services/attachment_draft_service.dart:570-578 — 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 `lib/core/services/attachment_draft_service.dart:559` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) lib/core/widgets/project_detail_screen.dart:318 — lib/core/widgets/project_detail_screen.dart:318-326 | lib/core/widgets/projects_pane.dart:272-280 — 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 `lib/core/widgets/project_detail_screen.dart:318` 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 (5 lines × 2) · ×2
  • Duplicated block (5 lines × 2) lib/core/services/gateway_turn_coordinator.dart:475 — lib/core/services/gateway_turn_coordinator.dart:475-479 | lib/core/services/gateway_turn_coordinator.dart:1926-1930 — 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) scripts/prepare_voice_inputs.py:31 — scripts/prepare_voice_inputs.py:31-35 | scripts/verify_play_bundle.py:25-29 — 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.
P12 · CI test-gate honesty · Test failure does not fail the CI gate · ×2
  • Test failure does not fail the CI gate REDACTED:96 — `continue-on-error: true` lets the step or job that runs `flutter test --no-pub --reporter=expanded 2>&1 | tee test_output.txt` fail without failing the pipeline — the suite can go red and the change still merges. Remove it from the test step, or quarantine the specific failing tests instead.
  • Test failure does not fail the CI gate REDACTED:103 — `continue-on-error: true` lets the step or job that runs `flutter test --no-pub --dart-define=ARES_PLAY_BUILD=true test_play/play_distribution_test.dart 2>&1 | tee play_test_output.txt` fail without failing the pipeline — the suite can go red and the change still merges. Remove it from the test step, or quarantine the specific failing tests instead.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×2
  • Sync-over-async blocking tools/capture_task_history_fixture.py:38 — `capture` is async and calls subprocess.check_output — a blocking call inside async code stalls the event loop — every other task on it waits for as long as it runs.
  • Sync-over-async blocking lib/core/services/config_backup_io.dart:41 — `deliverExport` is async and calls listSync, deleteSync — a blocking call inside async code stalls the isolate's event loop — every other event, on Flutter the next frame, waits for as long as it runs.
AC3 · Page structure · Page without a main landmark · ×1
  • Page without a main landmark graphify-out/graph.html:7 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D1 · Cyclomatic Complexity · NormalGatewayChatOwner._event (cyclomatic 119) · ×1
  • NormalGatewayChatOwner._event (cyclomatic 119) lib/core/services/normal_gateway_application_session.dart:1851 — NormalGatewayChatOwner._event has cyclomatic complexity 119 (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 · _ChatScreenState._buildInputBar (cyclomatic 83) · ×1
  • _ChatScreenState._buildInputBar (cyclomatic 83) lib/core/screens/chat_screen.dart:7111 — _ChatScreenState._buildInputBar has cyclomatic complexity 83 (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 · _SessionListScreenState._buildBody (cyclomatic 71) · ×1
  • _SessionListScreenState._buildBody (cyclomatic 71) lib/core/screens/session_list_screen.dart:1515 — _SessionListScreenState._buildBody has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _ChatScreenState._applyNormalSnapshot (cyclomatic 66) · ×1
  • _ChatScreenState._applyNormalSnapshot (cyclomatic 66) lib/core/screens/chat_screen.dart:1158 — _ChatScreenState._applyNormalSnapshot has cyclomatic complexity 66 (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 · NormalGatewayChatOwner._settle (cyclomatic 61) · ×1
  • NormalGatewayChatOwner._settle (cyclomatic 61) lib/core/services/normal_gateway_application_session.dart:2505 — NormalGatewayChatOwner._settle 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.
D1 · Cyclomatic Complexity · _ChatScreenState._submitMessage (cyclomatic 59) · ×1
  • _ChatScreenState._submitMessage (cyclomatic 59) lib/core/screens/chat_screen.dart:4781 — _ChatScreenState._submitMessage 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 · MobilePushService._refresh (cyclomatic 59) · ×1
  • MobilePushService._refresh (cyclomatic 59) lib/core/services/mobile_push_service.dart:469 — MobilePushService._refresh 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 · _ChatScreenState._sendMessage (cyclomatic 58) · ×1
  • _ChatScreenState._sendMessage (cyclomatic 58) lib/core/screens/chat_screen.dart:4425 — _ChatScreenState._sendMessage 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 · _OfficePackage._index (cyclomatic 55) · ×1
  • _OfficePackage._index (cyclomatic 55) lib/core/services/attachment_document_service.dart:730 — _OfficePackage._index has cyclomatic complexity 55 (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 · NormalGatewayChatOwner._recover (cyclomatic 55) · ×1
  • NormalGatewayChatOwner._recover (cyclomatic 55) lib/core/services/normal_gateway_application_session.dart:2364 — NormalGatewayChatOwner._recover 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 · HermesAppState._runNotificationNavigation (cyclomatic 53) · ×1
  • HermesAppState._runNotificationNavigation (cyclomatic 53) lib/main.dart:1020 — HermesAppState._runNotificationNavigation has cyclomatic complexity 53 (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 · MobilePushBridge.command (cyclomatic 52) · ×1
  • MobilePushBridge.command (cyclomatic 52) android/app/src/main/kotlin/com/hermesagent/hermes_android/MobilePushBridge.kt:151 — MobilePushBridge.command has cyclomatic complexity 52 (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 · WorkspaceSessionsScreenState._buildLoaded (cyclomatic 51) · ×1
  • WorkspaceSessionsScreenState._buildLoaded (cyclomatic 51) lib/core/screens/workspace_sessions_screen.dart:1403 — WorkspaceSessionsScreenState._buildLoaded has cyclomatic complexity 51 (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 · NormalGatewayChatOwner.submitPrepared (cyclomatic 50) · ×1
  • NormalGatewayChatOwner.submitPrepared (cyclomatic 50) lib/core/services/normal_gateway_application_session.dart:1594 — NormalGatewayChatOwner.submitPrepared has cyclomatic complexity 50 (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 · _ChatScreenState._sendDesktopGatewayMessage (cyclomatic 46) · ×1
  • _ChatScreenState._sendDesktopGatewayMessage (cyclomatic 46) lib/core/screens/chat_screen.dart:5080 — _ChatScreenState._sendDesktopGatewayMessage has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _ChatScreenState._buildBody (cyclomatic 44) · ×1
  • _ChatScreenState._buildBody (cyclomatic 44) lib/core/screens/chat_screen.dart:8063 — _ChatScreenState._buildBody 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 · WorkspaceSessionsScreenState._buildSessionRow (cyclomatic 44) · ×1
  • WorkspaceSessionsScreenState._buildSessionRow (cyclomatic 44) lib/core/screens/workspace_sessions_screen.dart:1642 — WorkspaceSessionsScreenState._buildSessionRow 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 · GatewayChatClient.sendMessageStreaming (cyclomatic 44) · ×1
  • GatewayChatClient.sendMessageStreaming (cyclomatic 44) lib/core/services/connection_manager.dart:2136 — GatewayChatClient.sendMessageStreaming 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 · _ChatScreenState._sendRecoverableGatewayMessage (cyclomatic 42) · ×1
  • _ChatScreenState._sendRecoverableGatewayMessage (cyclomatic 42) lib/core/screens/chat_screen.dart:5242 — _ChatScreenState._sendRecoverableGatewayMessage has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GatewayChatClient._decodeSseFrame (cyclomatic 40) · ×1
  • GatewayChatClient._decodeSseFrame (cyclomatic 40) lib/core/services/connection_manager.dart:2023 — GatewayChatClient._decodeSseFrame has cyclomatic complexity 40 (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 · DashboardTaskHistory.fetch (cyclomatic 40) · ×1
  • DashboardTaskHistory.fetch (cyclomatic 40) lib/core/services/delegated_task_history.dart:106 — DashboardTaskHistory.fetch has cyclomatic complexity 40 (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 · GatewayTurnRecoveryCapability._fromRecoveryPayload (cyclomatic 39) · ×1
  • GatewayTurnRecoveryCapability._fromRecoveryPayload (cyclomatic 39) lib/core/models/gateway_turn_contract.dart:245 — GatewayTurnRecoveryCapability._fromRecoveryPayload has cyclomatic complexity 39 (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 · _MobilePushSettingsState.build (cyclomatic 39) · ×1
  • _MobilePushSettingsState.build (cyclomatic 39) lib/core/widgets/mobile_push_settings.dart:140 — _MobilePushSettingsState.build has cyclomatic complexity 39 (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 · _AddDialogState._validateAndSaveOwned (cyclomatic 36) · ×1
  • _AddDialogState._validateAndSaveOwned (cyclomatic 36) lib/main.dart:2839 — _AddDialogState._validateAndSaveOwned 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 · GatewayTurnReconcilePage.fromWire (cyclomatic 36) · ×1
  • GatewayTurnReconcilePage.fromWire (cyclomatic 36) lib/core/models/gateway_turn_contract.dart:726 — GatewayTurnReconcilePage.fromWire has cyclomatic complexity 36 (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 · GatewayTurnCoordinator.submit (cyclomatic 36) · ×1
  • GatewayTurnCoordinator.submit (cyclomatic 36) lib/core/services/gateway_turn_coordinator.dart:609 — GatewayTurnCoordinator.submit 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 · _ChatScreenState._applyGatewayTurnState (cyclomatic 35) · ×1
  • _ChatScreenState._applyGatewayTurnState (cyclomatic 35) lib/core/screens/chat_screen.dart:3462 — _ChatScreenState._applyGatewayTurnState has cyclomatic complexity 35 (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 · HandsFreeConversationController._event (cyclomatic 34) · ×1
  • HandsFreeConversationController._event (cyclomatic 34) lib/core/controllers/hands_free_conversation_controller.dart:397 — HandsFreeConversationController._event 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 · BackgroundReport.fromMessage (cyclomatic 34) · ×1
  • BackgroundReport.fromMessage (cyclomatic 34) lib/core/models/background_report.dart:32 — BackgroundReport.fromMessage has cyclomatic complexity 34 (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 · ApiClient.respondToRunApproval (cyclomatic 33) · ×1
  • ApiClient.respondToRunApproval (cyclomatic 33) lib/core/services/connection_manager.dart:1738 — ApiClient.respondToRunApproval 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 · GatewayTurnRecoveryState.rehydrate (cyclomatic 33) · ×1
  • GatewayTurnRecoveryState.rehydrate (cyclomatic 33) lib/core/services/gateway_turn_recovery.dart:104 — GatewayTurnRecoveryState.rehydrate has cyclomatic complexity 33 (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 · WsClient.parseGatewayEvent (cyclomatic 33) · ×1
  • WsClient.parseGatewayEvent (cyclomatic 33) lib/core/services/ws_client.dart:769 — WsClient.parseGatewayEvent has cyclomatic complexity 33 (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 · _ChatScreenState._handleDesktopGatewayEvent (cyclomatic 32) · ×1
  • _ChatScreenState._handleDesktopGatewayEvent (cyclomatic 32) lib/core/screens/chat_screen.dart:5451 — _ChatScreenState._handleDesktopGatewayEvent 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 · _AddDialogState.build (cyclomatic 31) · ×1
  • _AddDialogState.build (cyclomatic 31) lib/main.dart:3007 — _AddDialogState.build 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 · _ChatScreenState.build (cyclomatic 31) · ×1
  • _ChatScreenState.build (cyclomatic 31) lib/core/screens/chat_screen.dart:6806 — _ChatScreenState.build 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 · _AssetsScreenState._scan (cyclomatic 30) · ×1
  • _AssetsScreenState._scan (cyclomatic 30) lib/core/screens/assets_screen.dart:85 — _AssetsScreenState._scan 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 · GatewayTurnJournalEntry._fromJson (cyclomatic 30) · ×1
  • GatewayTurnJournalEntry._fromJson (cyclomatic 30) lib/core/services/gateway_turn_journal.dart:323 — GatewayTurnJournalEntry._fromJson has cyclomatic complexity 30 (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 · _ProviderUsageScreenState.build (cyclomatic 29) · ×1
  • _ProviderUsageScreenState.build (cyclomatic 29) lib/core/screens/provider_usage_screen.dart:171 — _ProviderUsageScreenState.build 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 · NormalGatewayPersistedTurn.fromWire (cyclomatic 28) · ×1
  • NormalGatewayPersistedTurn.fromWire (cyclomatic 28) lib/core/models/normal_gateway_persisted_turn.dart:21 — NormalGatewayPersistedTurn.fromWire has cyclomatic complexity 28 (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 · MessageBubble._buildBubble (cyclomatic 28) · ×1
  • MessageBubble._buildBubble (cyclomatic 28) lib/core/screens/chat_screen.dart:8910 — MessageBubble._buildBubble 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 · _OfficePackage.walk (cyclomatic 28) · ×1
  • _OfficePackage.walk (cyclomatic 28) lib/core/services/attachment_document_service.dart:889 — _OfficePackage.walk 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 · MobilePushService._enable (cyclomatic 28) · ×1
  • MobilePushService._enable (cyclomatic 28) lib/core/services/mobile_push_service.dart:208 — MobilePushService._enable 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 · _ChatScreenState._refreshDeferredHistoryIfIdle (cyclomatic 27) · ×1
  • _ChatScreenState._refreshDeferredHistoryIfIdle (cyclomatic 27) lib/core/screens/chat_screen.dart:3343 — _ChatScreenState._refreshDeferredHistoryIfIdle has cyclomatic complexity 27 (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 · _ChatScreenState._showModelSelector (cyclomatic 27) · ×1
  • _ChatScreenState._showModelSelector (cyclomatic 27) lib/core/screens/chat_screen.dart:4142 — _ChatScreenState._showModelSelector 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 · _ChatScreenState._stopResponse (cyclomatic 27) · ×1
  • _ChatScreenState._stopResponse (cyclomatic 27) lib/core/screens/chat_screen.dart:6558 — _ChatScreenState._stopResponse 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 · _ModelManagementScreenState._buildBody (cyclomatic 27) · ×1
  • _ModelManagementScreenState._buildBody (cyclomatic 27) lib/core/screens/model_management_screen.dart:286 — _ModelManagementScreenState._buildBody 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 · NormalGatewayChatOwner._recordActivity (cyclomatic 27) · ×1
  • NormalGatewayChatOwner._recordActivity (cyclomatic 27) lib/core/services/normal_gateway_application_session.dart:1388 — NormalGatewayChatOwner._recordActivity has cyclomatic complexity 27 (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 · ProjectsRepository._reconcileSnapshot (cyclomatic 27) · ×1
  • ProjectsRepository._reconcileSnapshot (cyclomatic 27) lib/core/services/projects_repository.dart:772 — ProjectsRepository._reconcileSnapshot 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 · _ChatScreenState._canStartHandsFree (cyclomatic 26) · ×1
  • _ChatScreenState._canStartHandsFree (cyclomatic 26) lib/core/screens/chat_screen.dart:2272 — _ChatScreenState._canStartHandsFree has cyclomatic complexity 26 (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 · _ChatScreenState._dispatchSlashCommand (cyclomatic 26) · ×1
  • _ChatScreenState._dispatchSlashCommand (cyclomatic 26) lib/core/screens/chat_screen.dart:4569 — _ChatScreenState._dispatchSlashCommand 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 · _ChatScreenState._showGatewayApproval (cyclomatic 26) · ×1
  • _ChatScreenState._showGatewayApproval (cyclomatic 26) lib/core/screens/chat_screen.dart:6071 — _ChatScreenState._showGatewayApproval has cyclomatic complexity 26 (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 · _CronScreenState._showEditJobDialog (cyclomatic 26) · ×1
  • _CronScreenState._showEditJobDialog (cyclomatic 26) lib/core/screens/cron_screen.dart:412 — _CronScreenState._showEditJobDialog 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 · AppReleaseApk.parse (cyclomatic 26) · ×1
  • AppReleaseApk.parse (cyclomatic 26) lib/core/services/app_update_service.dart:76 — AppReleaseApk.parse has cyclomatic complexity 26 (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 · DashboardClient.getArchivedSessions (cyclomatic 26) · ×1
  • DashboardClient.getArchivedSessions (cyclomatic 26) lib/core/services/connection_manager.dart:3123 — DashboardClient.getArchivedSessions 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 · LegacyBackgroundMessage._isDelegationResult (cyclomatic 25) · ×1
  • LegacyBackgroundMessage._isDelegationResult (cyclomatic 25) lib/core/models/legacy_background_message.dart:212 — LegacyBackgroundMessage._isDelegationResult 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 · _ChatScreenState._extractToolMessages (cyclomatic 25) · ×1
  • _ChatScreenState._extractToolMessages (cyclomatic 25) lib/core/screens/chat_screen.dart:3617 — _ChatScreenState._extractToolMessages 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 · ConnectionManager.resetConnections (cyclomatic 25) · ×1
  • ConnectionManager.resetConnections (cyclomatic 25) lib/core/services/connection_manager.dart:800 — ConnectionManager.resetConnections 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 · GatewayTurnCoordinator._reconcile (cyclomatic 25) · ×1
  • GatewayTurnCoordinator._reconcile (cyclomatic 25) lib/core/services/gateway_turn_coordinator.dart:1179 — GatewayTurnCoordinator._reconcile has cyclomatic complexity 25 (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 · _WorkspaceScreenState._loadWorkspaceSessionsData (cyclomatic 24) · ×1
  • _WorkspaceScreenState._loadWorkspaceSessionsData (cyclomatic 24) lib/core/screens/workspace_screen.dart:1559 — _WorkspaceScreenState._loadWorkspaceSessionsData 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 · _WorkspaceScreenState._moveChatToProject (cyclomatic 24) · ×1
  • _WorkspaceScreenState._moveChatToProject (cyclomatic 24) lib/core/screens/workspace_screen.dart:1886 — _WorkspaceScreenState._moveChatToProject has cyclomatic complexity 24 (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 · DesktopGatewayClient._handleServerRequest (cyclomatic 24) · ×1
  • DesktopGatewayClient._handleServerRequest (cyclomatic 24) lib/core/services/desktop_gateway_client.dart:936 — DesktopGatewayClient._handleServerRequest 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 · _DelegatedTaskTimelineState.build (cyclomatic 24) · ×1
  • _DelegatedTaskTimelineState.build (cyclomatic 24) lib/core/widgets/delegated_task_timeline.dart:97 — _DelegatedTaskTimelineState.build 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 · LegacyLcmSummary.splitEnvelope (cyclomatic 23) · ×1
  • LegacyLcmSummary.splitEnvelope (cyclomatic 23) lib/core/models/legacy_lcm_summary.dart:31 — LegacyLcmSummary.splitEnvelope 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 · _ChatScreenState._fetchMessages (cyclomatic 23) · ×1
  • _ChatScreenState._fetchMessages (cyclomatic 23) lib/core/screens/chat_screen.dart:3153 — _ChatScreenState._fetchMessages 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 · _ChatScreenState._drainSensitivePromptQueue (cyclomatic 23) · ×1
  • _ChatScreenState._drainSensitivePromptQueue (cyclomatic 23) lib/core/screens/chat_screen.dart:6210 — _ChatScreenState._drainSensitivePromptQueue has cyclomatic complexity 23 (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 · _ChatScreenState._buildDisplayItem (cyclomatic 23) · ×1
  • _ChatScreenState._buildDisplayItem (cyclomatic 23) lib/core/screens/chat_screen.dart:7892 — _ChatScreenState._buildDisplayItem 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 · WorkspaceSessionsScreenState._loadOnce (cyclomatic 23) · ×1
  • WorkspaceSessionsScreenState._loadOnce (cyclomatic 23) lib/core/screens/workspace_sessions_screen.dart:892 — WorkspaceSessionsScreenState._loadOnce 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 · AttachmentDraftService._detectImageFormat (cyclomatic 23) · ×1
  • AttachmentDraftService._detectImageFormat (cyclomatic 23) lib/core/services/attachment_draft_service.dart:552 — AttachmentDraftService._detectImageFormat has cyclomatic complexity 23 (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 · ApiClient.getSessionById (cyclomatic 23) · ×1
  • ApiClient.getSessionById (cyclomatic 23) lib/core/services/connection_manager.dart:1373 — ApiClient.getSessionById 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 · DesktopGatewayClient._rememberBinding (cyclomatic 23) · ×1
  • DesktopGatewayClient._rememberBinding (cyclomatic 23) lib/core/services/desktop_gateway_client.dart:480 — DesktopGatewayClient._rememberBinding 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 · GatewayTurnJournalEntry.GatewayTurnJournalEntry (cyclomatic 23) · ×1
  • GatewayTurnJournalEntry.GatewayTurnJournalEntry (cyclomatic 23) lib/core/services/gateway_turn_journal.dart:212 — GatewayTurnJournalEntry.GatewayTurnJournalEntry has cyclomatic complexity 23 (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 · FlutterVoiceReplySpeaker.speak (cyclomatic 23) · ×1
  • FlutterVoiceReplySpeaker.speak (cyclomatic 23) lib/core/services/hands_free_speech.dart:59 — FlutterVoiceReplySpeaker.speak 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 · Profile.policy (cyclomatic 23) · ×1
  • Profile.policy (cyclomatic 23) server/mobile-push/mobile_push/config.py:127 — Profile.policy 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 · transport.validate_endpoint (cyclomatic 23) · ×1
  • transport.validate_endpoint (cyclomatic 23) server/mobile-push/mobile_push/transport.py:49 — transport.validate_endpoint 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 · DelegatedTaskController._performRead (cyclomatic 22) · ×1
  • DelegatedTaskController._performRead (cyclomatic 22) lib/core/controllers/delegated_task_controller.dart:128 — DelegatedTaskController._performRead 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 · LegacyLcmSummary.matches (cyclomatic 22) · ×1
  • LegacyLcmSummary.matches (cyclomatic 22) lib/core/models/legacy_lcm_summary.dart:81 — LegacyLcmSummary.matches 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 · _ModelManagementScreenState._applyModel (cyclomatic 22) · ×1
  • _ModelManagementScreenState._applyModel (cyclomatic 22) lib/core/screens/model_management_screen.dart:216 — _ModelManagementScreenState._applyModel 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 · DashboardClient._requireRawFallbackConfig (cyclomatic 22) · ×1
  • DashboardClient._requireRawFallbackConfig (cyclomatic 22) lib/core/services/connection_manager.dart:3453 — DashboardClient._requireRawFallbackConfig 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 · GatewayTurnRecoveryState.applyEvent (cyclomatic 22) · ×1
  • GatewayTurnRecoveryState.applyEvent (cyclomatic 22) lib/core/services/gateway_turn_recovery.dart:266 — GatewayTurnRecoveryState.applyEvent 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 · VoicePlatformEvent.parse (cyclomatic 22) · ×1
  • VoicePlatformEvent.parse (cyclomatic 22) lib/core/services/hands_free_voice_platform.dart:128 — VoicePlatformEvent.parse has cyclomatic complexity 22 (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 · ChatReceivedRecoveryProjection.build (cyclomatic 22) · ×1
  • ChatReceivedRecoveryProjection.build (cyclomatic 22) lib/core/utils/chat_received_recovery_projection.dart:14 — ChatReceivedRecoveryProjection.build 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 · _AuxiliaryModelsState._load (cyclomatic 22) · ×1
  • _AuxiliaryModelsState._load (cyclomatic 22) lib/core/widgets/auxiliary_models.dart:56 — _AuxiliaryModelsState._load 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 · _FallbackModelsState.build (cyclomatic 22) · ×1
  • _FallbackModelsState.build (cyclomatic 22) lib/core/widgets/fallback_models.dart:212 — _FallbackModelsState.build 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 · VoiceRecordingControls.build (cyclomatic 22) · ×1
  • VoiceRecordingControls.build (cyclomatic 22) lib/core/widgets/voice_recording_controls.dart:19 — VoiceRecordingControls.build 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 · HandsFreeConversationController._start (cyclomatic 21) · ×1
  • HandsFreeConversationController._start (cyclomatic 21) lib/core/controllers/hands_free_conversation_controller.dart:257 — HandsFreeConversationController._start 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 · HandsFreeConversationController._submit (cyclomatic 21) · ×1
  • HandsFreeConversationController._submit (cyclomatic 21) lib/core/controllers/hands_free_conversation_controller.dart:537 — HandsFreeConversationController._submit 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 · _ChatScreenState.initState (cyclomatic 21) · ×1
  • _ChatScreenState.initState (cyclomatic 21) lib/core/screens/chat_screen.dart:930 — _ChatScreenState.initState 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 · _ChatScreenState._drainClarifyPromptQueue (cyclomatic 21) · ×1
  • _ChatScreenState._drainClarifyPromptQueue (cyclomatic 21) lib/core/screens/chat_screen.dart:6416 — _ChatScreenState._drainClarifyPromptQueue has cyclomatic complexity 21 (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 · _ModelManagementScreenState._parseModelOptions (cyclomatic 21) · ×1
  • _ModelManagementScreenState._parseModelOptions (cyclomatic 21) lib/core/screens/model_management_screen.dart:118 — _ModelManagementScreenState._parseModelOptions 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 · DashboardTaskHistory._isCompressionEdge (cyclomatic 21) · ×1
  • DashboardTaskHistory._isCompressionEdge (cyclomatic 21) lib/core/services/delegated_task_history.dart:310 — DashboardTaskHistory._isCompressionEdge has cyclomatic complexity 21 (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 · GatewayTurnCoordinator.stageAttachment (cyclomatic 21) · ×1
  • GatewayTurnCoordinator.stageAttachment (cyclomatic 21) lib/core/services/gateway_turn_coordinator.dart:768 — GatewayTurnCoordinator.stageAttachment 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 · GatewayTurnCoordinator.interrupt (cyclomatic 21) · ×1
  • GatewayTurnCoordinator.interrupt (cyclomatic 21) lib/core/services/gateway_turn_coordinator.dart:896 — GatewayTurnCoordinator.interrupt has cyclomatic complexity 21 (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 · GatewayTurnJournal._readData (cyclomatic 21) · ×1
  • GatewayTurnJournal._readData (cyclomatic 21) lib/core/services/gateway_turn_journal.dart:614 — GatewayTurnJournal._readData 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 · GatewayTurnRecoveryState.applyReconcilePage (cyclomatic 21) · ×1
  • GatewayTurnRecoveryState.applyReconcilePage (cyclomatic 21) lib/core/services/gateway_turn_recovery.dart:346 — GatewayTurnRecoveryState.applyReconcilePage 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 · WsClient._handleMessage (cyclomatic 21) · ×1
  • WsClient._handleMessage (cyclomatic 21) lib/core/services/ws_client.dart:586 — WsClient._handleMessage 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 · WsClient.submitPrompt (cyclomatic 21) · ×1
  • WsClient.submitPrompt (cyclomatic 21) lib/core/services/ws_client.dart:967 — WsClient.submitPrompt 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 · _FallbackModelsState._row (cyclomatic 21) · ×1
  • _FallbackModelsState._row (cyclomatic 21) lib/core/widgets/fallback_models.dart:280 — _FallbackModelsState._row 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 · MobilePushPolicy.valid (cyclomatic 21) · ×1
  • MobilePushPolicy.valid (cyclomatic 21) android/app/src/main/kotlin/com/hermesagent/hermes_android/MobilePushPolicy.kt:20 — MobilePushPolicy.valid has cyclomatic complexity 21 (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 · HermesAppState._handleNotificationResponse (cyclomatic 20) · ×1
  • HermesAppState._handleNotificationResponse (cyclomatic 20) lib/main.dart:774 — HermesAppState._handleNotificationResponse 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 · _ChatScreenState._startVoiceInput (cyclomatic 20) · ×1
  • _ChatScreenState._startVoiceInput (cyclomatic 20) lib/core/screens/chat_screen.dart:2590 — _ChatScreenState._startVoiceInput 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.
D1 · Cyclomatic Complexity · _ChatScreenState._loadOlderMessages (cyclomatic 20) · ×1
  • _ChatScreenState._loadOlderMessages (cyclomatic 20) lib/core/screens/chat_screen.dart:3271 — _ChatScreenState._loadOlderMessages 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.
D1 · Cyclomatic Complexity · _CronScreenState._buildBody (cyclomatic 20) · ×1
  • _CronScreenState._buildBody (cyclomatic 20) lib/core/screens/cron_screen.dart:641 — _CronScreenState._buildBody 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 · _SessionListScreenState._runServerSearch (cyclomatic 20) · ×1
  • _SessionListScreenState._runServerSearch (cyclomatic 20) lib/core/screens/session_list_screen.dart:433 — _SessionListScreenState._runServerSearch 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 · ClientCertificateService.importIdentityDocument (cyclomatic 20) · ×1
  • ClientCertificateService.importIdentityDocument (cyclomatic 20) lib/core/services/client_certificate_service.dart:223 — ClientCertificateService.importIdentityDocument 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 · ConnectionManager.updateConnection (cyclomatic 20) · ×1
  • ConnectionManager.updateConnection (cyclomatic 20) lib/core/services/connection_manager.dart:629 — ConnectionManager.updateConnection 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.
D1 · Cyclomatic Complexity · DesktopGatewayClient.respondToClarify (cyclomatic 20) · ×1
  • DesktopGatewayClient.respondToClarify (cyclomatic 20) lib/core/services/desktop_gateway_client.dart:1242 — DesktopGatewayClient.respondToClarify 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 · GatewayProbe.probe (cyclomatic 20) · ×1
  • GatewayProbe.probe (cyclomatic 20) lib/core/services/hermes_sign_in.dart:651 — GatewayProbe.probe 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 · NormalGatewayApplicationSession._coalesce (cyclomatic 20) · ×1
  • NormalGatewayApplicationSession._coalesce (cyclomatic 20) lib/core/services/normal_gateway_application_session.dart:383 — NormalGatewayApplicationSession._coalesce 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 · _CronModelPickerState.build (cyclomatic 20) · ×1
  • _CronModelPickerState.build (cyclomatic 20) lib/core/widgets/cron_model_picker.dart:42 — _CronModelPickerState.build 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 · _FallbackModelsState._loadOptions (cyclomatic 20) · ×1
  • _FallbackModelsState._loadOptions (cyclomatic 20) lib/core/widgets/fallback_models.dart:108 — _FallbackModelsState._loadOptions 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 · GatewaySubagentCard.build (cyclomatic 20) · ×1
  • GatewaySubagentCard.build (cyclomatic 20) lib/core/widgets/gateway_insight_card.dart:149 — GatewaySubagentCard.build 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 · HomeScreenState._showDashboardAuthDialog (cyclomatic 19) · ×1
  • HomeScreenState._showDashboardAuthDialog (cyclomatic 19) lib/main.dart:1891 — HomeScreenState._showDashboardAuthDialog 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 · BackgroundReport._isPreservedTaskList (cyclomatic 19) · ×1
  • BackgroundReport._isPreservedTaskList (cyclomatic 19) lib/core/models/background_report.dart:143 — BackgroundReport._isPreservedTaskList has cyclomatic complexity 19 (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 · _ChatScreenState._readAssistantText (cyclomatic 19) · ×1
  • _ChatScreenState._readAssistantText (cyclomatic 19) lib/core/screens/chat_screen.dart:2657 — _ChatScreenState._readAssistantText 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 · _ProviderOAuthScreenState.build (cyclomatic 19) · ×1
  • _ProviderOAuthScreenState.build (cyclomatic 19) lib/core/screens/provider_oauth_screen.dart:411 — _ProviderOAuthScreenState.build 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 · _WorkspaceScreenState._startSharedChat (cyclomatic 19) · ×1
  • _WorkspaceScreenState._startSharedChat (cyclomatic 19) lib/core/screens/workspace_screen.dart:832 — _WorkspaceScreenState._startSharedChat 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 · WorkspaceSessionsScreenState._setArchived (cyclomatic 19) · ×1
  • WorkspaceSessionsScreenState._setArchived (cyclomatic 19) lib/core/screens/workspace_sessions_screen.dart:1264 — WorkspaceSessionsScreenState._setArchived 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 · AttachmentController.save (cyclomatic 19) · ×1
  • AttachmentController.save (cyclomatic 19) lib/core/services/attachment_controller.dart:215 — AttachmentController.save 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 · ApiClient.setSessionArchived (cyclomatic 19) · ×1
  • ApiClient.setSessionArchived (cyclomatic 19) lib/core/services/connection_manager.dart:1498 — ApiClient.setSessionArchived has cyclomatic complexity 19 (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 · LanDiscoveryService.candidateHosts (cyclomatic 19) · ×1
  • LanDiscoveryService.candidateHosts (cyclomatic 19) lib/core/services/lan_discovery_service.dart:181 — LanDiscoveryService.candidateHosts 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 · LocalVoiceRecorder._recoverContinuation (cyclomatic 19) · ×1
  • LocalVoiceRecorder._recoverContinuation (cyclomatic 19) lib/core/services/local_voice_recorder.dart:141 — LocalVoiceRecorder._recoverContinuation 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 · NormalGatewayChatOwner._boundSettledPresentation (cyclomatic 19) · ×1
  • NormalGatewayChatOwner._boundSettledPresentation (cyclomatic 19) lib/core/services/normal_gateway_application_session.dart:1204 — NormalGatewayChatOwner._boundSettledPresentation has cyclomatic complexity 19 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · HermesAppState._onMobilePushChanged (cyclomatic 18) · ×1
  • HermesAppState._onMobilePushChanged (cyclomatic 18) lib/main.dart:698 — HermesAppState._onMobilePushChanged 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 · _ChatScreenState._queuePersistedHistoryContext (cyclomatic 18) · ×1
  • _ChatScreenState._queuePersistedHistoryContext (cyclomatic 18) lib/core/screens/chat_screen.dart:1414 — _ChatScreenState._queuePersistedHistoryContext has cyclomatic complexity 18 (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 · _WorkspaceScreenState._loadOperationalActivity (cyclomatic 18) · ×1
  • _WorkspaceScreenState._loadOperationalActivity (cyclomatic 18) lib/core/screens/workspace_screen.dart:593 — _WorkspaceScreenState._loadOperationalActivity 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 · WorkspaceSessionsScreenState._applyData (cyclomatic 18) · ×1
  • WorkspaceSessionsScreenState._applyData (cyclomatic 18) lib/core/screens/workspace_sessions_screen.dart:968 — WorkspaceSessionsScreenState._applyData 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 · WorkspaceSessionsScreenState._rename (cyclomatic 18) · ×1
  • WorkspaceSessionsScreenState._rename (cyclomatic 18) lib/core/screens/workspace_sessions_screen.dart:1123 — WorkspaceSessionsScreenState._rename 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 · ConnectionManager.saveSingleLoginConnection (cyclomatic 18) · ×1
  • ConnectionManager.saveSingleLoginConnection (cyclomatic 18) lib/core/services/connection_manager.dart:542 — ConnectionManager.saveSingleLoginConnection 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 · MobilePushService._current (cyclomatic 18) · ×1
  • MobilePushService._current (cyclomatic 18) lib/core/services/mobile_push_service.dart:439 — MobilePushService._current has cyclomatic complexity 18 (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 · NormalGatewayChatOwner._reconcilePersistedTurns (cyclomatic 18) · ×1
  • NormalGatewayChatOwner._reconcilePersistedTurns (cyclomatic 18) lib/core/services/normal_gateway_application_session.dart:1080 — NormalGatewayChatOwner._reconcilePersistedTurns 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 · ProjectsRepository._create (cyclomatic 18) · ×1
  • ProjectsRepository._create (cyclomatic 18) lib/core/services/projects_repository.dart:444 — ProjectsRepository._create 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 · _GatewayClarifyDialogState.build (cyclomatic 18) · ×1
  • _GatewayClarifyDialogState.build (cyclomatic 18) lib/core/widgets/gateway_clarify_dialog.dart:114 — _GatewayClarifyDialogState.build 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 · Runtime.deliver_one (cyclomatic 18) · ×1
  • Runtime.deliver_one (cyclomatic 18) server/mobile-push/mobile_push/service.py:56 — Runtime.deliver_one 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 · Store.events (cyclomatic 18) · ×1
  • Store.events (cyclomatic 18) server/mobile-push/mobile_push/store.py:442 — Store.events 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 · GatewayApprovalRequest.fromEventData (cyclomatic 17) · ×1
  • GatewayApprovalRequest.fromEventData (cyclomatic 17) lib/core/models/gateway_approval.dart:49 — GatewayApprovalRequest.fromEventData 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 · GatewaySessionBinding.fromWire (cyclomatic 17) · ×1
  • GatewaySessionBinding.fromWire (cyclomatic 17) lib/core/models/gateway_turn_contract.dart:413 — GatewaySessionBinding.fromWire 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.
D1 · Cyclomatic Complexity · _ChatScreenState._sendWhileWorking (cyclomatic 17) · ×1
  • _ChatScreenState._sendWhileWorking (cyclomatic 17) lib/core/screens/chat_screen.dart:4705 — _ChatScreenState._sendWhileWorking 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 · _ChatScreenState._handleDesktopAsyncEvent (cyclomatic 17) · ×1
  • _ChatScreenState._handleDesktopAsyncEvent (cyclomatic 17) lib/core/screens/chat_screen.dart:5672 — _ChatScreenState._handleDesktopAsyncEvent 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 · _ProviderOAuthScreenState._poll (cyclomatic 17) · ×1
  • _ProviderOAuthScreenState._poll (cyclomatic 17) lib/core/screens/provider_oauth_screen.dart:250 — _ProviderOAuthScreenState._poll 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 · AttachmentDraftService.prepareImage (cyclomatic 17) · ×1
  • AttachmentDraftService.prepareImage (cyclomatic 17) lib/core/services/attachment_draft_service.dart:150 — AttachmentDraftService.prepareImage 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 · ConnectionKeepAliveService.start (cyclomatic 17) · ×1
  • ConnectionKeepAliveService.start (cyclomatic 17) lib/core/services/connection_keepalive_service.dart:27 — ConnectionKeepAliveService.start 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 · NormalGatewayChatOwner._completionAssistantMessage (cyclomatic 17) · ×1
  • NormalGatewayChatOwner._completionAssistantMessage (cyclomatic 17) lib/core/services/normal_gateway_application_session.dart:2289 — NormalGatewayChatOwner._completionAssistantMessage 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 · ActivityPaneState.build (cyclomatic 17) · ×1
  • ActivityPaneState.build (cyclomatic 17) lib/core/widgets/activity_pane.dart:199 — ActivityPaneState.build 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 · _AttachmentVideoPreviewState.build (cyclomatic 17) · ×1
  • _AttachmentVideoPreviewState.build (cyclomatic 17) lib/core/widgets/attachment_video_preview.dart:205 — _AttachmentVideoPreviewState.build 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 · _AddDialogState._pickCertificateIdentityOwned (cyclomatic 16) · ×1
  • _AddDialogState._pickCertificateIdentityOwned (cyclomatic 16) lib/main.dart:2619 — _AddDialogState._pickCertificateIdentityOwned 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 · LegacyBackgroundMessage._isDelegationFailure (cyclomatic 16) · ×1
  • LegacyBackgroundMessage._isDelegationFailure (cyclomatic 16) lib/core/models/legacy_background_message.dart:287 — LegacyBackgroundMessage._isDelegationFailure 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 · _ChatScreenState._completionAssistantMessage (cyclomatic 16) · ×1
  • _ChatScreenState._completionAssistantMessage (cyclomatic 16) lib/core/screens/chat_screen.dart:5605 — _ChatScreenState._completionAssistantMessage 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 · _ChatScreenState._stopRecoverableGatewayResponse (cyclomatic 16) · ×1
  • _ChatScreenState._stopRecoverableGatewayResponse (cyclomatic 16) lib/core/screens/chat_screen.dart:6510 — _ChatScreenState._stopRecoverableGatewayResponse 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 · MessageBubble._renderContent (cyclomatic 16) · ×1
  • MessageBubble._renderContent (cyclomatic 16) lib/core/screens/chat_screen.dart:8588 — MessageBubble._renderContent 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 · _SessionListScreenState._loadMoreSessions (cyclomatic 16) · ×1
  • _SessionListScreenState._loadMoreSessions (cyclomatic 16) lib/core/screens/session_list_screen.dart:1123 — _SessionListScreenState._loadMoreSessions 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 · _WorkspaceScreenState._refreshActivitySessions (cyclomatic 16) · ×1
  • _WorkspaceScreenState._refreshActivitySessions (cyclomatic 16) lib/core/screens/workspace_screen.dart:541 — _WorkspaceScreenState._refreshActivitySessions 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 is NOT this file's highest cyclomatic complexity: _WorkspaceScreenState._openMoreEntry (cyclomatic 17) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · WorkspaceSessionsScreenState._promote (cyclomatic 16) · ×1
  • WorkspaceSessionsScreenState._promote (cyclomatic 16) lib/core/screens/workspace_sessions_screen.dart:1196 — WorkspaceSessionsScreenState._promote 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 · ConfigBackupService.import (cyclomatic 16) · ×1
  • ConfigBackupService.import (cyclomatic 16) lib/core/services/config_backup_service.dart:147 — ConfigBackupService.import 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 · GatewayChatClient.buildChatCompletionMessages (cyclomatic 16) · ×1
  • GatewayChatClient.buildChatCompletionMessages (cyclomatic 16) lib/core/services/connection_manager.dart:1949 — GatewayChatClient.buildChatCompletionMessages has cyclomatic complexity 16 (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 · HermesSignInVault.sessionForRequest (cyclomatic 16) · ×1
  • HermesSignInVault.sessionForRequest (cyclomatic 16) lib/core/services/hermes_sign_in.dart:488 — HermesSignInVault.sessionForRequest 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 · MobilePushService.checkAvailability (cyclomatic 16) · ×1
  • MobilePushService.checkAvailability (cyclomatic 16) lib/core/services/mobile_push_service.dart:335 — MobilePushService.checkAvailability has cyclomatic complexity 16 (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 · MobilePushService._events (cyclomatic 16) · ×1
  • MobilePushService._events (cyclomatic 16) lib/core/services/mobile_push_service.dart:660 — MobilePushService._events 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 · NormalGatewayPendingMarker.parse (cyclomatic 16) · ×1
  • NormalGatewayPendingMarker.parse (cyclomatic 16) lib/core/services/normal_gateway_pending_store.dart:55 — NormalGatewayPendingMarker.parse has cyclomatic complexity 16 (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 · DashboardProjectFolderDiscovery.scan (cyclomatic 16) · ×1
  • DashboardProjectFolderDiscovery.scan (cyclomatic 16) lib/core/services/project_folder_discovery.dart:107 — DashboardProjectFolderDiscovery.scan 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 · ProjectsRepository.refresh (cyclomatic 16) · ×1
  • ProjectsRepository.refresh (cyclomatic 16) lib/core/services/projects_repository.dart:297 — ProjectsRepository.refresh 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 · ProjectsRepository.overview (cyclomatic 16) · ×1
  • ProjectsRepository.overview (cyclomatic 16) lib/core/services/projects_repository.dart:349 — ProjectsRepository.overview 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 · RemoteFilesClient._downloadUrl (cyclomatic 16) · ×1
  • RemoteFilesClient._downloadUrl (cyclomatic 16) lib/core/services/remote_files_client.dart:262 — RemoteFilesClient._downloadUrl 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 · _AuxiliaryTaskState.build (cyclomatic 16) · ×1
  • _AuxiliaryTaskState.build (cyclomatic 16) lib/core/widgets/auxiliary_models.dart:238 — _AuxiliaryTaskState.build 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 · _UpdateAvailableDialogState.build (cyclomatic 16) · ×1
  • _UpdateAvailableDialogState.build (cyclomatic 16) lib/core/widgets/update_available_dialog.dart:110 — _UpdateAvailableDialogState.build 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.
D2 · Cognitive Complexity · NormalGatewayChatOwner._event (cognitive 173) · ×1
  • NormalGatewayChatOwner._event (cognitive 173) lib/core/services/normal_gateway_application_session.dart:1851 — NormalGatewayChatOwner._event has cognitive complexity 173 (threshold 15). Drivers by points: if/else 53 (95 pts), boolean chains 60, ternaries 6 (15 pts), loops 2 (3 pts) (nesting depth added 52). To reduce it, split the body into named stages: move each independent 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 · MobilePushService._refresh (cognitive 115) · ×1
  • MobilePushService._refresh (cognitive 115) lib/core/services/mobile_push_service.dart:469 — MobilePushService._refresh has cognitive complexity 115 (threshold 15). Drivers by points: if/else 33 (83 pts), boolean chains 19, error handling 2 (5 pts), loops 2 (4 pts), ternaries 2 (4 pts) (nesting depth added 57). To reduce it, split the body into named stages: move each independent 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 · NormalGatewayChatOwner._settle (cognitive 111) · ×1
  • NormalGatewayChatOwner._settle (cognitive 111) lib/core/services/normal_gateway_application_session.dart:2505 — NormalGatewayChatOwner._settle has cognitive complexity 111 (threshold 15). Drivers by points: if/else 24 (55 pts), ternaries 9 (25 pts), boolean chains 23, loops 3 (7 pts), error handling 1 (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 · _ChatScreenState._submitMessage (cognitive 104) · ×1
  • _ChatScreenState._submitMessage (cognitive 104) lib/core/screens/chat_screen.dart:4781 — _ChatScreenState._submitMessage has cognitive complexity 104 (threshold 15). Drivers by points: if/else 32 (73 pts), boolean chains 20, ternaries 4 (7 pts), error handling 2 (4 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 · _SessionListScreenState._buildBody (cognitive 97) · ×1
  • _SessionListScreenState._buildBody (cognitive 97) lib/core/screens/session_list_screen.dart:1515 — _SessionListScreenState._buildBody has cognitive complexity 97 (threshold 15). Drivers by points: ternaries 29 (47 pts), if/else 17 (25 pts), boolean chains 24, loops 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 · HermesAppState._runNotificationNavigation (cognitive 91) · ×1
  • HermesAppState._runNotificationNavigation (cognitive 91) lib/main.dart:1020 — HermesAppState._runNotificationNavigation has cognitive complexity 91 (threshold 15). Drivers by points: if/else 24 (52 pts), boolean chains 24, ternaries 3 (12 pts), error handling 1 (3 pts) (nesting depth added 39). 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 · _ChatScreenState._applyNormalSnapshot (cognitive 87) · ×1
  • _ChatScreenState._applyNormalSnapshot (cognitive 87) lib/core/screens/chat_screen.dart:1158 — _ChatScreenState._applyNormalSnapshot has cognitive complexity 87 (threshold 15). Drivers by points: if/else 29 (48 pts), boolean chains 28, loops 8 (9 pts), ternaries 2 (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.
D2 · Cognitive Complexity · NormalGatewayChatOwner.submitPrepared (cognitive 87) · ×1
  • NormalGatewayChatOwner.submitPrepared (cognitive 87) lib/core/services/normal_gateway_application_session.dart:1594 — NormalGatewayChatOwner.submitPrepared has cognitive complexity 87 (threshold 15). Drivers by points: if/else 28 (60 pts), boolean chains 14, ternaries 5 (10 pts), loops 1 (2 pts), error handling 1 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ChatScreenState._buildInputBar (cognitive 86) · ×1
  • _ChatScreenState._buildInputBar (cognitive 86) lib/core/screens/chat_screen.dart:7111 — _ChatScreenState._buildInputBar has cognitive complexity 86 (threshold 15). Drivers by points: boolean chains 52, if/else 17 (18 pts), ternaries 14 (16 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 · _ChatScreenState._sendDesktopGatewayMessage (cognitive 78) · ×1
  • _ChatScreenState._sendDesktopGatewayMessage (cognitive 78) lib/core/screens/chat_screen.dart:5080 — _ChatScreenState._sendDesktopGatewayMessage has cognitive complexity 78 (threshold 15). Drivers by points: if/else 24 (49 pts), boolean chains 15, ternaries 6 (13 pts), error handling 1 (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 · GatewayChatClient.sendMessageStreaming (cognitive 78) · ×1
  • GatewayChatClient.sendMessageStreaming (cognitive 78) lib/core/services/connection_manager.dart:2136 — GatewayChatClient.sendMessageStreaming has cognitive complexity 78 (threshold 15). Drivers by points: if/else 29 (53 pts), boolean chains 10, error handling 3 (7 pts), ternaries 2 (6 pts), loops 1 (2 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 · NormalGatewayChatOwner._recover (cognitive 74) · ×1
  • NormalGatewayChatOwner._recover (cognitive 74) lib/core/services/normal_gateway_application_session.dart:2364 — NormalGatewayChatOwner._recover has cognitive complexity 74 (threshold 15). Drivers by points: if/else 20 (34 pts), boolean chains 31, ternaries 3 (8 pts), error handling 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ChatScreenState._sendRecoverableGatewayMessage (cognitive 71) · ×1
  • _ChatScreenState._sendRecoverableGatewayMessage (cognitive 71) lib/core/screens/chat_screen.dart:5242 — _ChatScreenState._sendRecoverableGatewayMessage has cognitive complexity 71 (threshold 15). Drivers by points: if/else 19 (38 pts), boolean chains 13, ternaries 3 (8 pts), loops 3 (7 pts), error handling 3 (5 pts) (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 · _ChatScreenState._sendMessage (cognitive 70) · ×1
  • _ChatScreenState._sendMessage (cognitive 70) lib/core/screens/chat_screen.dart:4425 — _ChatScreenState._sendMessage has cognitive complexity 70 (threshold 15). Drivers by points: if/else 28 (40 pts), boolean chains 27, error handling 2, 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 · _OfficePackage._index (cognitive 66) · ×1
  • _OfficePackage._index (cognitive 66) lib/core/services/attachment_document_service.dart:730 — _OfficePackage._index has cognitive complexity 66 (threshold 15). Drivers by points: boolean chains 36, if/else 13 (23 pts), loops 4 (5 pts), ternaries 1 (2 pts) (nesting depth added 12). 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 · WorkspaceSessionsScreenState._buildLoaded (cognitive 64) · ×1
  • WorkspaceSessionsScreenState._buildLoaded (cognitive 64) lib/core/screens/workspace_sessions_screen.dart:1403 — WorkspaceSessionsScreenState._buildLoaded has cognitive complexity 64 (threshold 15). Drivers by points: boolean chains 24, ternaries 16 (21 pts), if/else 7 (10 pts), loops 3 (9 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 · _AssetsScreenState._scan (cognitive 62) · ×1
  • _AssetsScreenState._scan (cognitive 62) lib/core/screens/assets_screen.dart:85 — _AssetsScreenState._scan has cognitive complexity 62 (threshold 15). Drivers by points: if/else 15 (41 pts), loops 3 (9 pts), boolean chains 6, error handling 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent 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 · _AddDialogState._validateAndSaveOwned (cognitive 59) · ×1
  • _AddDialogState._validateAndSaveOwned (cognitive 59) lib/main.dart:2839 — _AddDialogState._validateAndSaveOwned has cognitive complexity 59 (threshold 15). Drivers by points: if/else 13 (26 pts), ternaries 8 (17 pts), boolean chains 11, error handling 3 (5 pts) (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 · _OfficePackage.walk (cognitive 58) · ×1
  • _OfficePackage.walk (cognitive 58) lib/core/services/attachment_document_service.dart:889 — _OfficePackage.walk has cognitive complexity 58 (threshold 15). Drivers by points: if/else 20 (47 pts), boolean chains 6, ternaries 1 (4 pts), loops 1 (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 · DashboardTaskHistory.fetch (cognitive 57) · ×1
  • DashboardTaskHistory.fetch (cognitive 57) lib/core/services/delegated_task_history.dart:106 — DashboardTaskHistory.fetch has cognitive complexity 57 (threshold 15). Drivers by points: if/else 13 (27 pts), boolean chains 21, ternaries 3 (6 pts), loops 1 (2 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 · _ChatScreenState._buildBody (cognitive 55) · ×1
  • _ChatScreenState._buildBody (cognitive 55) lib/core/screens/chat_screen.dart:8063 — _ChatScreenState._buildBody has cognitive complexity 55 (threshold 15). Drivers by points: if/else 14 (18 pts), ternaries 11 (14 pts), boolean chains 12, loops 7 (11 pts) (nesting depth added 11). 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 · _ModelManagementScreenState._buildBody (cognitive 54) · ×1
  • _ModelManagementScreenState._buildBody (cognitive 54) lib/core/screens/model_management_screen.dart:286 — _ModelManagementScreenState._buildBody has cognitive complexity 54 (threshold 15). Drivers by points: if/else 14 (33 pts), boolean chains 13, ternaries 2 (8 pts) (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · WorkspaceSessionsScreenState._buildSessionRow (cognitive 54) · ×1
  • WorkspaceSessionsScreenState._buildSessionRow (cognitive 54) lib/core/screens/workspace_sessions_screen.dart:1642 — WorkspaceSessionsScreenState._buildSessionRow has cognitive complexity 54 (threshold 15). Drivers by points: boolean chains 19, ternaries 10 (17 pts), if/else 11 (16 pts), match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _AddDialogState.build (cognitive 52) · ×1
  • _AddDialogState.build (cognitive 52) lib/main.dart:3007 — _AddDialogState.build has cognitive complexity 52 (threshold 15). Drivers by points: if/else 11 (24 pts), ternaries 11 (19 pts), boolean chains 9 (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 · _ProviderUsageScreenState.build (cognitive 52) · ×1
  • _ProviderUsageScreenState.build (cognitive 52) lib/core/screens/provider_usage_screen.dart:171 — _ProviderUsageScreenState.build has cognitive complexity 52 (threshold 15). Drivers by points: if/else 14 (28 pts), ternaries 6 (14 pts), boolean chains 6, loops 2 (4 pts) (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 · MobilePushBridge.command (cognitive 52) · ×1
  • MobilePushBridge.command (cognitive 52) android/app/src/main/kotlin/com/hermesagent/hermes_android/MobilePushBridge.kt:151 — MobilePushBridge.command has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (30 pts), boolean chains 17, match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GatewayTurnCoordinator.submit (cognitive 48) · ×1
  • GatewayTurnCoordinator.submit (cognitive 48) lib/core/services/gateway_turn_coordinator.dart:609 — GatewayTurnCoordinator.submit has cognitive complexity 48 (threshold 15). Drivers by points: if/else 19 (27 pts), error handling 6 (11 pts), boolean chains 10 (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 · _CronScreenState._showEditJobDialog (cognitive 47) · ×1
  • _CronScreenState._showEditJobDialog (cognitive 47) lib/core/screens/cron_screen.dart:412 — _CronScreenState._showEditJobDialog has cognitive complexity 47 (threshold 15). Drivers by points: if/else 10 (25 pts), boolean chains 11, ternaries 3 (9 pts), error handling 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConnectionManager.resetConnections (cognitive 47) · ×1
  • ConnectionManager.resetConnections (cognitive 47) lib/core/services/connection_manager.dart:800 — ConnectionManager.resetConnections has cognitive complexity 47 (threshold 15). Drivers by points: if/else 9 (21 pts), error handling 6 (13 pts), loops 4 (7 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MobilePushService._enable (cognitive 47) · ×1
  • MobilePushService._enable (cognitive 47) lib/core/services/mobile_push_service.dart:208 — MobilePushService._enable has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (36 pts), boolean chains 7, error handling 2 (4 pts) (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.
D2 · Cognitive Complexity · _ChatScreenState._dispatchSlashCommand (cognitive 45) · ×1
  • _ChatScreenState._dispatchSlashCommand (cognitive 45) lib/core/screens/chat_screen.dart:4569 — _ChatScreenState._dispatchSlashCommand has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 7, error handling 4 (7 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ChatScreenState._handleDesktopGatewayEvent (cognitive 45) · ×1
  • _ChatScreenState._handleDesktopGatewayEvent (cognitive 45) lib/core/screens/chat_screen.dart:5451 — _ChatScreenState._handleDesktopGatewayEvent has cognitive complexity 45 (threshold 15). Drivers by points: if/else 26 (40 pts), boolean chains 5 (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 · _ChatScreenState.build (cognitive 45) · ×1
  • _ChatScreenState.build (cognitive 45) lib/core/screens/chat_screen.dart:6806 — _ChatScreenState.build has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (23 pts), ternaries 8 (13 pts), boolean chains 7, loops 1 (2 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 · _ChatScreenState._showModelSelector (cognitive 44) · ×1
  • _ChatScreenState._showModelSelector (cognitive 44) lib/core/screens/chat_screen.dart:4142 — _ChatScreenState._showModelSelector has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (22 pts), ternaries 6 (12 pts), boolean chains 7, error handling 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GatewayChatClient._decodeSseFrame (cognitive 44) · ×1
  • GatewayChatClient._decodeSseFrame (cognitive 44) lib/core/services/connection_manager.dart:2023 — GatewayChatClient._decodeSseFrame has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 15, ternaries 4 (7 pts), error handling 2 (3 pts), loops 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 · HandsFreeConversationController._start (cognitive 43) · ×1
  • HandsFreeConversationController._start (cognitive 43) lib/core/controllers/hands_free_conversation_controller.dart:257 — HandsFreeConversationController._start has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (32 pts), ternaries 4 (8 pts), boolean chains 2, error handling 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WsClient._handleMessage (cognitive 43) · ×1
  • WsClient._handleMessage (cognitive 43) lib/core/services/ws_client.dart:586 — WsClient._handleMessage has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (28 pts), ternaries 2 (8 pts), boolean chains 6, error handling 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ApiClient.respondToRunApproval (cognitive 41) · ×1
  • ApiClient.respondToRunApproval (cognitive 41) lib/core/services/connection_manager.dart:1738 — ApiClient.respondToRunApproval has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 17, ternaries 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HandsFreeConversationController._event (cognitive 40) · ×1
  • HandsFreeConversationController._event (cognitive 40) lib/core/controllers/hands_free_conversation_controller.dart:397 — HandsFreeConversationController._event has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 15, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GatewayTurnRecoveryCapability._fromRecoveryPayload (cognitive 40) · ×1
  • GatewayTurnRecoveryCapability._fromRecoveryPayload (cognitive 40) lib/core/models/gateway_turn_contract.dart:245 — GatewayTurnRecoveryCapability._fromRecoveryPayload has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 19, if/else 13 (14 pts), ternaries 6 (7 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · LegacyBackgroundMessage._isDelegationResult (cognitive 40) · ×1
  • LegacyBackgroundMessage._isDelegationResult (cognitive 40) lib/core/models/legacy_background_message.dart:212 — LegacyBackgroundMessage._isDelegationResult has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (30 pts), boolean chains 7, loops 2 (3 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 · _ChatScreenState._applyGatewayTurnState (cognitive 40) · ×1
  • _ChatScreenState._applyGatewayTurnState (cognitive 40) lib/core/screens/chat_screen.dart:3462 — _ChatScreenState._applyGatewayTurnState has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 11, ternaries 6 (10 pts), match/switch 1 (3 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 · _ChatScreenState._stopResponse (cognitive 40) · ×1
  • _ChatScreenState._stopResponse (cognitive 40) lib/core/screens/chat_screen.dart:6558 — _ChatScreenState._stopResponse has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 6, ternaries 2 (5 pts), error handling 2 (3 pts), match/switch 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 · ApiClient.getSessionById (cognitive 40) · ×1
  • ApiClient.getSessionById (cognitive 40) lib/core/services/connection_manager.dart:1373 — ApiClient.getSessionById has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (26 pts), boolean chains 7, ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _MobilePushSettingsState.build (cognitive 40) · ×1
  • _MobilePushSettingsState.build (cognitive 40) lib/core/widgets/mobile_push_settings.dart:140 — _MobilePushSettingsState.build has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 15, ternaries 11 (13 pts), if/else 11, 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.
D2 · Cognitive Complexity · GatewayTurnReconcilePage.fromWire (cognitive 39) · ×1
  • GatewayTurnReconcilePage.fromWire (cognitive 39) lib/core/models/gateway_turn_contract.dart:726 — GatewayTurnReconcilePage.fromWire has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 23, if/else 8 (10 pts), ternaries 3 (5 pts), loops 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 · DashboardClient.getArchivedSessions (cognitive 39) · ×1
  • DashboardClient.getArchivedSessions (cognitive 39) lib/core/services/connection_manager.dart:3123 — DashboardClient.getArchivedSessions has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 11, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ChatScreenState._extractToolMessages (cognitive 38) · ×1
  • _ChatScreenState._extractToolMessages (cognitive 38) lib/core/screens/chat_screen.dart:3617 — _ChatScreenState._extractToolMessages has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (22 pts), loops 5 (6 pts), boolean chains 5, ternaries 3 (5 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 · DesktopGatewayClient._handleServerRequest (cognitive 38) · ×1
  • DesktopGatewayClient._handleServerRequest (cognitive 38) lib/core/services/desktop_gateway_client.dart:936 — DesktopGatewayClient._handleServerRequest has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 6, loops 1 (3 pts), ternaries 1 (2 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 · MessageBubble._buildBubble (cognitive 37) · ×1
  • MessageBubble._buildBubble (cognitive 37) lib/core/screens/chat_screen.dart:8910 — MessageBubble._buildBubble has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 12 (17 pts), if/else 8 (12 pts), boolean chains 4, loops 1 (2 pts), match/switch 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 · _WorkspaceScreenState._loadOperationalActivity (cognitive 37) · ×1
  • _WorkspaceScreenState._loadOperationalActivity (cognitive 37) lib/core/screens/workspace_screen.dart:593 — _WorkspaceScreenState._loadOperationalActivity has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (26 pts), error handling 3 (5 pts), loops 1 (4 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · FlutterVoiceReplySpeaker.speak (cognitive 37) · ×1
  • FlutterVoiceReplySpeaker.speak (cognitive 37) lib/core/services/hands_free_speech.dart:59 — FlutterVoiceReplySpeaker.speak has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (27 pts), boolean chains 6, loops 1 (2 pts), error handling 1, ternaries 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 · _ChatScreenState._exportConversation (cognitive 36) · ×1
  • _ChatScreenState._exportConversation (cognitive 36) lib/core/screens/chat_screen.dart:2153 — _ChatScreenState._exportConversation has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 4 (12 pts), ternaries 1 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ChatScreenState._sendWhileWorking (cognitive 36) · ×1
  • _ChatScreenState._sendWhileWorking (cognitive 36) lib/core/screens/chat_screen.dart:4705 — _ChatScreenState._sendWhileWorking has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (25 pts), ternaries 2 (6 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GatewayTurnJournal._readData (cognitive 36) · ×1
  • GatewayTurnJournal._readData (cognitive 36) lib/core/services/gateway_turn_journal.dart:614 — GatewayTurnJournal._readData has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 6, loops 2 (4 pts), 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 · _FallbackModelsState.build (cognitive 36) · ×1
  • _FallbackModelsState.build (cognitive 36) lib/core/widgets/fallback_models.dart:212 — _FallbackModelsState.build has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 4 (9 pts), boolean chains 5, loops 2 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ChatScreenState._fetchMessages (cognitive 35) · ×1
  • _ChatScreenState._fetchMessages (cognitive 35) lib/core/screens/chat_screen.dart:3153 — _ChatScreenState._fetchMessages has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 8, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DesktopGatewayClient._rememberBinding (cognitive 35) · ×1
  • DesktopGatewayClient._rememberBinding (cognitive 35) lib/core/services/desktop_gateway_client.dart:480 — DesktopGatewayClient._rememberBinding has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 10, ternaries 1 (2 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 · ProjectsRepository._create (cognitive 35) · ×1
  • ProjectsRepository._create (cognitive 35) lib/core/services/projects_repository.dart:444 — ProjectsRepository._create has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (19 pts), error handling 3 (9 pts), loops 2 (3 pts), ternaries 2 (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 · ChatReceivedRecoveryProjection.build (cognitive 35) · ×1
  • ChatReceivedRecoveryProjection.build (cognitive 35) lib/core/utils/chat_received_recovery_projection.dart:14 — ChatReceivedRecoveryProjection.build has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (26 pts), loops 5 (6 pts), boolean chains 2, ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GatewayTurnCoordinator._reconcile (cognitive 34) · ×1
  • GatewayTurnCoordinator._reconcile (cognitive 34) lib/core/services/gateway_turn_coordinator.dart:1179 — GatewayTurnCoordinator._reconcile has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 7, match/switch 2 (6 pts), error handling 2 (4 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GatewayTurnJournalEntry._fromJson (cognitive 34) · ×1
  • GatewayTurnJournalEntry._fromJson (cognitive 34) lib/core/services/gateway_turn_journal.dart:323 — GatewayTurnJournalEntry._fromJson has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 17, if/else 5 (7 pts), ternaries 5 (7 pts), error handling 2 (3 pts) (nesting depth added 5). 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 · BackgroundReport.fromMessage (cognitive 33) · ×1
  • BackgroundReport.fromMessage (cognitive 33) lib/core/models/background_report.dart:32 — BackgroundReport.fromMessage has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 17, if/else 9 (11 pts), ternaries 4, match/switch 1 (nesting depth added 2). 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 · _ChatScreenState._initVoice (cognitive 33) · ×1
  • _ChatScreenState._initVoice (cognitive 33) lib/core/screens/chat_screen.dart:2535 — _ChatScreenState._initVoice has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (29 pts), boolean chains 3, 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 · _ChatScreenState._refreshDeferredHistoryIfIdle (cognitive 33) · ×1
  • _ChatScreenState._refreshDeferredHistoryIfIdle (cognitive 33) lib/core/screens/chat_screen.dart:3343 — _ChatScreenState._refreshDeferredHistoryIfIdle has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 17, if/else 8 (15 pts), error handling 1 (nesting depth added 7). 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 · _VoicePickerState._load (cognitive 33) · ×1
  • _VoicePickerState._load (cognitive 33) lib/core/screens/settings_screen.dart:555 — _VoicePickerState._load has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (7 pts), error handling 2 (3 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · ProjectsRepository._reconcileSnapshot (cognitive 33) · ×1
  • ProjectsRepository._reconcileSnapshot (cognitive 33) lib/core/services/projects_repository.dart:772 — ProjectsRepository._reconcileSnapshot has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 11, loops 6, 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 · WsClient.parseGatewayEvent (cognitive 33) · ×1
  • WsClient.parseGatewayEvent (cognitive 33) lib/core/services/ws_client.dart:769 — WsClient.parseGatewayEvent has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 24, if/else 3 (4 pts), ternaries 4, loops 1 (nesting depth added 1). 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 · _AuxiliaryModelsState._load (cognitive 33) · ×1
  • _AuxiliaryModelsState._load (cognitive 33) lib/core/widgets/auxiliary_models.dart:56 — _AuxiliaryModelsState._load has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 12, if/else 5 (12 pts), ternaries 2 (6 pts), loops 1 (2 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 · _CronModelPickerState.build (cognitive 33) · ×1
  • _CronModelPickerState.build (cognitive 33) lib/core/widgets/cron_model_picker.dart:42 — _CronModelPickerState.build has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 3 (9 pts), loops 3 (6 pts), boolean chains 5 (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 · _AddDialogState._pickCertificateIdentityOwned (cognitive 32) · ×1
  • _AddDialogState._pickCertificateIdentityOwned (cognitive 32) lib/main.dart:2619 — _AddDialogState._pickCertificateIdentityOwned has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (24 pts), ternaries 2 (6 pts), boolean chains 1, 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 · _WorkspaceScreenState._refreshActivitySessions (cognitive 32) · ×1
  • _WorkspaceScreenState._refreshActivitySessions (cognitive 32) lib/core/screens/workspace_screen.dart:541 — _WorkspaceScreenState._refreshActivitySessions has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 6, loops 2 (5 pts), ternaries 1 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AttachmentController.save (cognitive 32) · ×1
  • AttachmentController.save (cognitive 32) lib/core/services/attachment_controller.dart:215 — AttachmentController.save has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 5, ternaries 2 (5 pts), 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 · ConnectionManager.importConnections (cognitive 32) · ×1
  • ConnectionManager.importConnections (cognitive 32) lib/core/services/connection_manager.dart:390 — ConnectionManager.importConnections has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 3 (7 pts), loops 4 (7 pts), ternaries 2 (6 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GatewayTurnRecoveryState.rehydrate (cognitive 32) · ×1
  • GatewayTurnRecoveryState.rehydrate (cognitive 32) lib/core/services/gateway_turn_recovery.dart:104 — GatewayTurnRecoveryState.rehydrate has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 31, if/else 1. 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 · _FallbackModelsState._loadOptions (cognitive 32) · ×1
  • _FallbackModelsState._loadOptions (cognitive 32) lib/core/widgets/fallback_models.dart:108 — _FallbackModelsState._loadOptions has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 8, ternaries 2 (6 pts), loops 1 (2 pts), error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HermesAppState._dispatchNotificationResponse (cognitive 31) · ×1
  • HermesAppState._dispatchNotificationResponse (cognitive 31) lib/main.dart:852 — HermesAppState._dispatchNotificationResponse has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (24 pts), boolean chains 4, error handling 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _SessionListScreenState._runServerSearch (cognitive 31) · ×1
  • _SessionListScreenState._runServerSearch (cognitive 31) lib/core/screens/session_list_screen.dart:433 — _SessionListScreenState._runServerSearch has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 3, error handling 3, loops 1 (2 pts), ternaries 1 (2 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 · DashboardClient._requireRawFallbackConfig (cognitive 31) · ×1
  • DashboardClient._requireRawFallbackConfig (cognitive 31) lib/core/services/connection_manager.dart:3453 — DashboardClient._requireRawFallbackConfig has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 10, ternaries 2 (4 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DelegatedTaskController._performRead (cognitive 30) · ×1
  • DelegatedTaskController._performRead (cognitive 30) lib/core/controllers/delegated_task_controller.dart:128 — DelegatedTaskController._performRead has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 10, ternaries 2 (4 pts), 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 · LegacyLcmSummary.splitEnvelope (cognitive 30) · ×1
  • LegacyLcmSummary.splitEnvelope (cognitive 30) lib/core/models/legacy_lcm_summary.dart:31 — LegacyLcmSummary.splitEnvelope has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 11, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ChatScreenState._showGatewayApproval (cognitive 30) · ×1
  • _ChatScreenState._showGatewayApproval (cognitive 30) lib/core/screens/chat_screen.dart:6071 — _ChatScreenState._showGatewayApproval has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 14, if/else 7 (9 pts), ternaries 3 (5 pts), error handling 1 (2 pts) (nesting depth added 5). 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 · _WorkspaceScreenState._loadWorkspaceSessionsData (cognitive 30) · ×1
  • _WorkspaceScreenState._loadWorkspaceSessionsData (cognitive 30) lib/core/screens/workspace_screen.dart:1559 — _WorkspaceScreenState._loadWorkspaceSessionsData has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 4 (6 pts), boolean chains 5, error handling 4, 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 · _WorkspaceScreenState._moveChatToProject (cognitive 30) · ×1
  • _WorkspaceScreenState._moveChatToProject (cognitive 30) lib/core/screens/workspace_screen.dart:1886 — _WorkspaceScreenState._moveChatToProject has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 14, if/else 8 (14 pts), error handling 1 (2 pts) (nesting depth added 7). 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 · AttachmentVideoDirectoryOwner.sweep (cognitive 30) · ×1
  • AttachmentVideoDirectoryOwner.sweep (cognitive 30) lib/core/services/attachment_video_file_ownership.dart:49 — AttachmentVideoDirectoryOwner.sweep has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (20 pts), error handling 3 (7 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HermesSignInVault.load (cognitive 30) · ×1
  • HermesSignInVault.load (cognitive 30) lib/core/services/hermes_sign_in.dart:436 — HermesSignInVault.load has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (8 pts), error handling 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · LegacyLcmSummary.matches (cognitive 29) · ×1
  • LegacyLcmSummary.matches (cognitive 29) lib/core/models/legacy_lcm_summary.dart:81 — LegacyLcmSummary.matches has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 11, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ProviderOAuthScreenState.build (cognitive 29) · ×1
  • _ProviderOAuthScreenState.build (cognitive 29) lib/core/screens/provider_oauth_screen.dart:411 — _ProviderOAuthScreenState.build has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 8 (10 pts), boolean chains 3, match/switch 1 (3 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 · WorkspaceSessionsScreenState._setArchived (cognitive 29) · ×1
  • WorkspaceSessionsScreenState._setArchived (cognitive 29) lib/core/screens/workspace_sessions_screen.dart:1264 — WorkspaceSessionsScreenState._setArchived has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 5, ternaries 2 (4 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 · ComposerDraftStore.bind (cognitive 29) · ×1
  • ComposerDraftStore.bind (cognitive 29) lib/core/services/composer_draft_store.dart:142 — ComposerDraftStore.bind has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (21 pts), boolean chains 3, error handling 2 (3 pts), ternaries 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 · GatewayTurnCoordinator._quarantineAndCloseExactSource (cognitive 29) · ×1
  • GatewayTurnCoordinator._quarantineAndCloseExactSource (cognitive 29) lib/core/services/gateway_turn_coordinator.dart:1415 — GatewayTurnCoordinator._quarantineAndCloseExactSource has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 3 (9 pts), boolean chains 3, loops 1 (3 pts), ternaries 1 (3 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 · WsClient.submitPrompt (cognitive 29) · ×1
  • WsClient.submitPrompt (cognitive 29) lib/core/services/ws_client.dart:967 — WsClient.submitPrompt has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 7, error handling 2 (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 · _DelegatedTaskTimelineState.build (cognitive 29) · ×1
  • _DelegatedTaskTimelineState.build (cognitive 29) lib/core/widgets/delegated_task_timeline.dart:97 — _DelegatedTaskTimelineState.build has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 8, 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 · VoiceRecordingControls.build (cognitive 29) · ×1
  • VoiceRecordingControls.build (cognitive 29) lib/core/widgets/voice_recording_controls.dart:19 — VoiceRecordingControls.build has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 11 (18 pts), if/else 6, boolean chains 5 (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 · NormalGatewayPersistedTurn.fromWire (cognitive 28) · ×1
  • NormalGatewayPersistedTurn.fromWire (cognitive 28) lib/core/models/normal_gateway_persisted_turn.dart:21 — NormalGatewayPersistedTurn.fromWire has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 20, if/else 6 (7 pts), loops 1 (nesting depth added 1). 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 · _ModelManagementScreenState._applyModel (cognitive 28) · ×1
  • _ModelManagementScreenState._applyModel (cognitive 28) lib/core/screens/model_management_screen.dart:216 — _ModelManagementScreenState._applyModel has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 11, 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 · DesktopGatewayClient.respondToClarify (cognitive 28) · ×1
  • DesktopGatewayClient.respondToClarify (cognitive 28) lib/core/services/desktop_gateway_client.dart:1242 — DesktopGatewayClient.respondToClarify has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 7, ternaries 3 (5 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 · LocalVoiceRecorder._recoverContinuation (cognitive 28) · ×1
  • LocalVoiceRecorder._recoverContinuation (cognitive 28) lib/core/services/local_voice_recorder.dart:141 — LocalVoiceRecorder._recoverContinuation has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 6 (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 · RemoteFilesClient._downloadUrl (cognitive 28) · ×1
  • RemoteFilesClient._downloadUrl (cognitive 28) lib/core/services/remote_files_client.dart:262 — RemoteFilesClient._downloadUrl has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _AdoptProjectFolderSheetState.build (cognitive 28) · ×1
  • _AdoptProjectFolderSheetState.build (cognitive 28) lib/core/widgets/adopt_project_folder_sheet.dart:177 — _AdoptProjectFolderSheetState.build has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 1 (5 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · WorkspaceSessionsScreenState._loadOnce (cognitive 27) · ×1
  • WorkspaceSessionsScreenState._loadOnce (cognitive 27) lib/core/screens/workspace_sessions_screen.dart:892 — WorkspaceSessionsScreenState._loadOnce has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 7 (9 pts), boolean chains 7, 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 · ConnectionManager.initialize (cognitive 27) · ×1
  • ConnectionManager.initialize (cognitive 27) lib/core/services/connection_manager.dart:224 — ConnectionManager.initialize has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (8 pts), loops 2 (4 pts), boolean chains 2, error handling 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 · GatewayProbe.probe (cognitive 27) · ×1
  • GatewayProbe.probe (cognitive 27) lib/core/services/hermes_sign_in.dart:651 — GatewayProbe.probe has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 7, error handling 4 (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 · LanDiscoveryService.candidateHosts (cognitive 27) · ×1
  • LanDiscoveryService.candidateHosts (cognitive 27) lib/core/services/lan_discovery_service.dart:181 — LanDiscoveryService.candidateHosts has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 10, loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MobilePushService._drain (cognitive 27) · ×1
  • MobilePushService._drain (cognitive 27) lib/core/services/mobile_push_service.dart:402 — MobilePushService._drain has cognitive complexity 27 (threshold 15). Drivers by points: if/else 4 (14 pts), boolean chains 6, error handling 2 (6 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _AuxiliaryTaskState.build (cognitive 27) · ×1
  • _AuxiliaryTaskState.build (cognitive 27) lib/core/widgets/auxiliary_models.dart:238 — _AuxiliaryTaskState.build has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 6 (10 pts), boolean chains 4 (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 · _FallbackModelsState._row (cognitive 27) · ×1
  • _FallbackModelsState._row (cognitive 27) lib/core/widgets/fallback_models.dart:280 — _FallbackModelsState._row has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 7 (11 pts), boolean chains 8, if/else 6 (8 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 · _GatewayClarifyDialogState.build (cognitive 27) · ×1
  • _GatewayClarifyDialogState.build (cognitive 27) lib/core/widgets/gateway_clarify_dialog.dart:114 — _GatewayClarifyDialogState.build has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 10 (19 pts), if/else 4, boolean chains 2, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GatewaySubagentCard.build (cognitive 27) · ×1
  • GatewaySubagentCard.build (cognitive 27) lib/core/widgets/gateway_insight_card.dart:149 — GatewaySubagentCard.build has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 17 (24 pts), if/else 1 (2 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 · Profile.policy (cognitive 27) · ×1
  • Profile.policy (cognitive 27) server/mobile-push/mobile_push/config.py:127 — Profile.policy has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 9, loops 2, error handling 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 · _ChatScreenState._buildDisplayItem (cognitive 26) · ×1
  • _ChatScreenState._buildDisplayItem (cognitive 26) lib/core/screens/chat_screen.dart:7892 — _ChatScreenState._buildDisplayItem has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 6 (7 pts), boolean chains 6 (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 · _ModelManagementScreenState._parseModelOptions (cognitive 26) · ×1
  • _ModelManagementScreenState._parseModelOptions (cognitive 26) lib/core/screens/model_management_screen.dart:118 — _ModelManagementScreenState._parseModelOptions has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 9, 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 · NormalGatewayChatOwner._boundSettledPresentation (cognitive 26) · ×1
  • NormalGatewayChatOwner._boundSettledPresentation (cognitive 26) lib/core/services/normal_gateway_application_session.dart:1204 — NormalGatewayChatOwner._boundSettledPresentation has cognitive complexity 26 (threshold 15). Drivers by points: loops 9 (12 pts), if/else 5 (10 pts), boolean chains 4 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · SessionArchiveLedger.apply (cognitive 26) · ×1
  • SessionArchiveLedger.apply (cognitive 26) lib/core/services/session_archive_ledger.dart:60 — SessionArchiveLedger.apply has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 4 (7 pts), loops 4 (6 pts), boolean chains 4 (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 · ActivityPaneState.build (cognitive 26) · ×1
  • ActivityPaneState.build (cognitive 26) lib/core/widgets/activity_pane.dart:199 — ActivityPaneState.build has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 8 (15 pts), if/else 6 (7 pts), boolean chains 2, 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 · Store.events (cognitive 26) · ×1
  • Store.events (cognitive 26) server/mobile-push/mobile_push/store.py:442 — Store.events has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · transport.validate_endpoint (cognitive 26) · ×1
  • transport.validate_endpoint (cognitive 26) server/mobile-push/mobile_push/transport.py:49 — transport.validate_endpoint has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 10, error handling 1, loops 1, 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 · HermesAppState._onMobilePushChanged (cognitive 25) · ×1
  • HermesAppState._onMobilePushChanged (cognitive 25) lib/main.dart:698 — HermesAppState._onMobilePushChanged has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 8, loops 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ChatScreenState._canStartHandsFree (cognitive 25) · ×1
  • _ChatScreenState._canStartHandsFree (cognitive 25) lib/core/screens/chat_screen.dart:2272 — _ChatScreenState._canStartHandsFree has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 25. 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 · _ChatScreenState._startVoiceInput (cognitive 25) · ×1
  • _ChatScreenState._startVoiceInput (cognitive 25) lib/core/screens/chat_screen.dart:2590 — _ChatScreenState._startVoiceInput has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, if/else 5 (10 pts), error handling 1 (2 pts) (nesting depth added 6). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WorkspaceSessionsScreenState._rename (cognitive 25) · ×1
  • WorkspaceSessionsScreenState._rename (cognitive 25) lib/core/screens/workspace_sessions_screen.dart:1123 — WorkspaceSessionsScreenState._rename has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 7, 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 · AppReleaseApk.parse (cognitive 25) · ×1
  • AppReleaseApk.parse (cognitive 25) lib/core/services/app_update_service.dart:76 — AppReleaseApk.parse has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 21, if/else 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 · HermesSignIn.browserSignIn (cognitive 25) · ×1
  • HermesSignIn.browserSignIn (cognitive 25) lib/core/services/hermes_sign_in.dart:851 — HermesSignIn.browserSignIn has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 5, error handling 3 (5 pts), ternaries 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NormalGatewayApplicationSession._coalesce (cognitive 25) · ×1
  • NormalGatewayApplicationSession._coalesce (cognitive 25) lib/core/services/normal_gateway_application_session.dart:383 — NormalGatewayApplicationSession._coalesce has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 7, loops 3 (4 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 · HermesAppState._handleNotificationResponse (cognitive 24) · ×1
  • HermesAppState._handleNotificationResponse (cognitive 24) lib/main.dart:774 — HermesAppState._handleNotificationResponse has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 9, ternaries 3 (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 · HomeScreenState._showDashboardAuthDialog (cognitive 24) · ×1
  • HomeScreenState._showDashboardAuthDialog (cognitive 24) lib/main.dart:1891 — HomeScreenState._showDashboardAuthDialog has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 5, boolean chains 2, error handling 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 · _ChatScreenState._handleDesktopAsyncEvent (cognitive 24) · ×1
  • _ChatScreenState._handleDesktopAsyncEvent (cognitive 24) lib/core/screens/chat_screen.dart:5672 — _ChatScreenState._handleDesktopAsyncEvent has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (19 pts), loops 1 (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 · _WorkspaceScreenState._startSharedChat (cognitive 24) · ×1
  • _WorkspaceScreenState._startSharedChat (cognitive 24) lib/core/screens/workspace_screen.dart:832 — _WorkspaceScreenState._startSharedChat has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 3 (4 pts), ternaries 2 (4 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 · AttachmentDraftService.prepareImage (cognitive 24) · ×1
  • AttachmentDraftService.prepareImage (cognitive 24) lib/core/services/attachment_draft_service.dart:150 — AttachmentDraftService.prepareImage has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 3 (6 pts), boolean chains 3, 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 · ConfigBackupService.import (cognitive 24) · ×1
  • ConfigBackupService.import (cognitive 24) lib/core/services/config_backup_service.dart:147 — ConfigBackupService.import has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 3 (4 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 · GatewayTurnCoordinator.stageAttachment (cognitive 24) · ×1
  • GatewayTurnCoordinator.stageAttachment (cognitive 24) lib/core/services/gateway_turn_coordinator.dart:768 — GatewayTurnCoordinator.stageAttachment has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (8 pts), error handling 2 (4 pts), ternaries 3 (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 · GatewayTurnRecoveryState.applyEvent (cognitive 24) · ×1
  • GatewayTurnRecoveryState.applyEvent (cognitive 24) lib/core/services/gateway_turn_recovery.dart:266 — GatewayTurnRecoveryState.applyEvent has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 6, ternaries 3 (4 pts) (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 · MobilePushService._events (cognitive 24) · ×1
  • MobilePushService._events (cognitive 24) lib/core/services/mobile_push_service.dart:660 — MobilePushService._events has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 7, 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 · DashboardProjectFolderDiscovery.scan (cognitive 24) · ×1
  • DashboardProjectFolderDiscovery.scan (cognitive 24) lib/core/services/project_folder_discovery.dart:107 — DashboardProjectFolderDiscovery.scan has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 3 (6 pts), loops 3 (4 pts), boolean chains 2, error handling 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 · ProjectsRepository.overview (cognitive 24) · ×1
  • ProjectsRepository.overview (cognitive 24) lib/core/services/projects_repository.dart:349 — ProjectsRepository.overview has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 3, error handling 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 · _ChatScreenState._loadOlderMessages (cognitive 23) · ×1
  • _ChatScreenState._loadOlderMessages (cognitive 23) lib/core/screens/chat_screen.dart:3271 — _ChatScreenState._loadOlderMessages has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (9 pts), ternaries 2, 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 · _ChatScreenState._drainSensitivePromptQueue (cognitive 23) · ×1
  • _ChatScreenState._drainSensitivePromptQueue (cognitive 23) lib/core/screens/chat_screen.dart:6210 — _ChatScreenState._drainSensitivePromptQueue has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, if/else 6, match/switch 2 (4 pts), error handling 1 (2 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 · _ChatScreenState._drainClarifyPromptQueue (cognitive 23) · ×1
  • _ChatScreenState._drainClarifyPromptQueue (cognitive 23) lib/core/screens/chat_screen.dart:6416 — _ChatScreenState._drainClarifyPromptQueue has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 12, if/else 7 (9 pts), error handling 1 (2 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 · _ChatScreenState._stopRecoverableGatewayResponse (cognitive 23) · ×1
  • _ChatScreenState._stopRecoverableGatewayResponse (cognitive 23) lib/core/screens/chat_screen.dart:6510 — _ChatScreenState._stopRecoverableGatewayResponse has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 6, 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 · _SessionListScreenState._showAiModelSelector (cognitive 23) · ×1
  • _SessionListScreenState._showAiModelSelector (cognitive 23) lib/core/screens/session_list_screen.dart:335 — _SessionListScreenState._showAiModelSelector has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 3 (6 pts), boolean chains 3, 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 · DashboardClient.apiDownloadToFile (cognitive 23) · ×1
  • DashboardClient.apiDownloadToFile (cognitive 23) lib/core/services/connection_manager.dart:3015 — DashboardClient.apiDownloadToFile has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 1 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GatewayTurnCoordinator._recoverJournal (cognitive 23) · ×1
  • GatewayTurnCoordinator._recoverJournal (cognitive 23) lib/core/services/gateway_turn_coordinator.dart:1121 — GatewayTurnCoordinator._recoverJournal has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 1 (4 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GatewayTurnRecoveryState.applyReconcilePage (cognitive 23) · ×1
  • GatewayTurnRecoveryState.applyReconcilePage (cognitive 23) lib/core/services/gateway_turn_recovery.dart:346 — GatewayTurnRecoveryState.applyReconcilePage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 8, ternaries 2 (3 pts), 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.
D2 · Cognitive Complexity · _UpdateAvailableDialogState._update (cognitive 23) · ×1
  • _UpdateAvailableDialogState._update (cognitive 23) lib/core/widgets/update_available_dialog.dart:192 — _UpdateAvailableDialogState._update has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, error handling 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 · _ChatScreenState.initState (cognitive 22) · ×1
  • _ChatScreenState.initState (cognitive 22) lib/core/screens/chat_screen.dart:930 — _ChatScreenState.initState has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11, boolean chains 7, error handling 1 (2 pts), ternaries 2 (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 · _ChatScreenState._readAssistantText (cognitive 22) · ×1
  • _ChatScreenState._readAssistantText (cognitive 22) lib/core/screens/chat_screen.dart:2657 — _ChatScreenState._readAssistantText has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 9, 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 · _ChatScreenState._pickFiles (cognitive 22) · ×1
  • _ChatScreenState._pickFiles (cognitive 22) lib/core/screens/chat_screen.dart:3977 — _ChatScreenState._pickFiles has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MessageBubble._renderContent (cognitive 22) · ×1
  • MessageBubble._renderContent (cognitive 22) lib/core/screens/chat_screen.dart:8588 — MessageBubble._renderContent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 5 (7 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 · WorkspaceSessionsScreenState._promote (cognitive 22) · ×1
  • WorkspaceSessionsScreenState._promote (cognitive 22) lib/core/screens/workspace_sessions_screen.dart:1196 — WorkspaceSessionsScreenState._promote has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6, 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 · AppUpdateService.checkForUpdate (cognitive 22) · ×1
  • AppUpdateService.checkForUpdate (cognitive 22) lib/core/services/app_update_service.dart:271 — AppUpdateService.checkForUpdate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (5 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.
D2 · Cognitive Complexity · AttachmentController._streamLarge (cognitive 22) · ×1
  • AttachmentController._streamLarge (cognitive 22) lib/core/services/attachment_controller.dart:159 — AttachmentController._streamLarge has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AttachmentController.share (cognitive 22) · ×1
  • AttachmentController.share (cognitive 22) lib/core/services/attachment_controller.dart:264 — AttachmentController.share has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 3, 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 · AttachmentDraftService._detectImageFormat (cognitive 22) · ×1
  • AttachmentDraftService._detectImageFormat (cognitive 22) lib/core/services/attachment_draft_service.dart:552 — AttachmentDraftService._detectImageFormat has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 19, if/else 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 · ComposerDraftWriter.read (cognitive 22) · ×1
  • ComposerDraftWriter.read (cognitive 22) lib/core/services/chat_presentation_state.dart:280 — ComposerDraftWriter.read has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClientCertificateService.importIdentityDocument (cognitive 22) · ×1
  • ClientCertificateService.importIdentityDocument (cognitive 22) lib/core/services/client_certificate_service.dart:223 — ClientCertificateService.importIdentityDocument has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 9 (12 pts), boolean chains 5, if/else 5 (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 · ConnectionKeepAliveService.start (cognitive 22) · ×1
  • ConnectionKeepAliveService.start (cognitive 22) lib/core/services/connection_keepalive_service.dart:27 — ConnectionKeepAliveService.start has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, error handling 2 (4 pts), loops 1 (2 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 · GatewayTurnCoordinator.interrupt (cognitive 22) · ×1
  • GatewayTurnCoordinator.interrupt (cognitive 22) lib/core/services/gateway_turn_coordinator.dart:896 — GatewayTurnCoordinator.interrupt has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 13, if/else 6 (8 pts), error handling 1 (nesting depth added 2). 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 · GatewayTurnCoordinator._openFreshTransport (cognitive 22) · ×1
  • GatewayTurnCoordinator._openFreshTransport (cognitive 22) lib/core/services/gateway_turn_coordinator.dart:978 — GatewayTurnCoordinator._openFreshTransport has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 2 (3 pts), ternaries 2 (3 pts), 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 · GatewayTurnJournalEntry.GatewayTurnJournalEntry (cognitive 22) · ×1
  • GatewayTurnJournalEntry.GatewayTurnJournalEntry (cognitive 22) lib/core/services/gateway_turn_journal.dart:212 — GatewayTurnJournalEntry.GatewayTurnJournalEntry has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 21, if/else 1. 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 · HermesSignInVault.sessionForRequest (cognitive 22) · ×1
  • HermesSignInVault.sessionForRequest (cognitive 22) lib/core/services/hermes_sign_in.dart:488 — HermesSignInVault.sessionForRequest has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (9 pts), if/else 4 (8 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 · SessionBrowserLoader._scan (cognitive 22) · ×1
  • SessionBrowserLoader._scan (cognitive 22) lib/core/services/session_browser_loader.dart:104 — SessionBrowserLoader._scan has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (3 pts), ternaries 1 (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 · HermesAppState._drainPushRoutes (cognitive 21) · ×1
  • HermesAppState._drainPushRoutes (cognitive 21) lib/main.dart:737 — HermesAppState._drainPushRoutes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 7, loops 1 (2 pts), 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 · VoiceRecordingController.send (cognitive 21) · ×1
  • VoiceRecordingController.send (cognitive 21) lib/core/controllers/voice_recording_controller.dart:198 — VoiceRecordingController.send has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 6, error handling 2 (4 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 · SlashCommandCatalog._pairs (cognitive 21) · ×1
  • SlashCommandCatalog._pairs (cognitive 21) lib/core/models/slash_command.dart:263 — SlashCommandCatalog._pairs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ChatScreenState._gatewayAssistantMessageIndex (cognitive 21) · ×1
  • _ChatScreenState._gatewayAssistantMessageIndex (cognitive 21) lib/core/screens/chat_screen.dart:3575 — _ChatScreenState._gatewayAssistantMessageIndex has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 3 (4 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 · _SessionListScreenState._branchSession (cognitive 21) · ×1
  • _SessionListScreenState._branchSession (cognitive 21) lib/core/screens/session_list_screen.dart:725 — _SessionListScreenState._branchSession has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5, 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 · ChatPresentationRegistry.bind (cognitive 21) · ×1
  • ChatPresentationRegistry.bind (cognitive 21) lib/core/services/chat_presentation_state.dart:30 — ChatPresentationRegistry.bind has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, loops 1 (2 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 · DashboardApiClient.getModels (cognitive 21) · ×1
  • DashboardApiClient.getModels (cognitive 21) lib/core/services/dashboard_api_client.dart:420 — DashboardApiClient.getModels has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 1 (3 pts), ternaries 1 (2 pts), 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 · NormalGatewayChatOwner._reconcilePersistedTurns (cognitive 21) · ×1
  • NormalGatewayChatOwner._reconcilePersistedTurns (cognitive 21) lib/core/services/normal_gateway_application_session.dart:1080 — NormalGatewayChatOwner._reconcilePersistedTurns has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, loops 4, 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 · NormalGatewayChatOwner._recordActivity (cognitive 21) · ×1
  • NormalGatewayChatOwner._recordActivity (cognitive 21) lib/core/services/normal_gateway_application_session.dart:1388 — NormalGatewayChatOwner._recordActivity has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 4 (5 pts), ternaries 3, match/switch 1 (nesting depth added 1). 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 · NormalGatewayChatOwner._completionAssistantMessage (cognitive 21) · ×1
  • NormalGatewayChatOwner._completionAssistantMessage (cognitive 21) lib/core/services/normal_gateway_application_session.dart:2289 — NormalGatewayChatOwner._completionAssistantMessage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 7, ternaries 1 (3 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 · QuickChatStore.load (cognitive 21) · ×1
  • QuickChatStore.load (cognitive 21) lib/core/services/quick_chat_store.dart:105 — QuickChatStore.load has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 5, loops 2 (4 pts), 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 · AiSearchModel.configuredFromOptions (cognitive 21) · ×1
  • AiSearchModel.configuredFromOptions (cognitive 21) lib/core/services/session_search_preferences.dart:43 — AiSearchModel.configuredFromOptions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (5 pts), ternaries 3, 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 · _ProjectDetailScreenState.build (cognitive 21) · ×1
  • _ProjectDetailScreenState.build (cognitive 21) lib/core/widgets/project_detail_screen.dart:394 — _ProjectDetailScreenState.build has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, match/switch 1 (3 pts), 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 · _SpaceMigrationPreviewState.build (cognitive 21) · ×1
  • _SpaceMigrationPreviewState.build (cognitive 21) lib/core/widgets/space_migration_preview.dart:74 — _SpaceMigrationPreviewState.build has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 7 (9 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MainActivity.configureFlutterEngine (cognitive 21) · ×1
  • MainActivity.configureFlutterEngine (cognitive 21) android/app/src/main/kotlin/com/hermesagent/hermes_android/MainActivity.kt:40 — MainActivity.configureFlutterEngine has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (17 pts), match/switch 3, 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 · Runtime.deliver_one (cognitive 21) · ×1
  • Runtime.deliver_one (cognitive 21) server/mobile-push/mobile_push/service.py:56 — Runtime.deliver_one has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, error handling 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ChatScreenState._setSessionArchived (cognitive 20) · ×1
  • _ChatScreenState._setSessionArchived (cognitive 20) lib/core/screens/chat_screen.dart:2039 — _ChatScreenState._setSessionArchived has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, ternaries 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 · _ChatScreenState._preparePickedImages (cognitive 20) · ×1
  • _ChatScreenState._preparePickedImages (cognitive 20) lib/core/screens/chat_screen.dart:3930 — _ChatScreenState._preparePickedImages has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (6 pts), error handling 2 (4 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ChatScreenState._completionAssistantMessage (cognitive 20) · ×1
  • _ChatScreenState._completionAssistantMessage (cognitive 20) lib/core/screens/chat_screen.dart:5605 — _ChatScreenState._completionAssistantMessage has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, ternaries 1 (3 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 · _SessionListScreenState._loadMoreSessions (cognitive 20) · ×1
  • _SessionListScreenState._loadMoreSessions (cognitive 20) lib/core/screens/session_list_screen.dart:1123 — _SessionListScreenState._loadMoreSessions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 8, 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 · WorkspaceSessionsScreenState._applyData (cognitive 20) · ×1
  • WorkspaceSessionsScreenState._applyData (cognitive 20) lib/core/screens/workspace_sessions_screen.dart:968 — WorkspaceSessionsScreenState._applyData has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (7 pts), ternaries 2 (4 pts), loops 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 · AttachmentController._fetch (cognitive 20) · ×1
  • AttachmentController._fetch (cognitive 20) lib/core/services/attachment_controller.dart:114 — AttachmentController._fetch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, ternaries 1 (2 pts), 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 · GatewayChatClient.buildChatCompletionMessages (cognitive 20) · ×1
  • GatewayChatClient.buildChatCompletionMessages (cognitive 20) lib/core/services/connection_manager.dart:1949 — GatewayChatClient.buildChatCompletionMessages has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (6 pts), ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 5). 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 · DashboardClient.apiGetBytes (cognitive 20) · ×1
  • DashboardClient.apiGetBytes (cognitive 20) lib/core/services/connection_manager.dart:2877 — DashboardClient.apiGetBytes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 1 (3 pts), 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 · DashboardTaskHistory._isCompressionEdge (cognitive 20) · ×1
  • DashboardTaskHistory._isCompressionEdge (cognitive 20) lib/core/services/delegated_task_history.dart:310 — DashboardTaskHistory._isCompressionEdge has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 16, if/else 2, ternaries 2. 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 · ProjectsRepository.refresh (cognitive 20) · ×1
  • ProjectsRepository.refresh (cognitive 20) lib/core/services/projects_repository.dart:297 — ProjectsRepository.refresh has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 3 (6 pts), ternaries 2 (4 pts), error handling 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 · MobilePushPolicy.valid (cognitive 20) · ×1
  • MobilePushPolicy.valid (cognitive 20) android/app/src/main/kotlin/com/hermesagent/hermes_android/MobilePushPolicy.kt:20 — MobilePushPolicy.valid has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, if/else 9. 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 · HomeScreenState._showApiKeyDialog (cognitive 19) · ×1
  • HomeScreenState._showApiKeyDialog (cognitive 19) lib/main.dart:1756 — HomeScreenState._showApiKeyDialog has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 3, error handling 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 · BackgroundReport._isPreservedTaskList (cognitive 19) · ×1
  • BackgroundReport._isPreservedTaskList (cognitive 19) lib/core/models/background_report.dart:143 — BackgroundReport._isPreservedTaskList has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (4 pts), loops 2 (3 pts), match/switch 1 (3 pts) (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 · GatewayApprovalRequest.fromEventData (cognitive 19) · ×1
  • GatewayApprovalRequest.fromEventData (cognitive 19) lib/core/models/gateway_approval.dart:49 — GatewayApprovalRequest.fromEventData has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 5, ternaries 5, loops 1 (2 pts) (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 · _CronScreenState._buildBody (cognitive 19) · ×1
  • _CronScreenState._buildBody (cognitive 19) lib/core/screens/cron_screen.dart:641 — _CronScreenState._buildBody has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, ternaries 5, 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 · _SessionListScreenState._renameSession (cognitive 19) · ×1
  • _SessionListScreenState._renameSession (cognitive 19) lib/core/screens/session_list_screen.dart:683 — _SessionListScreenState._renameSession has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (2 pts), 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 · _SessionListScreenState._archiveSession (cognitive 19) · ×1
  • _SessionListScreenState._archiveSession (cognitive 19) lib/core/screens/session_list_screen.dart:843 — _SessionListScreenState._archiveSession has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WorkspaceSessionsScreenState._setPinned (cognitive 19) · ×1
  • WorkspaceSessionsScreenState._setPinned (cognitive 19) lib/core/screens/workspace_sessions_screen.dart:1337 — WorkspaceSessionsScreenState._setPinned has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5, 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 · AppUpdateService.parseRelease (cognitive 19) · ×1
  • AppUpdateService.parseRelease (cognitive 19) lib/core/services/app_update_service.dart:411 — AppUpdateService.parseRelease has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 1 (2 pts), error handling 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 · ComposerDraftStore.removeConnection (cognitive 19) · ×1
  • ComposerDraftStore.removeConnection (cognitive 19) lib/core/services/composer_draft_store.dart:318 — ComposerDraftStore.removeConnection has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 2 (6 pts), loops 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConnectionManager.updateConnection (cognitive 19) · ×1
  • ConnectionManager.updateConnection (cognitive 19) lib/core/services/connection_manager.dart:629 — ConnectionManager.updateConnection has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, ternaries 6, if/else 1. 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 · HermesSignInVault.refresh (cognitive 19) · ×1
  • HermesSignInVault.refresh (cognitive 19) lib/core/services/hermes_sign_in.dart:562 — HermesSignInVault.refresh has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, error handling 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 · SharedSessionScan.load (cognitive 19) · ×1
  • SharedSessionScan.load (cognitive 19) lib/core/services/session_browser_loader.dart:19 — SharedSessionScan.load has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, loops 1 (2 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 · _AuxiliaryModelsState._apply (cognitive 19) · ×1
  • _AuxiliaryModelsState._apply (cognitive 19) lib/core/widgets/auxiliary_models.dart:121 — _AuxiliaryModelsState._apply has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 7, 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 · ChatAttentionSection.build (cognitive 19) · ×1
  • ChatAttentionSection.build (cognitive 19) lib/core/widgets/chat_attention_section.dart:28 — ChatAttentionSection.build has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (12 pts), if/else 2 (3 pts), loops 2 (3 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 · _UpdateAvailableDialogState.build (cognitive 19) · ×1
  • _UpdateAvailableDialogState.build (cognitive 19) lib/core/widgets/update_available_dialog.dart:110 — _UpdateAvailableDialogState.build has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (10 pts), if/else 7, boolean chains 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.
D2 · Cognitive Complexity · _AddDialogState._importCertificate (cognitive 18) · ×1
  • _AddDialogState._importCertificate (cognitive 18) lib/main.dart:2748 — _AddDialogState._importCertificate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), 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 · HandsFreeConversationController._submit (cognitive 18) · ×1
  • HandsFreeConversationController._submit (cognitive 18) lib/core/controllers/hands_free_conversation_controller.dart:537 — HandsFreeConversationController._submit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, match/switch 2 (4 pts), boolean chains 3 (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 · VoiceRecordingController.resumeRecording (cognitive 18) · ×1
  • VoiceRecordingController.resumeRecording (cognitive 18) lib/core/controllers/voice_recording_controller.dart:114 — VoiceRecordingController.resumeRecording has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6, 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 · _ChatScreenState._parseModelChoices (cognitive 18) · ×1
  • _ChatScreenState._parseModelChoices (cognitive 18) lib/core/screens/chat_screen.dart:4255 — _ChatScreenState._parseModelChoices has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (6 pts), loops 2 (3 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 · _SessionListScreenState._fetchSessions (cognitive 18) · ×1
  • _SessionListScreenState._fetchSessions (cognitive 18) lib/core/screens/session_list_screen.dart:1027 — _SessionListScreenState._fetchSessions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, 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 · ChatHistoryWindow.fetchRecent (cognitive 18) · ×1
  • ChatHistoryWindow.fetchRecent (cognitive 18) lib/core/services/chat_history_window.dart:36 — ChatHistoryWindow.fetchRecent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 6, error handling 1 (3 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConnectionManager.saveSingleLoginConnection (cognitive 18) · ×1
  • ConnectionManager.saveSingleLoginConnection (cognitive 18) lib/core/services/connection_manager.dart:542 — ConnectionManager.saveSingleLoginConnection has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 10, boolean chains 6, if/else 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 · ApiClient.setSessionArchived (cognitive 18) · ×1
  • ApiClient.setSessionArchived (cognitive 18) lib/core/services/connection_manager.dart:1498 — ApiClient.setSessionArchived has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 6, ternaries 1. 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 · GatewayTurnCoordinator._handleLiveEvent (cognitive 18) · ×1
  • GatewayTurnCoordinator._handleLiveEvent (cognitive 18) lib/core/services/gateway_turn_coordinator.dart:1279 — GatewayTurnCoordinator._handleLiveEvent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, 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 · VoicePlatformEvent.parse (cognitive 18) · ×1
  • VoicePlatformEvent.parse (cognitive 18) lib/core/services/hands_free_voice_platform.dart:128 — VoicePlatformEvent.parse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6, match/switch 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 · MobilePushService.checkAvailability (cognitive 18) · ×1
  • MobilePushService.checkAvailability (cognitive 18) lib/core/services/mobile_push_service.dart:335 — MobilePushService.checkAvailability has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, ternaries 2 (4 pts), if/else 2 (3 pts), error handling 1 (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 · NormalGatewayChatOwner.steer (cognitive 18) · ×1
  • NormalGatewayChatOwner.steer (cognitive 18) lib/core/services/normal_gateway_application_session.dart:1530 — NormalGatewayChatOwner.steer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, 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 · MobilePushBridge.receive (cognitive 18) · ×1
  • MobilePushBridge.receive (cognitive 18) android/app/src/main/kotlin/com/hermesagent/hermes_android/MobilePushBridge.kt:379 — MobilePushBridge.receive has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, loops 1 (2 pts) (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 · HermesAppState._syncOngoingChats (cognitive 17) · ×1
  • HermesAppState._syncOngoingChats (cognitive 17) lib/main.dart:595 — HermesAppState._syncOngoingChats has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 3, loops 3, error handling 1 (2 pts) (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 · VoiceRecordingController.start (cognitive 17) · ×1
  • VoiceRecordingController.start (cognitive 17) lib/core/controllers/voice_recording_controller.dart:55 — VoiceRecordingController.start has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, 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 · ChatTimeline.reasoning (cognitive 17) · ×1
  • ChatTimeline.reasoning (cognitive 17) lib/core/models/chat_timeline.dart:242 — ChatTimeline.reasoning has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 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 · ChatTimeline.textSnapshot (cognitive 17) · ×1
  • ChatTimeline.textSnapshot (cognitive 17) lib/core/models/chat_timeline.dart:344 — ChatTimeline.textSnapshot has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 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 · _ChatScreenState._queuePersistedHistoryContext (cognitive 17) · ×1
  • _ChatScreenState._queuePersistedHistoryContext (cognitive 17) lib/core/screens/chat_screen.dart:1414 — _ChatScreenState._queuePersistedHistoryContext has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 13, if/else 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 · _ChatScreenState._recoverPendingTurn (cognitive 17) · ×1
  • _ChatScreenState._recoverPendingTurn (cognitive 17) lib/core/screens/chat_screen.dart:3404 — _ChatScreenState._recoverPendingTurn has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, loops 1 (2 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 · _ChatScreenState._cancelGatewayServerRequest (cognitive 17) · ×1
  • _ChatScreenState._cancelGatewayServerRequest (cognitive 17) lib/core/screens/chat_screen.dart:6327 — _ChatScreenState._cancelGatewayServerRequest has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4 (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 · _WorkspaceScreenState._startNewChat (cognitive 17) · ×1
  • _WorkspaceScreenState._startNewChat (cognitive 17) lib/core/screens/workspace_screen.dart:1449 — _WorkspaceScreenState._startNewChat has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, error handling 1 (2 pts), 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 · ChatSpaceStore._readState (cognitive 17) · ×1
  • ChatSpaceStore._readState (cognitive 17) lib/core/services/chat_space_store.dart:136 — ChatSpaceStore._readState has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, loops 1 (2 pts), error handling 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 · ConfigBackupService.export (cognitive 17) · ×1
  • ConfigBackupService.export (cognitive 17) lib/core/services/config_backup_service.dart:98 — ConfigBackupService.export has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, error handling 1 (2 pts), loops 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 · GatewayTurnJournal._readCurrentAfterLegacyPurge (cognitive 17) · ×1
  • GatewayTurnJournal._readCurrentAfterLegacyPurge (cognitive 17) lib/core/services/gateway_turn_journal.dart:824 — GatewayTurnJournal._readCurrentAfterLegacyPurge has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 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 · MobilePushService._current (cognitive 17) · ×1
  • MobilePushService._current (cognitive 17) lib/core/services/mobile_push_service.dart:439 — MobilePushService._current has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 12, if/else 4, error handling 1. 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 · NormalGatewayApplicationSession._restore (cognitive 17) · ×1
  • NormalGatewayApplicationSession._restore (cognitive 17) lib/core/services/normal_gateway_application_session.dart:466 — NormalGatewayApplicationSession._restore has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 3 (6 pts), loops 2 (5 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 · NormalGatewayApplicationSession._drainRetirements (cognitive 17) · ×1
  • NormalGatewayApplicationSession._drainRetirements (cognitive 17) lib/core/services/normal_gateway_application_session.dart:562 — NormalGatewayApplicationSession._drainRetirements has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), error handling 1 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DashboardFolderProvisioner.provision (cognitive 17) · ×1
  • DashboardFolderProvisioner.provision (cognitive 17) lib/core/services/project_folder_provisioner.dart:99 — DashboardFolderProvisioner.provision has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 1 (2 pts), match/switch 1 (2 pts), ternaries 1 (2 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 · HomePaneState._load (cognitive 17) · ×1
  • HomePaneState._load (cognitive 17) lib/core/widgets/home_pane.dart:133 — HomePaneState._load has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, ternaries 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 · _AddDialogState._pickCertificateFiles (cognitive 16) · ×1
  • _AddDialogState._pickCertificateFiles (cognitive 16) lib/main.dart:2564 — _AddDialogState._pickCertificateFiles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), ternaries 2 (4 pts), loops 1 (2 pts), 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 · VoiceComposerController._handleResult (cognitive 16) · ×1
  • VoiceComposerController._handleResult (cognitive 16) lib/core/controllers/voice_composer_controller.dart:144 — VoiceComposerController._handleResult has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 6 (7 pts), ternaries 2 (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 · GatewaySessionBinding.fromWire (cognitive 16) · ×1
  • GatewaySessionBinding.fromWire (cognitive 16) lib/core/models/gateway_turn_contract.dart:413 — GatewaySessionBinding.fromWire has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 13, if/else 2, ternaries 1. 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 · LegacyBackgroundMessage._isDelegationFailure (cognitive 16) · ×1
  • LegacyBackgroundMessage._isDelegationFailure (cognitive 16) lib/core/models/legacy_background_message.dart:287 — LegacyBackgroundMessage._isDelegationFailure has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, 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 · _AssetsScreenState._header (cognitive 16) · ×1
  • _AssetsScreenState._header (cognitive 16) lib/core/screens/assets_screen.dart:195 — _AssetsScreenState._header has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 3 (7 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _ChatScreenState._setSessionModel (cognitive 16) · ×1
  • _ChatScreenState._setSessionModel (cognitive 16) lib/core/screens/chat_screen.dart:4307 — _ChatScreenState._setSessionModel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 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 · _ProviderOAuthScreenState._poll (cognitive 16) · ×1
  • _ProviderOAuthScreenState._poll (cognitive 16) lib/core/screens/provider_oauth_screen.dart:250 — _ProviderOAuthScreenState._poll has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, match/switch 1 (2 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 · AiSearchQueryRewriter.rewrite (cognitive 16) · ×1
  • AiSearchQueryRewriter.rewrite (cognitive 16) lib/core/services/ai_search_query_rewriter.dart:34 — AiSearchQueryRewriter.rewrite has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, error handling 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 · DashboardSessionWrites.delete (cognitive 16) · ×1
  • DashboardSessionWrites.delete (cognitive 16) lib/core/services/dashboard_api_client.dart:157 — DashboardSessionWrites.delete has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 2, error handling 1 (2 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 · GatewayTurnJournal._compact (cognitive 16) · ×1
  • GatewayTurnJournal._compact (cognitive 16) lib/core/services/gateway_turn_journal.dart:672 — GatewayTurnJournal._compact has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7 (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 · GatewayTurnJournal._writeData (cognitive 16) · ×1
  • GatewayTurnJournal._writeData (cognitive 16) lib/core/services/gateway_turn_journal.dart:779 — GatewayTurnJournal._writeData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 2 (3 pts), boolean chains 2, 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 · GatewayTurnUiProjection.fromState (cognitive 16) · ×1
  • GatewayTurnUiProjection.fromState (cognitive 16) lib/core/services/gateway_turn_ui_projection.dart:41 — GatewayTurnUiProjection.fromState has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (5 pts), match/switch 1 (2 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 · LocalVoiceRecorder._discard (cognitive 16) · ×1
  • LocalVoiceRecorder._discard (cognitive 16) lib/core/services/local_voice_recorder.dart:243 — LocalVoiceRecorder._discard has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (15 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 · MobilePushService._message (cognitive 16) · ×1
  • MobilePushService._message (cognitive 16) lib/core/services/mobile_push_service.dart:775 — MobilePushService._message has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), 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 · _AttachmentVideoPreviewState.build (cognitive 16) · ×1
  • _AttachmentVideoPreviewState.build (cognitive 16) lib/core/widgets/attachment_video_preview.dart:205 — _AttachmentVideoPreviewState.build has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 10, boolean chains 4, if/else 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 · CronUpcomingPaneState.build (cognitive 16) · ×1
  • CronUpcomingPaneState.build (cognitive 16) lib/core/widgets/cron_upcoming_pane.dart:269 — CronUpcomingPaneState.build has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 2 (5 pts), loops 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 · ApkUpdateInstaller.download (cognitive 16) · ×1
  • ApkUpdateInstaller.download (cognitive 16) android/app/src/main/kotlin/com/hermesagent/hermes_android/ApkUpdateInstaller.kt:169 — ApkUpdateInstaller.download has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 6, 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.
D35 · Change Coupling · Change coupling · ×1
  • Change coupling: chat_screen.dart ↔ composer_draft_store.dart lib/core/screens/chat_screen.dart:1 — `lib/core/screens/chat_screen.dart` and `lib/core/services/composer_draft_store.dart` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `bc80e2f6` fix(chat): preserve paste recovery across submission handoff; `ab04b132` fix: reconcile late identity alias handoffs on Android v2.1.31; `f36a4073` fix: retain canonical chat view state across routes — run `git show` on any of them.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (67 shared lines) · ×1
  • Near-duplicate member pair (67 shared lines) lib/main.dart:1756 — lib/main.dart:1756-1889 | lib/main.dart:1891-2141 — These two members are variants of one another: 67 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 · Near-duplicate member pair (51 shared lines) · ×1
  • Near-duplicate member pair (51 shared lines) lib/core/widgets/config_backup_card.dart:62 — lib/core/widgets/config_backup_card.dart:62-143 | lib/core/widgets/config_backup_card.dart:178-270 — These two members are variants of one another: 51 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (59 corresponding lines) · ×1
  • Edited copy of a member (59 corresponding lines) lib/core/screens/chat_screen.dart:5605 — lib/core/screens/chat_screen.dart:5605-5663 | lib/core/services/normal_gateway_application_session.dart:2289-2348 — These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (49 corresponding lines) · ×1
  • Edited copy of a member (49 corresponding lines) lib/core/screens/workspace_sessions_screen.dart:1196 — lib/core/screens/workspace_sessions_screen.dart:1196-1244 | lib/core/screens/workspace_sessions_screen.dart:1264-1335 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (60 corresponding lines) · ×1
  • Edited copy of a member (60 corresponding lines) lib/core/widgets/activity_pane.dart:368 — lib/core/widgets/activity_pane.dart:368-427 | lib/core/widgets/home_pane.dart:365-427 — These two members are one piece of code written twice and then edited apart: 60 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 (46 corresponding lines) · ×1
  • Edited copy of a member (46 corresponding lines) lib/core/widgets/chat_density_settings_card.dart:91 — lib/core/widgets/chat_density_settings_card.dart:91-149 | lib/core/widgets/text_size_settings_card.dart:64-109 — These two members are one piece of code written twice and then edited apart: 46 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 (36 corresponding lines) · ×1
  • Edited copy of a member (36 corresponding lines) lib/core/controllers/voice_recording_controller.dart:55 — lib/core/controllers/voice_recording_controller.dart:55-90 | lib/core/controllers/voice_recording_controller.dart:114-156 — These two members are one piece of code written twice and then edited apart: 36 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 (37 corresponding lines) · ×1
  • Edited copy of a member (37 corresponding lines) lib/core/widgets/config_backup_card.dart:313 — lib/core/widgets/config_backup_card.dart:313-349 | lib/core/widgets/config_backup_card.dart:351-391 — These two members are one piece of code written twice and then edited apart: 37 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, 26+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 26+ corresponding lines) lib/core/models/hermes_project.dart:64 — lib/core/models/hermes_project.dart:64-92 | lib/core/models/project_sessions_tree.dart:148-173 | lib/core/models/projects_tree_overview.dart:106-136 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 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, 24+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 24+ corresponding lines) lib/core/services/composer_draft_store.dart:99 — lib/core/services/composer_draft_store.dart:99-124 | lib/core/services/normal_gateway_pending_store.dart:105-128 | lib/core/services/operational_activity_store.dart:128-152 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 25+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 25+ corresponding lines) lib/core/services/connection_manager.dart:2850 — lib/core/services/connection_manager.dart:2850-2875 | lib/core/services/connection_manager.dart:3279-3312 | lib/core/services/connection_manager.dart:3314-3338 | lib/core/services/connection_manager.dart:3340-3373 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 22+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 22+ corresponding lines) lib/core/widgets/project_detail_screen.dart:274 — lib/core/widgets/project_detail_screen.dart:274-295 | lib/core/widgets/project_detail_screen.dart:334-360 | lib/core/widgets/projects_pane.dart:235-261 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 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 (24 corresponding lines) · ×1
  • Edited copy of a member (24 corresponding lines) lib/core/widgets/activity_pane.dart:273 — lib/core/widgets/activity_pane.dart:273-299 | lib/core/widgets/home_pane.dart:274-297 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×1
  • Edited copy of a member (30 corresponding lines) lib/core/services/gateway_turn_coordinator.dart:947 — lib/core/services/gateway_turn_coordinator.dart:947-976 | lib/core/services/gateway_turn_coordinator.dart:1357-1386 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 23+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 23+ corresponding lines) lib/core/services/chat_assets_client.dart:61 — lib/core/services/chat_assets_client.dart:61-83 | lib/core/services/memory_repository.dart:15-37 | lib/core/services/remote_files_client.dart:118-146 — 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 (5 members, 24+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 24+ corresponding lines) lib/core/widgets/activity_pane.dart:330 — lib/core/widgets/activity_pane.dart:330-358 | lib/core/widgets/adopt_project_folder_sheet.dart:376-399 | lib/core/widgets/home_pane.dart:328-356 | lib/core/widgets/project_detail_screen.dart:877-901 | lib/core/widgets/projects_pane.dart:587-615 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 24 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 (20 corresponding lines) · ×1
  • Edited copy of a member (20 corresponding lines) lib/core/screens/cron_screen.dart:92 — lib/core/screens/cron_screen.dart:92-115 | lib/core/screens/skills_screen.dart:35-54 — 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 copies of one member (3 members, 21+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 21+ corresponding lines) lib/core/screens/files_screen.dart:62 — lib/core/screens/files_screen.dart:62-85 | lib/core/screens/files_screen.dart:87-108 | lib/core/screens/memory_screen.dart:272-292 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 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 (14 corresponding lines) · ×1
  • Edited copy of a member (14 corresponding lines) lib/core/widgets/project_detail_screen.dart:317 — lib/core/widgets/project_detail_screen.dart:317-332 | lib/core/widgets/projects_pane.dart:271-284 — These two members are one piece of code written twice and then edited apart: 14 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, 18+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 18+ corresponding lines) lib/core/screens/chat_screen.dart:5986 — lib/core/screens/chat_screen.dart:5986-6008 | lib/core/screens/chat_screen.dart:6010-6027 | lib/core/screens/chat_screen.dart:6029-6046 — 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 copies of one member (4 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 8+ corresponding lines) lib/core/models/gateway_activity.dart:324 — lib/core/models/gateway_activity.dart:324-331 | lib/core/models/gateway_activity.dart:398-405 | lib/core/models/gateway_insight.dart:42-49 | lib/core/models/gateway_insight.dart:126-133 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×1
  • Edited copy of a member (21 corresponding lines) lib/core/services/turn_notification_service.dart:136 — lib/core/services/turn_notification_service.dart:136-157 | lib/core/services/turn_notification_service.dart:159-179 — These two members are one piece of code written twice and then edited apart: 21 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) · ×1
  • Edited copy of a member (13 corresponding lines) lib/core/widgets/media_artifact_card.dart:122 — lib/core/widgets/media_artifact_card.dart:122-134 | lib/core/widgets/media_artifact_card.dart:205-220 — 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 copies of one member (3 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 7+ corresponding lines) lib/core/services/connection_manager.dart:1705 — lib/core/services/connection_manager.dart:1705-1711 | lib/core/services/connection_manager.dart:1713-1719 | lib/core/services/connection_manager.dart:1833-1840 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 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 (8 corresponding lines) · ×1
  • Edited copy of a member (8 corresponding lines) lib/core/models/hermes_project.dart:140 — lib/core/models/hermes_project.dart:140-147 | lib/core/models/projects_tree_overview.dart:221-228 — These two members are one piece of code written twice and then edited apart: 8 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) · ×1
  • Edited copy of a member (7 corresponding lines) lib/core/services/projects_gateway_client.dart:305 — lib/core/services/projects_gateway_client.dart:305-311 | lib/core/services/quick_chat_store.dart:209-215 — 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 · Edited copy of a member (4 corresponding lines) · ×1
  • Edited copy of a member (4 corresponding lines) server/mobile-push/mobile_push/inbox.py:27 — server/mobile-push/mobile_push/inbox.py:27-30 | server/mobile-push/mobile_push/store.py:102-106 — These two members are one piece of code written twice and then edited apart: 4 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 (37 lines × 2) · ×1
  • Duplicated block (37 lines × 2) lib/main.dart:1769 — lib/main.dart:1769-1805 | lib/main.dart:1928-1964 — 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 `lib/main.dart:1769` 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 (20 lines × 3) · ×1
  • Duplicated block (20 lines × 3) lib/core/widgets/activity_pane.dart:330 — lib/core/widgets/activity_pane.dart:330-349 | lib/core/widgets/home_pane.dart:328-347 | lib/core/widgets/projects_pane.dart:587-606 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `lib/core/widgets/activity_pane.dart:330` 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 (20 lines × 2) · ×1
  • Duplicated block (20 lines × 2) lib/core/screens/chat_screen.dart:5633 — lib/core/screens/chat_screen.dart:5633-5652 | lib/core/services/normal_gateway_application_session.dart:2319-2338 — 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 `lib/core/screens/chat_screen.dart:5633` 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 (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) lib/core/widgets/config_backup_card.dart:116 — lib/core/widgets/config_backup_card.dart:116-134 | lib/core/widgets/config_backup_card.dart:242-261 — 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 `lib/core/widgets/config_backup_card.dart:116` 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) · ×1
  • Duplicated block (19 lines × 2) lib/main.dart:1869 — lib/main.dart:1869-1887 | lib/main.dart:2115-2133 — 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 `lib/main.dart:1869` 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 (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) lib/core/widgets/config_backup_card.dart:87 — lib/core/widgets/config_backup_card.dart:87-104 | lib/core/widgets/config_backup_card.dart:194-211 — 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 `lib/core/widgets/config_backup_card.dart:87` 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, `lib/core/widgets/config_backup_card.dart:212` calls `_submit` and `lib/core/widgets/config_backup_card.dart:105` 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–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) lib/core/screens/chat_screen.dart:2322 — lib/core/screens/chat_screen.dart:2322-2338 | lib/core/screens/chat_screen.dart:2359-2374 — 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 `lib/core/screens/chat_screen.dart:2322` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (13–15 lines × 2) · ×1
  • Duplicated block (13–15 lines × 2) lib/core/screens/workspace_screen.dart:1039 — lib/core/screens/workspace_screen.dart:1039-1053 | lib/core/screens/workspace_screen.dart:1855-1867 — 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 (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) lib/core/services/attachment_controller.dart:218 — lib/core/services/attachment_controller.dart:218-232 | lib/core/services/attachment_controller.dart:265-278 — 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 `lib/core/services/attachment_controller.dart:218` 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 (13–14 lines × 3) · ×1
  • Duplicated block (13–14 lines × 3) lib/core/services/composer_draft_store.dart:112 — lib/core/services/composer_draft_store.dart:112-124 | lib/core/services/normal_gateway_pending_store.dart:116-128 | lib/core/services/operational_activity_store.dart:139-152 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `lib/core/services/composer_draft_store.dart:112` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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 (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) lib/core/models/connection.dart:218 — lib/core/models/connection.dart:218-231 | lib/core/services/config_backup.dart:197-208 — 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 `lib/core/models/connection.dart:218` 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 (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) lib/core/screens/provider_oauth_screen.dart:74 — lib/core/screens/provider_oauth_screen.dart:74-81 | lib/core/screens/provider_usage_screen.dart:84-91 | lib/core/screens/workspace_screen.dart:1171-1177 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `lib/core/screens/provider_oauth_screen.dart:74` 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 (7 lines × 2) · ×1
  • Duplicated block (7 lines × 2) lib/core/models/gateway_activity.dart:325 — lib/core/models/gateway_activity.dart:325-331 | lib/core/models/gateway_activity.dart:399-405 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 8+ corresponding lines) tools/capture_cron_prompt_fixture.py:29 — tools/capture_cron_prompt_fixture.py:29-36 | tools/capture_internal_message_fixture.py:36-43 | tools/capture_lcm_summary_fixture.py:30-37 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 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 (7–10 lines × 2) · ×1
  • Duplicated block (7–10 lines × 2) scripts/attach_path_probe.py:33 — scripts/attach_path_probe.py:33-42 | scripts/legacy_attach_probe.py:23-29 — 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 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 (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) tools/capture_cron_prompt_fixture.py:29 — tools/capture_cron_prompt_fixture.py:29-34 | tools/capture_internal_message_fixture.py:36-41 | tools/capture_lcm_summary_fixture.py:30-35 — 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.
Minor — 50 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×31
  • Duplicated predicate lib/core/services/gateway_turn_coordinator.dart:561 — `!_boundedIdentity(connectionId) || !_lowerHexDigest(endpointDigest) || !_boundedIdentity(localSessionId)` appears character-identically in 2 files — lib/core/services/gateway_turn_coordinator.dart, lib/core/services/gateway_turn_journal.dart. 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 lib/core/widgets/auxiliary_models.dart:40 — `!identical(oldWidget.client, widget.client) || oldWidget.authorityToken != widget.authorityToken` appears character-identically in 2 files — lib/core/widgets/auxiliary_models.dart, lib/core/widgets/fallback_models.dart. 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 lib/core/services/android_voice_composer_adapter.dart:11 — `!kIsWeb && defaultTargetPlatform == TargetPlatform.android` appears character-identically in 3 files — lib/core/services/android_voice_composer_adapter.dart, lib/core/services/apk_update_installer.dart, lib/core/services/mobile_push_service.dart. 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 lib/core/services/gateway_turn_journal.dart:980 — `GatewayRecoveryTurnStatus.completed || GatewayRecoveryTurnStatus.failed || GatewayRecoveryTurnStatus.interrupted` appears character-identically in 2 files — lib/core/services/gateway_turn_journal.dart, lib/core/services/gateway_turn_recovery.dart. 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 lib/core/screens/chat_screen.dart:943 — `WidgetsBinding.instance.lifecycleState == null || WidgetsBinding.instance.lifecycleState == AppLifecycleState.resumed` appears character-identically in 2 files — lib/core/screens/chat_screen.dart, lib/core/widgets/delegated_task_timeline.dart. 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 lib/core/screens/chat_screen.dart:5471 — `assistant['_gateway_reasoning_replaces'] == true || reasoning.mode == GatewayReasoningEventMode.replace` appears character-identically in 2 files — lib/core/screens/chat_screen.dart, lib/core/services/normal_gateway_application_session.dart. 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 lib/core/services/attachment_pdf_service.dart:23 — `bytes.isEmpty || bytes.length > maxAttachmentDownloadBytes` appears character-identically in 2 files — lib/core/services/attachment_pdf_service.dart, lib/core/services/attachment_video_service.dart. 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 lib/core/services/client_certificate_service.dart:316 — `bytes.length > 2 && bytes[0] == 0x30 && bytes[1] == 0x82` appears character-identically in 2 files — lib/core/services/client_certificate_service.dart, lib/main.dart. 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 lib/core/screens/chat_screen.dart:5633 — `candidate['role'] != 'assistant' || candidate['_gateway_interim'] != true || candidate['content'] != rawCompleteText` appears character-identically in 2 files — lib/core/screens/chat_screen.dart, lib/core/services/normal_gateway_application_session.dart. 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 lib/core/utils/activity_feed.dart:217 — `connectionId != null && binding.connectionId != connectionId` appears character-identically in 2 files — lib/core/utils/activity_feed.dart, lib/core/utils/home_turn_signals.dart. 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 lib/core/widgets/voice_composer_controls.dart:43 — `constraints.maxWidth < 420 || MediaQuery.textScalerOf(context).scale(1) > 1.4` appears character-identically in 2 files — lib/core/widgets/voice_composer_controls.dart, lib/core/widgets/voice_recording_controls.dart. 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 lib/core/services/gateway_turn_application_controller.dart:492 — `current == null || !identical(current.token, registration)` appears character-identically in 2 files — lib/core/services/gateway_turn_application_controller.dart, lib/core/services/gateway_turn_coordinator.dart. 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 lib/core/screens/chat_screen.dart:5621 — `data['response_previewed'] != true && data['response_transformed'] != true && data['response_reused'] != true` appears character-identically in 2 files — lib/core/screens/chat_screen.dart, lib/core/services/normal_gateway_application_session.dart. 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 lib/core/utils/activity_feed.dart:218 — `endpointDigest != null && binding.endpointDigest != endpointDigest` appears character-identically in 2 files — lib/core/utils/activity_feed.dart, lib/core/utils/home_turn_signals.dart. 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 lib/core/services/delegated_task_history.dart:228 — `error.statusCode == 401 || error.statusCode == 403` appears character-identically in 2 files — lib/core/services/delegated_task_history.dart, lib/core/services/mobile_push_service.dart. 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 lib/core/screens/workspace_screen.dart:711 — `group.kind == ActivityGroupKind.needsYou || group.kind == ActivityGroupKind.failed` appears character-identically in 2 files — lib/core/screens/workspace_screen.dart, lib/core/widgets/activity_pane.dart. 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 lib/core/widgets/activity_pane.dart:126 — `interval != null && interval > Duration.zero` appears character-identically in 2 files — lib/core/widgets/activity_pane.dart, lib/core/widgets/cron_upcoming_pane.dart. 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 lib/core/services/hands_free_speech.dart:23 — `kIsWeb || defaultTargetPlatform != TargetPlatform.android` appears character-identically in 2 files — lib/core/services/hands_free_speech.dart, lib/core/services/recording_screen_awake.dart. 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 lib/core/screens/workspace_sessions_screen.dart:629 — `lifecycle == null || lifecycle == AppLifecycleState.resumed` appears character-identically in 3 files — lib/core/screens/workspace_sessions_screen.dart, lib/core/widgets/activity_pane.dart, lib/core/widgets/cron_upcoming_pane.dart. 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 lib/core/services/capability_registry.dart:172 — `message.contains('unknown method') || message.contains('method not found')` appears character-identically in 2 files — lib/core/services/capability_registry.dart, lib/core/services/projects_gateway_client.dart. 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 lib/core/screens/memory_screen.dart:45 — `oldWidget.connection != widget.connection || oldWidget.testHttpClient != widget.testHttpClient` appears character-identically in 2 files — lib/core/screens/memory_screen.dart, lib/core/screens/nous_portal_screen.dart. 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 lib/core/models/gateway_turn_contract.dart:115 — `params == null || params['type'] != 'gateway.ready'` appears character-identically in 2 files — lib/core/models/gateway_turn_contract.dart, lib/core/services/capability_registry.dart. 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 lib/core/services/chat_model_override_store.dart:45 — `provider == null || provider.trim().isEmpty || model == null || model.trim().isEmpty` appears character-identically in 2 files — lib/core/services/chat_model_override_store.dart, lib/core/services/session_search_preferences.dart. 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 lib/core/services/dashboard_api_client.dart:99 — `res.statusCode < 200 || res.statusCode >= 300` appears character-identically in 4 files — lib/core/services/dashboard_api_client.dart, lib/core/services/hermes_sign_in.dart, lib/nextgen/ui/capabilities_page.dart, lib/nextgen/ui/more_page.dart. 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 lib/core/services/ai_search_query_rewriter.dart:70 — `response.statusCode == 401 || response.statusCode == 403` appears character-identically in 2 files — lib/core/services/ai_search_query_rewriter.dart, lib/core/services/session_search_client.dart. 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.
  • + 6 more in this group — see findings.md.
AX6 · Interface segregation · Fat interface · ×2
  • Fat interface: GatewayTurnApplicationSession (20 abstract methods) lib/core/services/gateway_turn_application_controller.dart:22 — `GatewayTurnApplicationSession` declares 20 abstract methods: `setAsyncEventListener`, `removeAsyncEventListener`, `setTurnSettledListener`, `removeTurnSettledListener`, `ownsApprovalRequest`, `tryRespondToApproval`, `tryRespondToClarify`, `tryRespondToSudo`, `tryRespondToSecret`, `stageAttachment`, `detachAttachments`, `submit`, `recoverPending`, `interrupt`, `close`, `setSessionBoundListener`, `removeSessionBoundListener`, `hasActiveTurn`, `addTurnActivityListener`, `removeTurnActivityListener`. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: AppLocalizations (1609 abstract methods) lib/l10n/app_localizations.dart:21 — `AppLocalizations` declares 1609 abstract methods: `fallback_title`, `fallback_notice`, `fallback_unavailable`, `fallback_discovery_unavailable`, `fallback_empty`, `fallback_incomplete`, `fallback_add`, `fallback_save`, `fallback_save_failed`, `fallback_saved`, `fallback_legacy_title`, `fallback_legacy_notice`, `fallback_priority`, `fallback_move_up`, `fallback_move_down`, `fallback_routing_read_only`, `cron_model_default`, `cron_model_notice`, `model_management_unavailable`, `model_management_subtitle`, `usage`, `nous_portal`, `portal_menu_subtitle`, `portal_read_only`, `portal_status`, `portal_free_tier`, `portal_signed_in`, `portal_signed_out`, `portal_account_tier`, `portal_recorded_usage`, `portal_all_providers`, `portal_period`, `portal_sessions`, `portal_input`, `portal_output`, `portal_estimated`, `portal_actual`, `portal_recorded_models`, `portal_no_models`, `portal_unavailable`, and 1569 more. Counted over its public methods with no body, once per name; concrete methods and `_`-private members are not counted, because no implementer that extends it is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
D16 · Bus Factor · Off-boarding risk · ×2
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 5 significant file(s) lose their only recent owner: lib/core/services/quick_chat_store.dart, lib/core/utils/home_turn_signals.dart, lib/core/services/capability_registry.dart, lib/core/services/session_search_preferences.dart, lib/core/models/hermes_project.dart. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 3 significant file(s) lose their only recent owner: scripts/paging_contract_fuzz.py, scripts/attach_path_probe.py, scripts/legacy_attach_probe.py. Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 2 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (10 single-owned of 235 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; 235 of the 295 production source files in this repository met that bar). They are anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: lib/core/models/gateway_approval.dart, lib/core/l10n/l10n.dart.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion pubspec.yaml:1 — `(repository root)` (79286 LoC, 627 module-visible types across 17 directories) overshoots its size bounds. 1 of 5 build unit(s) (Gradle, Python, Xcode, pub) overshoot their size bounds, lowering Project Cohesion to 6.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 1 of 235 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (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; 235 of the 295 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: lib/core/widgets/gateway_sensitive_prompt_dialog.dart. 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.
D34 · Knowledge Freshness · Orphaned file · ×1
  • Orphaned file lib/core/widgets/gateway_sensitive_prompt_dialog.dart: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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D37 · Vulnerability-disclosure Policy · REDACTED · ×1
  • REDACTED
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 1/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `ios`.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:4 — No static application security testing detected. For this repository's stack, add the Dart analyzer's security lints plus `semgrep --config=auto` as a CI step. What was searched, so you can tell an absence from a miss: the 3 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation android/app/build.gradle.kts:166 — `android/app/build.gradle.kts` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
S1 · Web-Security Posture · No security response headers detected · ×1
  • No security response headers detected — 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 set on a response this repository's Dart server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: lib/core/services/hermes_sign_in.dart:863 — `HttpServer.bind(`.
S1 · Web-Security Posture · No inbound request validation detected · ×1
  • No inbound request validation detected — No handler of this repository's Dart server answers 400, 413 or 422 (`Response.badRequest`, `HttpStatus.badRequest`, `statusCode = 400`) and no validation package (luthor, acanthis, ez_validator, json_schema, …) is imported — nothing shows inbound requests being checked, and refused, before a handler acts on them. A check that answers its failure with 200 and an error body is not seen. (−2.0 on this card.) The server: lib/core/services/hermes_sign_in.dart:863 — `HttpServer.bind(`.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×1
  • Hand-rolled JSON/XML parsing via regex lib/core/utils/message_content.dart:68 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This Dart code already uses a real parser in the same package; use it here too.
X7 · Silent fallback defaults · Silent fallback default in catch · ×1
  • Silent fallback default in catch lib/core/screens/model_management_screen.dart:194 — `_readRoute` turns every thrown error into `{}` — a data error becomes a silent behavior change with no trail. Log the error or rethrow it. 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 at the `catch` or in the `///` doc, and the row stops firing.

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-37f042e22a424077b40df6fb5f3d1ef5/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=799" --report-format json --report-path /tmp/watchdog-gitleaks-37f042e22a424077b40df6fb5f3d1ef5/history-1.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-1.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-37f042e22a424077b40df6fb5f3d1ef5/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 .19artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 1 file(s) — `android/app/src/main/kotlin/com/hermesagent/hermes_android/MobilePushTransport.kt` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json

Run 01a1ea3c-ef8f-7395-b7ab-f84fad5e99ff · 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