Public report of QwenAudio/qwen-audio-agent, 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, 13:09 UTC · Survey ID cd_4e1449e2b6ce44caa9c640fa1de4fef3

QwenAudio/qwen-audio-agent

Measured 17 November 2026, 13:06 UTC, at code version 9408dac

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

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A large codebase: 100,474 lines of product code in 11 projects, tests not counted · Estimated rebuild effort: about 1.1 person-years · Weakest lens: Code Health, 36.4

Findings by how serious they are

32 critical 1052 serious 142 minor

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

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 13:06 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 ▸

80of 80 dimensions measured by tools.
1214of 1226 findings point to an exact file and line, so you can open each one in the code. The other 12 concern the repository as a whole, such as missing documentation.
80dimensions across 7 lenses, read from 100,474 lines of product code in 11 projects.
Chapters

Executive summary

QwenAudio/qwen-audio-agent falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 45.3 out of 100 and is rated Weak, and 23 of its 32 critical findings are security problems.

Code Health, at 36.4, is the weakest lens and counts most in the score. The best first step is adding type checking, worth about 4.7 points. Making the controls keyboard-usable comes next, worth about 4.1 points. Raising Code Health to 70 would lift the score to about 52.8.

Seventeen known security holes in the packages the code depends on can be used by attackers. Three automatic updates take new releases before a bad one can be spotted, and two pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Updating the vulnerable packages, setting a waiting period for automatic updates and pinning each tool to an exact version would close these risks. Fixing the weaknesses the scanner points to would fix the security weakness in the code. The two form fields without a label need a label.

The product code is 100,474 lines, about €170,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.
Code Health 36.4 · counts for 46%Accessibility 42.9 · counts for 25%Production Readiness 58.2 · counts for 14%Performance 60.0 · counts for 8%Architecture 64.0 · counts for 4%Security and Compliance 67.0 · counts for 2%Maturity 79.0 · counts for 1%

If Code Health rose from 36.4 to 70, the lowest score rated Strong, the score would rise from 45.3 to about 52.8.

Code composition: what the lines of code are
Product code 54%Tests 46%
Rebuild cost: about €170,000 · Estimate
Cost to rebuild€55,000 to €280,000, for 919 to 2,917 hours of work, about 1.1 person-years for 1 to 3 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 45. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 100,474 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
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
Raises the score by about 4.7 points · Medium effort · Type Safety
2
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Raises the score by about 4.1 points · Medium effort · Keyboard semantics
3
Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and run NullAway (Error Prone) or the Checker Framework so the declaration is enforced.
Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).
Raises the score by about 3.4 points · Medium effort · Nullable reference types

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.

Files that change often carry extra risk · Combined risk
29 files are changed often and are hard to read, which makes them the likeliest places for a mistake. They also have under half their code tested, or were written almost entirely by one person, so a mistake there is less likely to be caught, or only one person knows the code well enough to avoid it. A change to these files therefore carries more risk than the overall score suggests.
Based on: Churn × Complexity Hotspots (75 files) · Code Coverage (171 files under half tested) · Bus Factor (0 files written almost entirely by one person) · The files: gateway-client-transport.mjs, useRealtimeVoice.js and realtime-provider.mjs
What to do: Add tests to these files and have a second person review every change to them, starting with gateway-client-transport.mjs, useRealtimeVoice.js and realtime-provider.mjs.
Where the investment is most exposed · Value at risk
This code would cost about €170,000 to build again, about 1.1 person-years of work. Its weakest lens is Code Health, at 36.4 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up. Of all the actions in this report, it raises the score most for the work it takes: about 4.7 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 4.7 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 8% to 19% on every change. The history of the code shows how much it changes: about 274,472 lines over the last 90 days, which is about 1,113,136 lines a year. At that pace, the extra work comes to an estimated 231.9 to 1391.4 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · 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 — module dependency graph

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

arch :app :app @qwen-audio-agent/cli cli @qwen-audio-agent/desktop desktop @qwen-audio-agent/mobile mobile @qwen-audio-agent/server server @qwen-audio-agent/tui tui @qwen-audio-agent/web web CapApp-SPM CapApp-SPM android android qwen-audio-agent qwen-audio-agent qwen-audio-agent-webrtc qwen-audio-agent-webrtc

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.

180 modules, with 1 dependency between them. Every module uses only modules listed above it, so there are no loops.

The table shows the 40 modules with the most connections; 140 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 cli.bin2 cli.src3 cli.src.runtime4 com.qwenaudio.agent5 desktop.smoke6 desktop.src7 desktop.src.backend8 desktop.src.desktop-presence9 desktop.src.wake-word10 desktop.src.wake-word.runtime11 mobile.src12 repository13 scripts14 scripts.manual15 scripts.runtime16 server17 server.eval18 server.src.access19 server.src.access.gateway-access20 server.src.access.gateway-public-endpoint21 server.src.access.tailscale-serve22 server.src.app23 server.src.app.session-conversation-history24 server.src.backend25 server.src.backend.adapters26 server.src.backend.adapters.a2a27 server.src.backend.adapters.a2a.backend-adapter28 server.src.backend.adapters.acp29 server.src.backend.adapters.acp.backend-adapter30 server.src.backend.adapters.acp.coordinator-queue31 server.src.backend.adapters.acp.drivers32 server.src.backend.adapters.acp.drivers.openclaw-delegation33 server.src.backend.adapters.acp.input-broker34 server.src.backend.adapters.acp.keyed-serial-executor35 server.src.backend.adapters.acp.permission-broker36 server.src.backend.adapters.acp.process-client37 server.src.backend.adapters.acp.runtime-state38 server.src.backend.adapters.acp.session-registry39 server.src.core.json-snapshot-store40 server.src.memory.learning.preference-candidate-store
1 cli.bin
2 cli.src
3 cli.src.runtime
4 com.qwenaudio.agent
5 desktop.smoke
6 desktop.src
7 desktop.src.backend
8 desktop.src.desktop-presence
9 desktop.src.wake-word
10 desktop.src.wake-word.runtime
11 mobile.src
12 repository
13 scripts
14 scripts.manual
15 scripts.runtime
16 server
17 server.eval
18 server.src.access
19 server.src.access.gateway-access
20 server.src.access.gateway-public-endpoint
21 server.src.access.tailscale-serve
22 server.src.app
23 server.src.app.session-conversation-history
24 server.src.backend
25 server.src.backend.adapters
26 server.src.backend.adapters.a2a
27 server.src.backend.adapters.a2a.backend-adapter
28 server.src.backend.adapters.acp
29 server.src.backend.adapters.acp.backend-adapter
30 server.src.backend.adapters.acp.coordinator-queue
31 server.src.backend.adapters.acp.drivers
32 server.src.backend.adapters.acp.drivers.openclaw-delegation
33 server.src.backend.adapters.acp.input-broker
34 server.src.backend.adapters.acp.keyed-serial-executor
35 server.src.backend.adapters.acp.permission-broker
36 server.src.backend.adapters.acp.process-client
37 server.src.backend.adapters.acp.runtime-state
38 server.src.backend.adapters.acp.session-registry
39 server.src.core.json-snapshot-store
40 server.src.memory.learning.preference-candidate-store1
Uses a module listed above itPart of a loopThe module itself
1 cli.bin2 cli.src3 cli.src.runtime4 com.qwenaudio.agent5 desktop.smoke6 desktop.src7 desktop.src.backend8 desktop.src.desktop-presence9 desktop.src.wake-word10 desktop.src.wake-word.runtime11 mobile.src12 repository13 scripts14 scripts.manual15 scripts.runtime16 server17 server.eval18 server.src.access19 server.src.access.gateway-access20 server.src.access.gateway-public-endpoint21 server.src.access.tailscale-serve22 server.src.app23 server.src.app.session-conversation-history24 server.src.backend25 server.src.backend.adapters26 server.src.backend.adapters.a2a27 server.src.backend.adapters.a2a.backend-adapter28 server.src.backend.adapters.acp29 server.src.backend.adapters.acp.backend-adapter30 server.src.backend.adapters.acp.coordinator-queue31 server.src.backend.adapters.acp.drivers32 server.src.backend.adapters.acp.drivers.openclaw-delegation33 server.src.backend.adapters.acp.input-broker34 server.src.backend.adapters.acp.keyed-serial-executor35 server.src.backend.adapters.acp.permission-broker36 server.src.backend.adapters.acp.process-client37 server.src.backend.adapters.acp.runtime-state38 server.src.backend.adapters.acp.session-registry39 server.src.core.json-snapshot-store40 server.src.memory.learning.preference-candidate-storecli.bin1cli.src2cli.src.runtime3com.qwenaudio.agent4desktop.smoke5desktop.src6desktop.src.backend7desktop.src.desktop-presence8desktop.src.wake-word9desktop.src.wake-word.runtime10mobile.src11repository12scripts13scripts.manual14scripts.runtime15server16server.eval17server.src.access18server.src.access.gateway-access19server.src.access.gateway-public-endpoint20server.src.access.tailscale-serve21server.src.app22server.src.app.session-conversation-history23server.src.backend24server.src.backend.adapters25server.src.backend.adapters.a2a26server.src.backend.adapters.a2a.backend-adapter27server.src.backend.adapters.acp28server.src.backend.adapters.acp.backend-adapter29server.src.backend.adapters.acp.coordinator-queue30server.src.backend.adapters.acp.drivers31server.src.backend.adapters.acp.drivers.openclaw-delegation32server.src.backend.adapters.acp.input-broker33server.src.backend.adapters.acp.keyed-serial-executor34server.src.backend.adapters.acp.permission-broker35server.src.backend.adapters.acp.process-client36server.src.backend.adapters.acp.runtime-state37server.src.backend.adapters.acp.session-registry38server.src.core.json-snapshot-store39server.src.memory.learning.preference-candidate-store401+140 more modules (most-connected shown)

At a glance — Code Health · 36.4 · Weak · gated by D1, D2, R1, X5 ·

At a glance — Architecture · 64.0 · Adequate · gated by R11 ·

At a glance — Maturity · 79.0 · Strong ·

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

At a glance — Security · 67.0 · Adequate · gated by D29 ·

At a glance — Accessibility · 42.9 · Weak · gated by AC4, AC6 ·

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 — Injection63High / Critical
A03:2025 — Software Supply Chain Failures48High / Critical

Roadmap

Top priorities: Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up; Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href; Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and run NullAway (Error Prone) or the Checker Framework so the declaration is enforced. Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).

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

Do thisHelpsEffortDimension
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.+4.7 ptsMediumType Safety
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+4.1 ptsMediumKeyboard semantics
Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and run NullAway (Error Prone) or the Checker Framework so the declaration is enforced. Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).+3.4 ptsMediumNullable reference types
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.+3.1 ptsMediumVisual & motion safety
Bring the 3 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with App.App (cyclomatic 317), arguments.parseCommandArguments (cyclomatic 164), launcher.main (cyclomatic 124).+2.0 ptsHighCyclomatic Complexity
Resolve the 34 FunctionTooLong finding(s) in God Classes — start with realtime-session-runtime.mjs (3), terminal-renderers.mjs (3), gateway-client-transport.mjs (2).+1.8 ptsHighGod Classes
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.+1.7 ptsMediumText alternatives
Swallowed exception (empty catch)+1.3 ptsMediumException handling

File quality

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

FileScoreBandWorst signal
REDACTED1.0SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED1.0SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED1.3SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED1.7SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED1.7SlopDependency Vulnerabilities: High CVE: REDACTED
server/src/transport/gateway-client-transport.mjs3.5SlopChange Coupling: Boundary-crossing change coupling: gateway-client-transport.mjs ↔ realtime-provider.mjs
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.1MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.2MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.2MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.0MixedStatic Analysis (SAST): Medium: REDACTED
server/src/frontend/tools/tool-call-handler.mjs5.0MixedChange Coupling: Boundary-crossing change coupling: tool-call-handler.mjs ↔ gateway-client-transport.mjs
REDACTED5.3MixedStatic Analysis (SAST): Medium: REDACTED
server/src/voice/realtime-session-runtime.mjs5.5MixedCyclomatic Complexity: createRealtimeSessionRuntime.handleClientEvent (cyclomatic 80)
server/src/voice/realtime-provider.mjs5.5MixedCyclomatic Complexity: RealtimeFrontend.handleLifecycle (cyclomatic 63)
server/src/voice/realtime-presentation-runtime.mjs5.6MixedCyclomatic Complexity: #responseDone (cyclomatic 46)
cli/src/runtime.mjs5.6MixedCyclomatic Complexity: runtime.ensureRuntime (cyclomatic 36)

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

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

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

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

Could not be resolved — 8

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

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 80 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 — 80 dimensions across the health lenses
D1D2D3D5D6D8D10D11D13D15D16D17D19D20D21D23D24D26D27D28D29D30D34D35D36D37D43D44AC1AC2AC3AC4AC5AC6AX10AX3AX4AX9C2GD1IC1M1M2M3M4P1P10P2P3P4P6P7PF3R1R10R11R2R3R4R5R6R7R8R9S1X1X12X13X14X16X19X2X21X23X24X25X28X29X3X5

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, 1214 of 1226 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 01a1e99d-910f-750b-ba61-701882a3de89.

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.

  • 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 — 2 Maven/Gradle manifest(s) were read, stating a version for 0 dependency(ies) and leaving 4 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 — 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 — none of the 1 package(s) this repository's SwiftPM files bring in could be read at a pinned revision or is a repository the public index (api.deps.dev) knows, so no licence could be read for any of them: they are private, self-hosted, or unpinned and too little-referenced to be indexed. NOT a finding that this repository's licences are compliant: this dimension asserts nothing about its licensing in either direction.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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 — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22'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 — 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. D24 compares a comment's words with the identifiers, literals and constructs of the code it annotates, using English function-word and rationale lexicons. Comments in another script or language were left unread rather than counted as clean.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • 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. `server/src/frontend/retrieval/safe-url-fetcher.mjs`, `server/src/memory/providers/markdown/context-store.mjs` 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 server/src/voice/providers/provider-registry.mjs, 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.
  • AXB2 Runtime readiness — 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. The dev server kept running but no port it opened served a page in the time allowed. (rule: no-answer). The renderer reported: the dev server (`npm run dev`) kept running but served no page within 2 minutes. Likely cause (not identified): the dev server kept running but no port it opened served a page in the time allowed. Last output: "[server] Failed running 'REDACTED' / [web] / [web] VITE v7.3.7 ready in 172 ms / [web] / [web] ➜ Local: http://localhost:5174/ / [web] ➜ Network: http://172.31.7.5:5174/" No runtime evidence was gathered.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Boot via AndroidApp (mobile/android/app). the Android app did not build — `./gradlew :app:assembleDebug` exited 1: ith an exception. * Where: Script 'mobile/android/app/capacitor.build.gradle' line: 10 * What went wrong: A problem occurred evaluating script. >…; runtime evidence skipped (launch chosen because mobile/android/app/build.gradle applies the Android application plugin and mobile/android/gradlew builds it).
  • 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 none applies: this repository publishes a library and deploys nothing (no container, IaC or deployment manifest), so it holds no runtime state of its own. Any data-access dependency it declares is the store it is a CLIENT for, not one it operates. The DR control belongs to whoever runs that data.
  • R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 85 further occurrence(s) are not listed individually; the score already reflects all 125.
  • R11 Import Boundaries — 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. 70 further occurrence(s) are not listed individually; the score already reflects all 110.
  • R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 355 further occurrence(s) are not listed individually; the score already reflects all 395.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 26 further occurrence(s) are not listed individually; the score already reflects all 66.
  • 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. 91 further occurrence(s) are not listed individually; the score already reflects all 131.
  • X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala, Rust, Go, Swift, Erlang, F# and Visual Basic source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP log through no library that carries a message's values as fields (pino, winston, bunyan, tslog, LogTape, roarr; Python's logging, structlog; PHP's PSR-3 loggers), so its log calls cannot be judged, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

Repo exclusion declarations (.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.
  • 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.
  • D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
  • 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").
  • 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.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D23 Boundary Type-Coupling: Boundary leakage is detected from type references across detected contexts — leaks that flow through primitives, serialization or shared infrastructure may not surface as a typed reference.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • 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.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • 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.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity2.0 / 10Critical✓ Tool-verified

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

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

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

257 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was App.App at 317. A further 1 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being BrowserWebRtcConnection.sendImageFrame at 17 — they are counted neither in the figure above nor in this dimension's score.

App.App (cyclomatic 317)REDACTED:196
arguments.parseCommandArguments (cyclomatic 164)REDACTED:89
launcher.main (cyclomatic 124)cli/src/launcher.mjs:229
attachGatewayClientTransport (cyclomatic 98)server/src/transport/gateway-client-transport.mjs:62
createRealtimeSessionRuntime.handleClientEvent (cyclomatic 80)server/src/voice/realtime-session-runtime.mjs:913

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

What to do

  1. Bring the 3 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with App.App (cyclomatic 317), arguments.parseCommandArguments (cyclomatic 164), launcher.main (cyclomatic 124). — 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 3 together lifts Cyclomatic Complexity from 2.0 to about 3.3/10, projected with the scoring formula itself and assuming each lands exactly at 120; 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

288 method(s) exceeded the cognitive complexity threshold of 15; the worst was App.App at 338.

App.App (cognitive 338)REDACTED:196
main (cognitive 196)cli/src/launcher.mjs:229
arguments.parseCommandArguments (cognitive 158)REDACTED:89
createRealtimeSessionRuntime.handleClientEvent (cognitive 119)server/src/voice/realtime-session-runtime.mjs:913
attachGatewayClientTransport (cognitive 118)server/src/transport/gateway-client-transport.mjs:62

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

What to do

  1. Bring the 3 bodies over 120 down to 120 or less in Cognitive Complexity — start with App.App (cognitive 338), main (cognitive 196), arguments.parseCommandArguments (cognitive 158). — 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 3 together lifts Cognitive Complexity from 2.0 to about 2.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

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

D3 · God Classes7.5 / 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 7.5 / 10 · rule-coverage 100% · ceiling Prevented

73 god class(es) detected.

FunctionTooLong: App.App · ×34REDACTED:196
FileTooLong: REDACTED · ×18REDACTED
ClassTooLong: AcpBackendAdapter · ×10REDACTED:153
MethodTooLong: TaskManager.start · ×8server/src/task/task-manager.mjs:658
TooManyMethods: AcpBackendAdapter · ×3REDACTED:153

What to do

  1. Resolve the 34 FunctionTooLong finding(s) in God Classes — start with realtime-session-runtime.mjs (3), terminal-renderers.mjs (3), gateway-client-transport.mjs (2). — One of this dimension's main actionable groups (34 warning-level).
  2. Resolve the 18 FileTooLong finding(s) in God Classes — start with REDACTED (3), REDACTED, REDACTED. — One of this dimension's main actionable groups (18 warning-level).
  3. Resolve the 10 ClassTooLong finding(s) in God Classes — start with REDACTED (3), REDACTED, realtime-provider.mjs. — One of this dimension's main actionable groups (10 warning-level).

Detailed fixes: d3_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

11 production modules (Gradle+npm+SwiftPM), 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 4 of the 11 (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)10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 131 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

D8 · Code Coverage9.7 / 10Stronggated by 197 serious findings✓ Tool-verified

What it measures: How much of the code is actually exercised by tests.

Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.

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

Line coverage 71.4% — 200 file(s) below 50%. Measured from the JavaScript/TypeScript suite (node:test via `npm ci --ignore-scripts` in the repository root, the 3 run(s) test reliability made; node:test via `npm ci --ignore-scripts` in cli/, the 3 run(s) test reliability made; node:test via `npm ci --ignore-scripts` in desktop/, the 3 run(s) test reliability made; node:test via `npm ci --ignore-scripts` in examples/customer-service/agent/, the 3 run(s) test reliability made; node:test via `npm ci --ignore-scripts` in examples/customer-service/client/, the 3 run(s) test reliability made; node:test via `npm ci --ignore-scripts` in examples/customer-service/console/, the 3 run(s) test reliability made; node:test via `npm ci --ignore-scripts` in examples/customer-service/desk/, the 3 run(s) test reliability made; node:test via `npm ci --ignore-scripts` in examples/customer-service/service/, the 3 run(s) test reliability made; node:test via `npm ci --ignore-scripts` in examples/digital-human/, the 3 run(s) test reliability made; node:test via `npm ci --ignore-scripts` in examples/memcode/, the 3 run(s) test reliability made; node:test via `npm ci --ignore-scripts` in examples/smart-cockpit/agent/, the 3 run(s) test reliability made; node:test via `npm ci --ignore-scripts` in examples/smart-cockpit/service/, the 3 run(s) test reliability made). Taken over 3 runs of the suite: a line counts as covered only when every run executed it. 329 line(s) in 19 file(s) were executed in some runs and not in others, so they are not counted.

Low coverage: /server/src/backend/backend-adapter-conformance.mjs · ×197server/src/backend/backend-adapter-conformance.mjs:1
Tests reach code only in some runs: server/src/app/session-conversation-history.mjs · ×16server/src/app/session-conversation-history.mjs:40

What to do

  1. Resolve the 197 Low coverage finding(s) in Code Coverage — start with execute.mjs (7), provider.mjs (4), REDACTED (3). — One of this dimension's main actionable groups (197 warning-level).
  2. Resolve the 16 Tests reach code only in some runs finding(s) in Code Coverage — start with task-store.mjs (2), session-conversation-history.mjs, conversation-sync.mjs. — One of this dimension's main actionable groups (16 recommendation-level).

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

D10 · Test Quality10.0 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

0 skipped, 7 zero-assertion, 1 synchronised by a fixed sleep, no mocking-framework packages referenced (hand-written doubles or no mocking) across 3727 tests.

No assertions (empty test): renderer close propagates to onCloseexamples/digital-human/test/media-adapter.test.mjs:186
No assertions: is a no-op without mediaDevices or a context getter · ×6web/test/playback-lifecycle.test.mjs:187
Fixed-sleep synchronisation: 3.8 backend result waits for active speech, then proactively generates one replyserver/test/dashscope-omni38-provider.test.mjs:166

What to do

  1. Resolve the 1 No assertions (empty test) finding(s) in Test Quality — start with media-adapter.test.mjs. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 6 No assertions finding(s) in Test Quality — start with playback-lifecycle.test.mjs (2), announcement-manager.test.mjs, backend-adapter-sdk.test.mjs. — One of this dimension's main actionable groups (6 warning-level).
  3. Resolve the 1 Fixed-sleep synchronisation finding(s) in Test Quality — start with dashscope-omni38-provider.test.mjs. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

0 flaky across 1 measured tier(s). JavaScript/TypeScript (node:test via `npm ci --ignore-scripts` in the repository root (3961 tests); node:test via `npm ci --ignore-scripts` in cli/ (195 tests); node:test via `npm ci --ignore-scripts` in desktop/ (288 tests); node:test via `npm ci --ignore-scripts` in examples/customer-service/agent/ (67 tests); node:test via `npm ci --ignore-scripts` in examples/customer-service/client/ (42 tests); node:test via `npm ci --ignore-scripts` in examples/customer-service/console/ (135 tests); node:test via `npm ci --ignore-scripts` in examples/customer-service/desk/ (9 tests); node:test via `npm ci --ignore-scripts` in examples/customer-service/service/ (229 tests); node:test via `npm ci --ignore-scripts` in examples/digital-human/ (141 tests); node:test via `npm ci --ignore-scripts` in examples/memcode/ (17 tests); node:test via `npm ci --ignore-scripts` in examples/smart-cockpit/agent/ (33 tests); node:test via `npm ci --ignore-scripts` in examples/smart-cockpit/service/ (113 tests)): measured (0 flaky).

✓ On the Gold path — maintain.

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

D15 · Churn × Complexity Hotspots9.1 / 10Stronggated by 84 serious findings✓ 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 9.1 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: REDACTED (36×317=11412); server/src/transport/gateway-client-transport.mjs (72×58=4176); REDACTED (18×164=2952) Repeated repair below the complexity floor: server/src/voice/realtime-input-runtime.mjs (4 of 7 changes were fixes); shared/skill-library.mjs (3 of 4 changes were fixes); server/src/session/session-journal.mjs (3 of 3 changes were fixes)

Hotspot: REDACTED · ×80REDACTED:196
Repeated repair: server/src/voice/realtime-input-runtime.mjs · ×4server/src/voice/realtime-input-runtime.mjs:77

What to do

  1. Resolve the 80 Hotspot finding(s) in Churn × Complexity Hotspots — start with execute.mjs (4), REDACTED (3), REDACTED (2). — One of this dimension's main actionable groups (80 warning-level).
  2. Resolve the 4 Repeated repair finding(s) in Churn × Complexity Hotspots — start with realtime-input-runtime.mjs, skill-library.mjs, session-journal.mjs. — One of this dimension's main actionable groups (4 warning-level).

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

D16 · Bus Factor6.8 / 10Adequate✓ 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 6.8 / 10 · rule-coverage 100% · ceiling Documented

76 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is desktop/smoke/settings-smoke.cjs. Counted over 238 of the 408 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)

What to do

  1. Resolve the 2 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (2 recommendation-level).
  2. Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).

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 1263 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 Quality8.3 / 10Strong✓ Tool-verified

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

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

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

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

Documentation: no build, run or usage examplemobile/ios/App/CapApp-SPM/README.md:1

What to do

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

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

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

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

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

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

No architecture decision records were found.

No ADRs foundREDACTED:76

What to do

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

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

D21 · Naming Consistency9.0 / 10Exemplary✓ Tool-verified

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

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

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

1 naming inconsistencies among 101 declarations measured against a convention their peers follow.

`readAsDataURL` spells `URL` where 100 names in the project spell it `Url`scripts/test/browser-webui-smoke.mjs:856

✓ On the Gold path — maintain.

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

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

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

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

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

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

No domain types leak across context boundaries (6 contexts). Contexts: cli, desktop, mobile, server, tui, web.

✓ On the Gold path — maintain.

Detailed fixes: d23_recommendation.md.

D24 · Comment Value9.9 6.1 / 10Adequate✓ Tool-verified

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

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

Maturity: Documented → Verified → Prevented · effective 6.1 / 10 · rule-coverage 62% · ceiling Documented

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

redundant commentserver/test/realtime-provider.test.mjs:2059

What to do

  1. Resolve the 1 redundant comment finding(s) in Comment Value — start with realtime-provider.test.mjs. — One of this dimension's main actionable groups (1 recommendation-level).

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

D26 · Project Cohesion6.4 / 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.4 / 10 · rule-coverage 100% · ceiling Documented

2 of 11 build units (Gradle, SwiftPM, Xcode, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion · ×2server/package.json:1

What to do

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

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

D27 · Navigability10.0 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

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

15 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.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)0.2 / 10Critical✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

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

64 finding(s): 0 critical, 6 high, 58 medium, 0 low. semgrep hit a parse error in 6 file(s) — `.gitlab/git-credential.sh` (line 20), `.gitlab/sync-github.sh` (line 28), `mobile/android/gradlew` (line 74, line 180), `server/src/frontend/retrieval/safe-url-fetcher.mjs` (line 203), `server/src/memory/providers/markdown/context-store.mjs` (lines 36–37, line 38, line 39, …), … (+1 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  3. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

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

D30 · Dependency Vulnerabilities8.3 / 10Adequategated by 17 critical findings✓ Tool-verified

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

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

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

45 finding(s): 0 critical, 17 high, 28 medium, 0 low.

REDACTED
REDACTED

What to do

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

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.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

Every significant source file has living knowledge — recently and meaningfully worked. Counted over 238 of the 408 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

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

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

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

Strongest change-coupling: dashscope.mjs↔realtime-provider.mjs 82%; runtime.mjs↔config.mjs 70%; config.mjs↔managed-backend.mjs 70%

Boundary-crossing change coupling: tool-call-handler.mjs ↔ gateway-client-transport.mjs · ×2server/src/frontend/tools/tool-call-handler.mjs:1
Change coupling: dashscope.mjs ↔ realtime-provider.mjs · ×6server/src/voice/providers/dashscope.mjs:1
Change coupling clique: runtime.mjs, config.mjs, managed-backend.mjscli/src/runtime.mjs

What to do

  1. Resolve the 2 Boundary-crossing change coupling finding(s) in Change Coupling — start with tool-call-handler.mjs, gateway-client-transport.mjs. — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 6 Change coupling finding(s) in Change Coupling — start with dashscope.mjs, gateway-protocol.mjs, preload.cjs. — One of this dimension's main actionable groups (6 warning-level).
  3. Resolve the 1 Change coupling clique finding(s) in Change Coupling — start with runtime.mjs. — 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 & Signing7.5 / 10Strong✓ 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 7.5 / 10 · rule-coverage 100% · ceiling Documented

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

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 Policy10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

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

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 2 platform declaration(s) and 13 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives5.2 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

  • A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. — web/src/desktop/DesktopSpriteOrb.jsx:140

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels6.3 / 10Adequate✓ Tool-verified

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

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

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

  • This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. — REDACTED:1392
  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. (×2) — web/src/KnowledgeLibraryPanel.jsx:143, web/src/composer/MultimodalComposer.jsx:142

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 structure10.0 / 10Exemplary○ Nothing flagged

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.

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

  • The repo's own CSS styles .media-image with `cursor: pointer`, so this <img> is a control — but it has no role, no tabIndex={0} and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabIndex={0} + a key handler. — web/src/MessageContent.jsx:44

What to do

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

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC6 · Visual & motion safety2.7 / 10Weak✓ Tool-verified

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • `.strategy-chip.active` sets color: #fff on background-color: #2DB84D — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — examples/smart-cockpit/client/src/App.css:1202
  • `.composer-row textarea` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — web/src/styles.css:33
  • `.desktop-orb-stage` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — web/src/styles.css:969
  • `.flashbuy-segment-btn:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — examples/smart-cockpit/client/src/App.css:1288
  • `.flashbuy-item:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — examples/smart-cockpit/client/src/App.css:1338
  • `.dock-btn.is-active` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — examples/smart-cockpit/client/src/App.css:1915
  • `.toggle-track::after` moves (`transition: transform 160ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — desktop/src/settings.css:522
  • `:is(.backend-picker-chevron, .settings-picker-chevron)` moves (`transition: transform 140ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — desktop/src/settings.css:655

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AX10 · Code composition8.1 / 10Strong✓ Tool-verified

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

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

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

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.

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.

C2 · Access Controls7.0 / 10Strong✓ Tool-verified

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

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

  • Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect. — REDACTED:538

What to do

  • Name the access rules — roles/permissions declared once (a @Roles/@Permissions decorator with its guard, a CASL ability, a casbin model, or Supabase CREATE POLICY) and consulted where access is checked, so the rule set is reviewable and testable on its own.
GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

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

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

IC1 · Incompleteness & stubs8.0 / 10Strong✓ Tool-verified

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

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

  • `close` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. (×3) — server/src/backend/adapters/llm/backend-adapter.mjs:375, server/src/frontend/tools/client-tool-source.mjs:35, server/src/frontend/tools/openapi/frontend-openapi-adapter.mjs:539
  • The guard above `return 'running';` also returns `'running'`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — web/src/task-view.js:17
  • `initialize` has an empty body — confirm it's an intentional no-op and not an unfinished method. — server/src/frontend/tools/client-tool-source.mjs:32

What to do

  • Clear the softer debt: re-enable or delete skipped tests, decide whether each empty function is a deliberate no-op (and say so in a comment), and replace blanket `eslint-disable` / `@ts-nocheck` with targeted, justified suppressions.
M1 · Documentation (README)9.3 / 10Exemplary✓ 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 documentation5.0 / 10Adequate✓ Tool-verified

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

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

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

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

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

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.7 / 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 4/7 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `.`, `mobile/ios/App`.
  • `server/src/task/task-store.mjs` reports through `console.*` at line 21 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — server/src/task/task-store.mjs:21
  • `server/src/memory/providers/markdown/context-store.mjs` reports through `console.*` at line 87 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — server/src/memory/providers/markdown/context-store.mjs:87
  • `server/src/memory/learning/preference-candidate-store.mjs` reports through `console.*` at line 26 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — server/src/memory/learning/preference-candidate-store.mjs:26
  • `server/src/knowledge/providers/local/library.mjs` reports through `console.*` at line 125 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — server/src/knowledge/providers/local/library.mjs:125
  • `server/src/core/json-snapshot-store.mjs` reports through `console.*` at line 37 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — server/src/core/json-snapshot-store.mjs:37
  • `server/src/core/operation-audit.mjs` reports through `console.*` at line 10 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — server/src/core/operation-audit.mjs:10
  • `server/src/conversation/frontend-notes.mjs` reports through `console.*` at line 91 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — server/src/conversation/frontend-notes.mjs:91
  • `server/src/conversation/session-digest.mjs` reports through `console.*` at line 124 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — server/src/conversation/session-digest.mjs:124

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
P3 · Security & performance tooling3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

  • No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 4 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — .github/workflows/ci.yml:6
  • `REDACTED` schedules updates, but no `package-ecosystem` entry covers `pip`, `gradle`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list. — REDACTED:2

What to do

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

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

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.

  • `readFileSync` in `callback to createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×4) — REDACTED:174, REDACTED:191, REDACTED:559, …
  • `readFileSync` in `extractPolicy` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — examples/customer-service/console/extract.mjs:149
  • `readFileSync` in `runExtraction` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — REDACTED:179, REDACTED:191
  • `mkdtempSync` in `ingest` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — server/src/knowledge/providers/local/provider.mjs:156
  • `rmSync` in `ingest` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — server/src/knowledge/providers/local/provider.mjs:174
  • `rmSync` in `finish` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — server/src/memory/providers/voicemem/provider.mjs:511
  • `spawnSync` in `installBackend` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — shared/backend/install.mjs:639

What to do

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

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

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

  • 0 typed · 754 plain JS — the untyped files are REDACTED, cli/src/config-command.mjs, cli/src/diagnostics.mjs, cli/src/gateway-service.mjs, cli/src/instance-lock.mjs, cli/src/launcher.mjs (+748 more).

What to do

  • Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
R10 · Code Duplication7.5 / 10Strong✓ Tool-verified

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

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

  • 31 duplicated blocks under server/src/ have copies in at least two of the sibling directories access, backend, conversation, core, frontend, knowledge (+4 more sibling(s) not listed) — 20 of them are reported below, and 11 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 31 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 31 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 31 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — server/src/conversation/session-digest.mjs:121
  • 14 duplicated blocks under the repository root have copies in at least two of the sibling directories cli, desktop, scripts, server, shared, tui (+1 more sibling(s) not listed) — 9 of them are reported below, and 5 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 14 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 14 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 14 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — scripts/runtime/launcher.mjs:13
  • 11 duplicated blocks under server/src/backend/adapters/ have copies in at least two of the sibling directories a2a, acp, llm, muse — 10 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 11 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 11 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 11 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — server/src/backend/adapters/llm/backend-adapter.mjs:216
  • 6 duplicated blocks under server/src/frontend/tools/ have copies in at least two of the sibling directories mcp, openapi — 5 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — server/src/frontend/tools/mcp/frontend-mcp-config.mjs:182
  • server/src/frontend/retrieval/providers/bing.mjs:1 · server/src/frontend/retrieval/providers/so360.mjs:1 — the two spans are one implementation copied and then locally edited — 829 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — server/src/frontend/retrieval/providers/bing.mjs:1
  • server/src/memory/learning/extractor.mjs:140 · server/src/memory/learning/profile-observer.mjs:165 — the two spans are one implementation copied and then locally edited — 627 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — server/src/memory/learning/extractor.mjs:140
  • server/src/frontend/tools/mcp/frontend-mcp-config.mjs:182 · server/src/frontend/tools/openapi/frontend-openapi-config.mjs:76 — the two spans are one implementation copied and then locally edited — 496 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — server/src/frontend/tools/mcp/frontend-mcp-config.mjs:182
  • server/src/conversation/session-digest.mjs:121 · server/src/knowledge/providers/local/library.mjs:122 — the two spans are one implementation copied and then locally edited — 347 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — server/src/conversation/session-digest.mjs:121
  • server/src/frontend/tools/mcp/frontend-mcp-config.mjs:24 · server/src/frontend/tools/openapi/frontend-openapi-config.mjs:21 — the two spans are one implementation copied and then locally edited — 316 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — server/src/frontend/tools/mcp/frontend-mcp-config.mjs:24
  • server/src/backend/adapters/acp/input-broker.mjs:70 · server/src/backend/adapters/acp/permission-broker.mjs:145 — the two spans are one implementation copied and then locally edited — 337 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — server/src/backend/adapters/acp/input-broker.mjs:70
  • server/src/core/work-authorization.mjs:49 · server/src/core/work-input-request.mjs:39 — the two spans are one implementation copied and then locally edited — 273 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — server/src/core/work-authorization.mjs:49
  • scripts/runtime/launcher.mjs:13 · shared/backend/setup.mjs:39 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — scripts/runtime/launcher.mjs:13
  • desktop/src/gateway-credential-store.mjs:12 · shared/gateway/file-credential-store.mjs:12 — the two spans are one implementation copied and then locally edited — 296 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — desktop/src/gateway-credential-store.mjs:12
  • scripts/runtime/claude-code-acp.mjs:18 · scripts/runtime/codex-acp.mjs:16 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — scripts/runtime/claude-code-acp.mjs:18
  • server/src/backend/adapters/llm/backend-adapter.mjs:216 · server/src/backend/adapters/muse/backend-adapter.mjs:746 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — server/src/backend/adapters/llm/backend-adapter.mjs:216
  • server/src/voice/providers/gpt-live.mjs:59 · server/src/voice/providers/stepfun.mjs:49 — the two spans are one implementation copied and then locally edited — 204 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — server/src/voice/providers/gpt-live.mjs:59
  • server/src/backend/adapters/acp/session-configuration.mjs:67 · server/src/backend/adapters/acp/session-configuration.mjs:131 — the two spans are one implementation copied and then locally edited — 119 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — server/src/backend/adapters/acp/session-configuration.mjs:67
  • server/src/backend/adapters/llm/backend-adapter.mjs:180 · server/src/backend/adapters/muse/backend-adapter.mjs:419 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — server/src/backend/adapters/llm/backend-adapter.mjs:180
  • server/src/voice/providers/google-live.mjs:17 · server/src/voice/providers/gpt-live.mjs:18 — the two spans are one implementation copied and then locally edited — 229 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — server/src/voice/providers/google-live.mjs:17
  • cli/src/runtime.mjs:363 · server/src/process/managed-backend.mjs:124 — the two spans are one implementation copied and then locally edited — 94 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — cli/src/runtime.mjs:363
  • server/src/voice/providers/dashscope.mjs:180 · server/src/voice/providers/s2s.mjs:121 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — server/src/voice/providers/dashscope.mjs:180
  • tui/src/runtime-configuration.mjs:35 · tui/src/text-cli.mjs:22 — the two spans are one implementation copied and then locally edited — 135 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — tui/src/runtime-configuration.mjs:35
  • shared/gateway/remote-access.mjs:10 · shared/gateway/remote-access.mjs:66 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — shared/gateway/remote-access.mjs:10
  • scripts/runtime/launcher.mjs:99 · server/src/backend/adapters/acp/process-client.mjs:25 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — scripts/runtime/launcher.mjs:99
  • server/src/backend/adapters/a2a/backend-adapter.mjs:661 · server/src/backend/adapters/llm/backend-adapter.mjs:193 · server/src/backend/adapters/muse/backend-adapter.mjs:432 — the 3 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — server/src/backend/adapters/a2a/backend-adapter.mjs:661
  • shared/backend/setup.mjs:171 · shared/backend/setup.mjs:215 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — shared/backend/setup.mjs:171
  • REDACTED:82 · REDACTED:104 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:82
  • shared/runtime-environment.mjs:168 · shared/runtime-environment.mjs:213 — 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. — shared/runtime-environment.mjs:168
  • server/src/backend/adapters/a2a/backend-adapter.mjs:1120 · server/src/backend/adapters/muse/backend-adapter.mjs:867 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — server/src/backend/adapters/a2a/backend-adapter.mjs:1120
  • REDACTED:461 · server/src/backend/adapters/muse/backend-adapter.mjs:441 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:461
  • server/src/backend/adapters/llm/backend-adapter.mjs:335 · server/src/backend/adapters/muse/backend-adapter.mjs:862 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — server/src/backend/adapters/llm/backend-adapter.mjs:335
  • server/src/conversation/session-summariser.mjs:36 · server/src/memory/learning/extractor.mjs:192 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — server/src/conversation/session-summariser.mjs:36
  • REDACTED:309 · REDACTED:335 — the two spans are one implementation copied and then locally edited — 119 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:309
  • shared/protocol/gateway-events.mjs:59 · shared/protocol/gateway-events.mjs:82 — the two spans are one implementation copied and then locally edited — 176 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — shared/protocol/gateway-events.mjs:59
  • cli/src/gateway-service.mjs:274 · cli/src/gateway-service.mjs:290 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — cli/src/gateway-service.mjs:274
  • server/src/backend/adapters/llm/backend-adapter.mjs:118 · server/src/backend/adapters/muse/backend-adapter.mjs:342 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — server/src/backend/adapters/llm/backend-adapter.mjs:118
  • server/src/conversation/frontend-notes.mjs:289 · server/src/core/versioned-json-store.mjs:73 — the two spans are one implementation copied and then locally edited — 91 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — server/src/conversation/frontend-notes.mjs:289
  • server/src/voice/providers/doubao-seeduplex-protocol.mjs:8 · server/src/voice/providers/google-live-protocol.mjs:4 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — server/src/voice/providers/doubao-seeduplex-protocol.mjs:8
  • tui/src/terminal-renderers.mjs:214 · tui/src/terminal-renderers.mjs:377 — 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. — tui/src/terminal-renderers.mjs:214
  • server/src/backend/adapters/a2a/backend-adapter.mjs:476 · REDACTED:134 — the two spans are one implementation copied and then locally edited — 68 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — server/src/backend/adapters/a2a/backend-adapter.mjs:476

What to do

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

React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).

Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.

  • cli/test/backend-setup.test.mjs:6 reaches past another workspace package's public entry into its internals with a relative path (../../shared/backend/setup.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — cli/test/backend-setup.test.mjs:6
  • cli/test/diagnostics.test.mjs:6 reaches past another workspace package's public entry into its internals with a relative path (../../shared/logger.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — cli/test/diagnostics.test.mjs:6
  • cli/test/launcher.test.mjs:18 reaches past another workspace package's public entry into its internals with a relative path (../../shared/realtime-provider-definitions.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — cli/test/launcher.test.mjs:18
  • cli/test/runtime-environment.test.mjs:13 reaches past another workspace package's public entry into its internals with a relative path (../../shared/runtime-environment.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — cli/test/runtime-environment.test.mjs:13
  • cli/test/runtime.test.mjs:14 reaches past another workspace package's public entry into its internals with a relative path (../../shared/realtime-provider-catalog.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — cli/test/runtime.test.mjs:14
  • cli/test/skill-library.test.mjs:6 reaches past another workspace package's public entry into its internals with a relative path (../../shared/skill-library.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — cli/test/skill-library.test.mjs:6
  • cli/test/skill-library.test.mjs:18 reaches past another workspace package's public entry into its internals with a relative path (../../shared/backend/catalog.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — cli/test/skill-library.test.mjs:18
  • cli/test/webrtc.test.mjs:7 reaches past another workspace package's public entry into its internals with a relative path (../../shared/gateway/webrtc.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — cli/test/webrtc.test.mjs:7
  • cli/test/webrtc.test.mjs:8 reaches past another workspace package's public entry into its internals with a relative path (../../shared/realtime-provider-catalog.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead. — cli/test/webrtc.test.mjs:8
  • desktop/smoke/settings-smoke.cjs:9 reaches into another package with a relative path (../../shared/gateway/remote-access.mjs) — import the package by name instead. — desktop/smoke/settings-smoke.cjs:9
  • desktop/smoke/settings-smoke.cjs:14 reaches into another package with a relative path (../../shared/realtime-model-catalog.mjs) — import the package by name instead. — desktop/smoke/settings-smoke.cjs:14
  • desktop/src/backend/configuration.mjs:2 reaches into another package with a relative path (../../../shared/backend/onboarding.mjs) — import the package by name instead. — desktop/src/backend/configuration.mjs:2
  • desktop/src/backend/detection-worker.mjs:3 reaches into another package with a relative path (../../../shared/backend/setup.mjs) — import the package by name instead. — desktop/src/backend/detection-worker.mjs:3
  • desktop/src/backend/detection-worker.mjs:4 reaches into another package with a relative path (../../../shared/backend/auth-status.mjs) — import the package by name instead. — desktop/src/backend/detection-worker.mjs:4
  • desktop/src/backend/installer.mjs:5 reaches into another package with a relative path (../../../shared/backend/install.mjs) — import the package by name instead. — desktop/src/backend/installer.mjs:5
  • desktop/src/backend/management.mjs:3 reaches into another package with a relative path (../../../shared/path-environment.mjs) — import the package by name instead. — desktop/src/backend/management.mjs:3
  • desktop/src/backend/management.mjs:4 reaches into another package with a relative path (../../../shared/backend/install.mjs) — import the package by name instead. — desktop/src/backend/management.mjs:4
  • desktop/src/backend/management.mjs:5 reaches into another package with a relative path (../../../shared/backend/catalog.mjs) — import the package by name instead. — desktop/src/backend/management.mjs:5
  • desktop/src/gateway-connection.mjs:1 reaches into another package with a relative path (../../shared/gateway/access-client.mjs) — import the package by name instead. — desktop/src/gateway-connection.mjs:1
  • desktop/src/gateway-connection.mjs:2 reaches into another package with a relative path (../../shared/gateway/http-client.mjs) — import the package by name instead. — desktop/src/gateway-connection.mjs:2
  • desktop/src/gateway-connection.mjs:3 reaches into another package with a relative path (../../shared/gateway/remote-access.mjs) — import the package by name instead. — desktop/src/gateway-connection.mjs:3
  • desktop/src/gateway-credential-store.mjs:9 reaches into another package with a relative path (../../shared/file-transaction-lock.mjs) — import the package by name instead. — desktop/src/gateway-credential-store.mjs:9
  • desktop/src/gateway-credential-store.mjs:10 reaches into another package with a relative path (../../shared/gateway/connection-profiles.mjs) — import the package by name instead. — desktop/src/gateway-credential-store.mjs:10
  • desktop/src/gateway-process.mjs:2 reaches into another package with a relative path (../../shared/backend/catalog.mjs) — import the package by name instead. — desktop/src/gateway-process.mjs:2
  • desktop/src/gateway-process.mjs:8 reaches into another package with a relative path (../../shared/realtime-provider-catalog.mjs) — import the package by name instead. — desktop/src/gateway-process.mjs:8
  • desktop/src/gateway-process.mjs:12 reaches into another package with a relative path (../../shared/realtime-provider-definitions.mjs) — import the package by name instead. — desktop/src/gateway-process.mjs:12
  • desktop/src/gateway-process.mjs:16 reaches into another package with a relative path (../../shared/gateway/process.mjs) — import the package by name instead. — desktop/src/gateway-process.mjs:16
  • REDACTED:22 reaches into another package with a relative path (../../shared/runtime-environment.mjs) — import the package by name instead. — REDACTED:22
  • REDACTED:25 reaches into another package with a relative path (../../shared/path-environment.mjs) — import the package by name instead. — REDACTED:25
  • REDACTED:26 reaches into another package with a relative path (../../shared/logger.mjs) — import the package by name instead. — REDACTED:26
  • REDACTED:38 reaches into another package with a relative path (../../shared/gateway/http-client.mjs) — import the package by name instead. — REDACTED:38
  • REDACTED:39 reaches into another package with a relative path (../../shared/gateway/connection-profiles.mjs) — import the package by name instead. — REDACTED:39
  • REDACTED:45 reaches into another package with a relative path (../../shared/gateway/lease.mjs) — import the package by name instead. — REDACTED:45
  • REDACTED:74 reaches into another package with a relative path (../../shared/runtime-paths.mjs) — import the package by name instead. — REDACTED:74
  • REDACTED:75 reaches into another package with a relative path (../../shared/realtime-provider-catalog.mjs) — import the package by name instead. — REDACTED:75
  • REDACTED:83 reaches into another package with a relative path (../../shared/orb-skin-catalog.mjs) — import the package by name instead. — REDACTED:83
  • desktop/src/process-path.mjs:4 reaches into another package with a relative path (../../REDACTED) — import the package by name instead. — desktop/src/process-path.mjs:4
  • desktop/src/realtime-settings-form.mjs:1 reaches into another package with a relative path (../../shared/realtime-provider-definitions.mjs) — import the package by name instead. — desktop/src/realtime-settings-form.mjs:1
  • desktop/src/realtime-settings-form.mjs:2 reaches into another package with a relative path (../../shared/realtime-model-catalog.mjs) — import the package by name instead. — desktop/src/realtime-settings-form.mjs:2
  • desktop/src/realtime-status.mjs:1 reaches into another package with a relative path (../../shared/realtime-model-catalog.mjs) — import the package by name instead. — desktop/src/realtime-status.mjs:1

What to do

  • Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
R2 · Cyclomatic Complexity7.0 / 10Strong✓ Tool-verified

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

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

  • parseCommandArguments has cyclomatic complexity 164 and cognitive complexity 158; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:89
  • executeReservationsTool has cyclomatic complexity 124 and cognitive complexity 208; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — examples/customer-service/service/tools/reservations/execute.mjs:149
  • main has cyclomatic complexity 118 and cognitive complexity 192; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — cli/src/launcher.mjs:229
  • execute has cyclomatic complexity 88 and cognitive complexity 130; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — examples/customer-service/agent/executor.mjs:486
  • (anonymous) has cyclomatic complexity 86 and cognitive complexity 112; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:514
  • App has cyclomatic complexity 78 and cognitive complexity 86; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:196
  • handleClientEvent has cyclomatic complexity 73 and cognitive complexity 104; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/src/voice/realtime-session-runtime.mjs:913
  • handleLifecycle has cyclomatic complexity 63 and cognitive complexity 96; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/src/voice/realtime-provider.mjs:911
  • handleEvent has cyclomatic complexity 52 and cognitive complexity 69; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/src/voice/realtime-session-runtime.mjs:585
  • executeReturnsTool has cyclomatic complexity 48 and cognitive complexity 72; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — examples/customer-service/service/tools/returns/execute.mjs:77
  • decodeDhavRecord has cyclomatic complexity 48 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — examples/digital-human/client/dhav-decoder.mjs:6
  • collectDiagnostics has cyclomatic complexity 47 and cognitive complexity 80; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — cli/src/diagnostics.mjs:69
  • explicitRuntime has cyclomatic complexity 46 and cognitive complexity 81; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — shared/backend/setup.mjs:168
  • receive has cyclomatic complexity 46 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/src/transport/webrtc/protocol.mjs:71
  • inspectBackend has cyclomatic complexity 46 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — shared/backend/setup.mjs:326
  • #responseDone has cyclomatic complexity 46 and cognitive complexity 52; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/src/voice/realtime-presentation-runtime.mjs:349
  • applyDesktopSettings has cyclomatic complexity 45 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1023
  • runServiceAgent has cyclomatic complexity 43 and cognitive complexity 74; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — examples/customer-service/agent/executor.mjs:315
  • restore has cyclomatic complexity 42 and cognitive complexity 71; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/src/task/task-manager.mjs:148
  • handleGateway has cyclomatic complexity 41 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — examples/digital-human/client/avatar-playback.mjs:28
  • onEvent has cyclomatic complexity 40 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/src/task/task-manager.mjs:674
  • handle has cyclomatic complexity 40 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tui/src/terminal-renderers.mjs:110
  • handleGatewayMessage has cyclomatic complexity 39 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — tui/src/index.mjs:420
  • #route has cyclomatic complexity 38 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:84
  • normalizeKnowledgeRetrievalResponse has cyclomatic complexity 37 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/src/knowledge/provider.mjs:215
  • memory has cyclomatic complexity 36 and cognitive complexity 52; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/src/memory/tools.mjs:79
  • installBackend has cyclomatic complexity 36 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — shared/backend/install.mjs:449
  • ensureRuntime has cyclomatic complexity 36 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — cli/src/runtime.mjs:430
  • handleMessage has cyclomatic complexity 36 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — examples/digital-human/client/renderers/dhav.mjs:53
  • App has cyclomatic complexity 36 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — examples/digital-human/client/App.jsx:71
  • updateTask has cyclomatic complexity 36 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/src/orchestration/task-updates.mjs:7
  • operationInput has cyclomatic complexity 34 and cognitive complexity 47; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/src/frontend/tools/openapi/frontend-openapi-adapter.mjs:118
  • taskView has cyclomatic complexity 34 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/src/task-view.js:176
  • taskDetail has cyclomatic complexity 33 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/src/task-view.js:94
  • handle has cyclomatic complexity 33 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/src/frontend/tools/tool-call-handler.mjs:530
  • normalizeKnowledgeDocument has cyclomatic complexity 33 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/src/knowledge/provider.mjs:50
  • consumeStream has cyclomatic complexity 32 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — server/src/backend/adapters/a2a/backend-adapter.mjs:919
  • (anonymous) has cyclomatic complexity 32 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — examples/digital-human/server/renderers/vidu.mjs:140
  • handleGateway has cyclomatic complexity 32 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — examples/digital-human/client/renderers/vidu.mjs:61
  • #handle has cyclomatic complexity 31 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:108
R3 · Large Files6.5 / 10Adequate✓ Tool-verified

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

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

  • REDACTED has 2010 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 1489 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 1314 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • server/src/voice/realtime-provider.mjs has 1288 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/src/voice/realtime-provider.mjs:1
  • server/src/voice/realtime-session-runtime.mjs has 1235 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/src/voice/realtime-session-runtime.mjs:1
  • server/src/backend/adapters/a2a/backend-adapter.mjs has 1171 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/src/backend/adapters/a2a/backend-adapter.mjs:1
  • web/src/realtime/useRealtimeVoice.js has 1138 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/realtime/useRealtimeVoice.js:1
  • desktop/src/settings.js has 1104 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — desktop/src/settings.js:1
  • server/src/task/task-manager.mjs has 1086 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/src/task/task-manager.mjs:1
  • server/src/backend/adapters/muse/backend-adapter.mjs has 870 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/src/backend/adapters/muse/backend-adapter.mjs:1
  • REDACTED has 814 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • server/src/backend/adapters/acp/process-client.mjs has 808 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/src/backend/adapters/acp/process-client.mjs:1
  • server/src/voice/realtime-presentation-runtime.mjs has 723 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/src/voice/realtime-presentation-runtime.mjs:1
  • tui/src/index.mjs has 703 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — tui/src/index.mjs:1
  • cli/src/launcher.mjs has 694 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — cli/src/launcher.mjs:1
  • shared/backend/install.mjs has 664 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — shared/backend/install.mjs:1
  • tui/src/terminal-renderers.mjs has 654 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — tui/src/terminal-renderers.mjs:1
  • server/src/frontend/tools/tool-call-handler.mjs has 635 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/src/frontend/tools/tool-call-handler.mjs:1
  • server/src/core/config.mjs has 632 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/src/core/config.mjs:1
  • shared/protocol/gateway-client-protocol.mjs has 581 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — shared/protocol/gateway-client-protocol.mjs:1
  • shared/backend/setup.mjs has 575 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — shared/backend/setup.mjs:1
  • server/src/transport/gateway-client-transport.mjs has 573 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/src/transport/gateway-client-transport.mjs:1
  • REDACTED has 541 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • shared/backend/catalog.mjs has 538 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — shared/backend/catalog.mjs:1
  • cli/src/runtime.mjs has 536 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — cli/src/runtime.mjs:1
  • server/src/memory/providers/voicemem/provider.mjs has 531 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/src/memory/providers/voicemem/provider.mjs:1
  • REDACTED has 526 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • server/src/memory/learning/preference-candidates.mjs has 517 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/src/memory/learning/preference-candidates.mjs:1
  • server/src/frontend/tools/openapi/frontend-openapi-adapter.mjs has 514 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/src/frontend/tools/openapi/frontend-openapi-adapter.mjs:1
  • server/src/conversation/frontend-notes.mjs has 510 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/src/conversation/frontend-notes.mjs:1
  • REDACTED has 478 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • shared/gateway/client-sdk.mjs has 469 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — shared/gateway/client-sdk.mjs:1
  • server/src/voice/announcement/announcement-manager.mjs has 457 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/src/voice/announcement/announcement-manager.mjs:1
  • desktop/src/settings-config.mjs has 447 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — desktop/src/settings-config.mjs:1
  • desktop/smoke/settings-smoke.cjs has 446 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — desktop/smoke/settings-smoke.cjs:1
  • server/src/memory/learning/profile-observer.mjs has 444 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/src/memory/learning/profile-observer.mjs:1
  • server/src/knowledge/providers/local/library.mjs has 430 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — server/src/knowledge/providers/local/library.mjs:1

What to do

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

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

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

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×17) — REDACTED:1, web/src/composer/VideoCallPanel.jsx:1, web/src/KnowledgeLibraryPanel.jsx:1, …

What to do

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

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

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

R6 · Tooling6.7 / 10Adequate✓ Tool-verified

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

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

  • test ✓ · lint ✓ · typecheck ✗ — read from this repository's REDACTED scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
  • The root package declares the lint script `lint` (`eslint .`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `.` (or the workspace's task runner). — REDACTED:317

What to do

  • Add type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as REDACTED scripts and run them in CI.
R7 · Dead Code8.4 / 10Strong✓ Tool-verified

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

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

  • 439 file(s) (~92379 LoC) were excluded from dead-code analysis. This package's entry point(s) resolved, but the walk stopped one hop in: server/test/optional-modules-pruning.test.mjs imports './server/src/core/config.mjs', which is not in the scanned tree. That is usually a generated or build-output module, so reachability cannot see past it and no dead-code claim is made about this package. Nothing is necessarily wrong here. — server
  • Unreachable from the 273 application, 34 tooling and 435 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (273 application, 34 tooling, 435 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (desktop/smoke/electron-smoke.cjs) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×4) — desktop/smoke/settings-smoke.cjs, desktop/smoke/conversation-smoke.cjs, desktop/smoke/custom-acp-settings-smoke.cjs, …
  • no import path from any entry point (273 application, 34 tooling, 435 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×5) — examples/customer-service/benchmark/eva-harness-bridge.mjs, desktop/smoke/electron-smoke.cjs, examples/customer-service/benchmark/compare-harness.mjs, …
  • Nothing imports this binding — it is safe to review for removal. (×28) — desktop/src/wake-word/model-manager.mjs:19, examples/customer-service/agent/executor.mjs:80, examples/customer-service/service/guards.mjs:77, …

What to do

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

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

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

  • Imported but not declared in any reachable REDACTED — installs work only by hoisting accident. (×2) — scripts/test/desktop-package-smoke.mjs:10, server/src/process/backend-drivers/openclaw-auth.mjs:10
  • Declared in the root REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — REDACTED:347
  • Declared in mobile/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2) — mobile/package.json:23, mobile/package.json:24
  • Declared in server/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — server/package.json:14

What to do

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

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

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

S1 · Web-Security Posture6.0 / 10Adequate✓ Tool-verified

Other · Security — Read from this repository's JavaScript/TypeScript source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. Of the server controls, two are read where the source shows them: every session or sign-in cookie the code sets is read for HttpOnly, Secure and SameSite at the line that sets it (a raw `Set-Cookie` header, Express, Fastify, Hono, Koa, Next.js, `cookie.serialize`, express-session and cookie-session), and every Node listener for HTTPS enforcement. HSTS, security response headers and input validation are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository. Its Node HTTP listeners were read for HTTPS enforcement alone — TLS served, a redirect to https:// or HSTS, or a TLS-terminating proxy configuration committed beside the server — each judged per server package.

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.

  • MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×5) — server/src/conversation/frontend-notes.mjs:147, server/src/core/json-snapshot-store.mjs:71, server/src/core/json-snapshot-store.mjs:116, …
  • `server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.) (×3) — REDACTED:453, REDACTED:168, server/src/process/managed-backend.mjs:98

What to do

  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 5 sites, not one: `server/src/conversation/frontend-notes.mjs:147` (createHash("sha1")), `server/src/core/json-snapshot-store.mjs:71` (createHash("sha1")), `server/src/core/json-snapshot-store.mjs:116` (createHash("sha1")), `server/src/core/json-snapshot-store.mjs:134` (createHash("sha1")), `server/src/knowledge/providers/local/library.mjs:262` (createHash("sha1")). Each is a separate decision — fixing only the line this row cites leaves the others in place.
  • Enforce HTTPS on each listed server: serve TLS itself, or redirect plain requests to `https://` and send `Strict-Transport-Security` (`helmet()` does by default) behind the TLS-terminating proxy — and commit that proxy's configuration beside the service. A server only this machine reaches should bind `127.0.0.1`.
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.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

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.

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

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

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

X2 · Cancellation propagation7.0 / 10Strong✓ Tool-verified

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

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

  • Only 1/2 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `runCli` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — tui/src/text-cli.mjs:80

What to do

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

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

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

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

X24 · Document value interpolated into markup unescaped5.9 / 10Adequate✓ Tool-verified

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

  • `[...content].slice(0,this.maxChars).join('')` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — server/src/memory/providers/markdown/context-store.mjs:111

What to do

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

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

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

  • `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×9) — REDACTED:307, REDACTED:545, REDACTED:949, …
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×26) — REDACTED:321, web/src/i18n.js:201, web/src/realtime/audio.js:193, …
  • `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. (×5) — tui/src/index.mjs:424, tui/src/input-parts.mjs:145, tui/src/macos-voice-io.mjs:114, …

What to do

  • Swallowed exception (empty catch)
X5 · Nullable reference types2.0 / 10Critical✓ Tool-verified

Other · Code Health — Whether Java packages are null-marked and not undermined by heavy nullness suppression — a package under `@NullMarked` (or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, or a NullAway/Checker Framework configuration naming it) makes an unannotated reference exclude null, and `@SuppressWarnings("NullAway")`, `("nullness")`, `("null")` and `castToNonNull(…)` are what silence it.

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

  • 0/1 of this repository's Java package directories are under a non-null default: a `package-info.java` declaring `@NullMarked` (JSpecify) or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, `@DefaultQualifier(NonNull.class)`; a `module-info.java` declaring `@NullMarked`; every type in it `@NullMarked`; or a build that runs NullAway with the package in `AnnotatedPackages`, or the Checker Framework's `NullnessChecker`. Elsewhere every reference admits null and no checker warns on the dereference that throws a `NullPointerException`.

What to do

  • Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and run NullAway (Error Prone) or the Checker Framework so the declaration is enforced. Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).

WCAG coverage — what static analysis assessed

Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

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

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

Reference — by lens

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

LensScoreRatingImpact
Code Health36.4Weak — gated by D1, D2, R1, X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture64.0Adequate — gated by R11Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity79.0StrongStrongest area.
Readiness58.2Adequate — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security67.0Adequate — gated by D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility42.9Weak — gated by AC4, AC6Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60.0AdequateAcceptable, with room to improve.
Unscored — 2 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 28 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for

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

  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 46 check(s) not relevant to this codebase

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

  • AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX2 Stateful singletons — 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 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. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — no public interfaces
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the Android app did not build — `./gradlew :app:assembleDebug` exited 1: ith an exception. * Where: Script 'mobile/android/app/capacitor.build.gradle' line: 10 * What went wrong: A problem occurred evaluating script. >…; runtime evidence skipped (launch chosen because mobile/android/app/build.gradle applies the Android application plugin and mobile/android/gradlew builds it) This is a statement about this run, not a statement about your application: nothing here says the app is inaccessible, only that it was never run.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no data at rest for these controls to protect. If it does persist personal data (through a hosted backend configured outside this repository, for instance), the controls belong to wherever that data is stored.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound. If it does (through a hosted backend configured outside this repository, for instance), the limit belongs wherever that data is stored.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over. If it does (through a hosted backend configured outside this repository, for instance), the rights are served wherever that data is stored.
  • D12 Dependency Hygiene — Not scored — 2 Maven/Gradle manifest(s) were read, stating a version for 0 dependency(ies) and leaving 4 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 — SwiftPM package licences not graded — no dependency repository could be read
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go only; the exposed JavaScript surface was not measured.
  • D25 ADR Conformance — no ADRs to check
  • 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) — 2 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D4 Code Duplication — This repository's production source (.cjs, .js, .jsx, .mjs) is not read by D4's token comparison, which compares .NET source: duplication in it is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream. Not scored here — read the R10 card for this repository's duplication. The rest — .html (1,865 lines, 1.9% of production source) — is compared by neither card, so duplication there is unmeasured; it is a corner of this repository, not its product.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • 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
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • 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 data present for 1038 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a REDACTED, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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
  • X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 32 finding(s)
D30 · Dependency Vulnerabilities · High CVE · ×17
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Boundary-crossing change coupling · ×2
  • Boundary-crossing change coupling: tool-call-handler.mjs ↔ gateway-client-transport.mjs server/src/frontend/tools/tool-call-handler.mjs:1 — `server/src/frontend/tools/tool-call-handler.mjs` (context tools) and `server/src/transport/gateway-client-transport.mjs` (context transport) sit in DIFFERENT parts of the tree yet change together 66% of the time (27 of the 41 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 27 shared commits counted here, the most recent 3 are `8a0adc9b` refactor(orchestration): share user task operations across entry poin… (at that commit the file was still `server/src/voice/realtime-gateway.mjs`); `76c49919` car fix debug panel (#315) (at that commit the files were still `server/src/voice/tools/tool-call-handler.mjs` and `server/src/voice/realtime-gateway.mjs`); `eaf0036a` fix(realtime): stabilize client replacement and latency tracing (at that commit the files were still `server/src/voice/tools/tool-call-handler.mjs` and `server/src/voice/realtime-gateway.mjs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: gateway-client-transport.mjs ↔ realtime-provider.mjs server/src/transport/gateway-client-transport.mjs:1 — `server/src/transport/gateway-client-transport.mjs` (context transport) and `server/src/voice/realtime-provider.mjs` (context voice) sit in DIFFERENT parts of the tree yet change together 57% of the time (21 of the 37 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 21 shared commits counted here, the most recent 3 are `83af7bbe` fix(transport): bound websocket audio and control send buffers (#504); `b21435e9` fix: recover realtime sessions after safety errors (at that commit the file was still `server/src/voice/realtime-gateway.mjs`); `70dd204c` feat(gateway): add GCP3 agent delivery (#257) (at that commit the file was still `server/src/voice/realtime-gateway.mjs`) — run `git show` on any of them.
AC2 · Forms & labels · <label> that labels no control · ×1
  • <label> that labels no control REDACTED:1392 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC2 · Forms & labels · <input> without a programmatic label · ×1
  • <input> without a programmatic label web/src/KnowledgeLibraryPanel.jsx:143 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
AC2 · Forms & labels · <textarea> without a programmatic label · ×1
  • <textarea> without a programmatic label web/src/composer/MultimodalComposer.jsx:142 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
AC4 · Keyboard semantics · Clickable element isn't keyboard-operable · ×1
  • Clickable element isn't keyboard-operable web/src/MessageContent.jsx:44 — The repo's own CSS styles .media-image with `cursor: pointer`, so this <img> is a control — but it has no role, no tabIndex={0} and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabIndex={0} + a key handler.
D10 · Test Quality · No assertions (empty test) · ×1
  • No assertions (empty test): renderer close propagates to onClose examples/digital-human/test/media-adapter.test.mjs:186 — Test method has an empty body — it asserts nothing and exercises no code.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import '@electron/asar' · ×1
  • Unlisted import '@electron/asar' scripts/test/desktop-package-smoke.mjs:10 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'json5' · ×1
  • Unlisted import 'json5' server/src/process/backend-drivers/openclaw-auth.mjs:10 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
Serious — 1052 finding(s)
D8 · Code Coverage · Low coverage · ×197
  • Low coverage: /server/src/backend/backend-adapter-conformance.mjs server/src/backend/backend-adapter-conformance.mjs:1 — 13.8% line coverage (16/116).
  • Low coverage: /server/src/backend/backend-adapter-sdk.mjs server/src/backend/backend-adapter-sdk.mjs:1 — 47.9% line coverage (34/71).
  • Low coverage: /server/src/backend/backend-work-runtime.mjs server/src/backend/backend-work-runtime.mjs:1 — 37.2% line coverage (32/86).
  • Low coverage: /server/src/frontend/mcp-tool-discovery.mjs server/src/frontend/mcp-tool-discovery.mjs:1 — 14.3% line coverage (3/21).
  • Low coverage: /server/src/frontend/retrieval/providers/bing.mjs server/src/frontend/retrieval/providers/bing.mjs:1 — 15.1% line coverage (26/172).
  • Low coverage: /server/src/frontend/retrieval/providers/factory.mjs server/src/frontend/retrieval/providers/factory.mjs:1 — 33.3% line coverage (13/39).
  • Low coverage: /server/src/frontend/retrieval/providers/mcp.mjs server/src/frontend/retrieval/providers/mcp.mjs:1 — 15.6% line coverage (42/270).
  • Low coverage: /server/src/frontend/retrieval/providers/so360.mjs server/src/frontend/retrieval/providers/so360.mjs:1 — 19.4% line coverage (37/191).
  • Low coverage: /server/src/frontend/retrieval/safe-url-fetcher.mjs server/src/frontend/retrieval/safe-url-fetcher.mjs:1 — 26.5% line coverage (75/283).
  • Low coverage: /shared/input-parts.mjs shared/input-parts.mjs:1 — 16.9% line coverage (48/284).
  • Low coverage: /tmp/benchmark/tau-scenarios.mjs tmp/benchmark/tau-scenarios.mjs:1 — 18.8% line coverage (34/181).
  • Low coverage: /tmp/bootstrap/environment.mjs tmp/bootstrap/environment.mjs:1 — 36.0% line coverage (9/25).
  • Low coverage: examples/customer-service/benchmark/realtime-harness.mjs examples/customer-service/benchmark/realtime-harness.mjs:1 — 46.5% line coverage (121/260).
  • Low coverage: examples/smart-cockpit/bench/runner/voice-surface-worker.mjs examples/smart-cockpit/bench/runner/voice-surface-worker.mjs:1 — 31.8% line coverage (310/976).
  • Low coverage: examples/smart-cockpit/client/src/hooks/useVoiceSession.js examples/smart-cockpit/client/src/hooks/useVoiceSession.js:1 — 47.7% line coverage (323/677).
  • Low coverage: scripts/release-plan.mjs scripts/release-plan.mjs:1 — 46.7% line coverage (64/137).
  • Low coverage: scripts/verify-package.mjs scripts/verify-package.mjs:1 — 37.5% line coverage (111/296).
  • Low coverage: server/src/access/browser-pairing-page.mjs server/src/access/browser-pairing-page.mjs:1 — 5.6% line coverage (1/18).
  • Low coverage: server/src/access/device-connection.mjs server/src/access/device-connection.mjs:1 — 42.9% line coverage (9/21).
  • Low coverage: REDACTED REDACTED:1 — 42.8% line coverage (180/421).
  • Low coverage: REDACTED REDACTED:1 — 39.7% line coverage (62/156).
  • Low coverage: server/src/access/tailscale-serve.mjs server/src/access/tailscale-serve.mjs:1 — 16.0% line coverage (34/212).
  • Low coverage: server/src/app/offline-notifications.mjs server/src/app/offline-notifications.mjs:1 — 40.0% line coverage (12/30).
  • Low coverage: REDACTED REDACTED:1 — 10.7% line coverage (224/2095).
  • Low coverage: server/src/backend/adapters/acp/backend-factory.mjs server/src/backend/adapters/acp/backend-factory.mjs:1 — 21.0% line coverage (13/62).
  • + 172 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×80
  • Hotspot: REDACTED REDACTED:196 — REDACTED changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 317 in App.App at line 196. 11 of those changes were fix/bug commits, and the other 25 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: server/src/transport/gateway-client-transport.mjs server/src/transport/gateway-client-transport.mjs:146 — server/src/transport/gateway-client-transport.mjs changed 72 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in gateway-client-transport.attachGatewayClientTransport.attachClient at line 146. 4 of those changes were fix/bug commits, and the other 68 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- server/src/transport/gateway-client-transport.mjs`: 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: REDACTED REDACTED:89 — REDACTED changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 164 in arguments.parseCommandArguments at line 89. 5 of those changes were fix/bug commits, and the other 13 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: cli/src/launcher.mjs cli/src/launcher.mjs:229 — cli/src/launcher.mjs changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 124 in launcher.main at line 229. 5 of those changes were fix/bug commits, and the other 15 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- cli/src/launcher.mjs`: 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: REDACTED REDACTED:63 — REDACTED changed 61 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in gateway-application.createGatewayApplication at line 63. 8 of those changes were fix/bug commits, and the other 53 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: web/src/realtime/useRealtimeVoice.js web/src/realtime/useRealtimeVoice.js:206 — web/src/realtime/useRealtimeVoice.js changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 71 in useRealtimeVoice.useRealtimeVoice at line 206. 5 of those changes were fix/bug commits, and the other 20 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- web/src/realtime/useRealtimeVoice.js`: 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: server/src/voice/realtime-provider.mjs server/src/voice/realtime-provider.mjs:911 — server/src/voice/realtime-provider.mjs changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 63 in RealtimeFrontend.handleLifecycle at line 911. 12 of those changes were fix/bug commits, and the other 15 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- server/src/voice/realtime-provider.mjs`: 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: server/src/task/task-manager.mjs server/src/task/task-manager.mjs:658 — server/src/task/task-manager.mjs changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 76 in TaskManager.start at line 658. 4 of those changes were fix/bug commits, and the other 18 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- server/src/task/task-manager.mjs`: 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: tui/src/index.mjs tui/src/index.mjs:141 — tui/src/index.mjs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 118 in index.runTui at line 141. 1 of those changes was a fix/bug commit, and the other 11 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- tui/src/index.mjs`: 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: server/src/frontend/tools/tool-call-handler.mjs server/src/frontend/tools/tool-call-handler.mjs:530 — server/src/frontend/tools/tool-call-handler.mjs changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in ToolCallHandler.handle at line 530. 3 of those changes were fix/bug commits, and the other 39 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- server/src/frontend/tools/tool-call-handler.mjs`: 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: examples/smart-cockpit/client/src/App.jsx examples/smart-cockpit/client/src/App.jsx:110 — examples/smart-cockpit/client/src/App.jsx changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 77 in App.App at line 110. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- examples/smart-cockpit/client/src/App.jsx`: 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: REDACTED REDACTED:1023 — REDACTED changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in main.applyDesktopSettings at line 1023. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:44 — REDACTED changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 145 in MapPanel.MapPanel at line 44. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: server/src/voice/realtime-session-runtime.mjs server/src/voice/realtime-session-runtime.mjs:913 — server/src/voice/realtime-session-runtime.mjs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 76 in realtime-session-runtime.createRealtimeSessionRuntime.handleClientEvent at line 913. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- server/src/voice/realtime-session-runtime.mjs`: 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: desktop/src/settings.js desktop/src/settings.js:363 — desktop/src/settings.js changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in settings.renderBackendOptions at line 363. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- desktop/src/settings.js`: 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: REDACTED REDACTED:657 — REDACTED changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in AcpBackendAdapter.onSessionUpdate at line 657. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: server/src/voice/realtime-presentation-runtime.mjs server/src/voice/realtime-presentation-runtime.mjs:349 — server/src/voice/realtime-presentation-runtime.mjs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in RealtimePresentationRuntime.#responseDone at line 349. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- server/src/voice/realtime-presentation-runtime.mjs`: 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: examples/smart-cockpit/client/src/hooks/useVoiceSession.js examples/smart-cockpit/client/src/hooks/useVoiceSession.js:114 — examples/smart-cockpit/client/src/hooks/useVoiceSession.js changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in useVoiceSession.useVoiceSession at line 114. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- examples/smart-cockpit/client/src/hooks/useVoiceSession.js`: 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: examples/smart-cockpit/agent/executor.mjs examples/smart-cockpit/agent/executor.mjs:194 — examples/smart-cockpit/agent/executor.mjs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in executor.runCockpitAgent at line 194. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- examples/smart-cockpit/agent/executor.mjs`: 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: examples/customer-service/agent/executor.mjs examples/customer-service/agent/executor.mjs:486 — examples/customer-service/agent/executor.mjs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 88 in ServiceAgentExecutor.execute at line 486. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- examples/customer-service/agent/executor.mjs`: 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: shared/gateway/client-sdk.mjs shared/gateway/client-sdk.mjs:265 — shared/gateway/client-sdk.mjs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in GatewayClient.#connect at line 265. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- shared/gateway/client-sdk.mjs`: 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: examples/smart-cockpit/client/src/components/ChatPanel.jsx examples/smart-cockpit/client/src/components/ChatPanel.jsx:96 — examples/smart-cockpit/client/src/components/ChatPanel.jsx changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in ChatPanel.ChatPanel at line 96. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- examples/smart-cockpit/client/src/components/ChatPanel.jsx`: 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: shared/runtime-environment.mjs shared/runtime-environment.mjs:247 — shared/runtime-environment.mjs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in runtime-environment.loadRuntimeEnvironment at line 247. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- shared/runtime-environment.mjs`: 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: server/src/backend/adapters/a2a/backend-adapter.mjs server/src/backend/adapters/a2a/backend-adapter.mjs:919 — server/src/backend/adapters/a2a/backend-adapter.mjs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in A2ABackendAdapter.consumeStream at line 919. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- server/src/backend/adapters/a2a/backend-adapter.mjs`: 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: tui/src/text-cli.mjs tui/src/text-cli.mjs:80 — tui/src/text-cli.mjs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in text-cli.runCli at line 80. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- tui/src/text-cli.mjs`: 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.
  • + 55 more in this group — see findings.md.
R11 · Import Boundaries · Boundary violation [package · ×40
  • Boundary violation [package:test-cross-package-internals] cli/test/backend-setup.test.mjs:6 — cli/test/backend-setup.test.mjs:6 reaches past another workspace package's public entry into its internals with a relative path (../../shared/backend/setup.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] cli/test/diagnostics.test.mjs:6 — cli/test/diagnostics.test.mjs:6 reaches past another workspace package's public entry into its internals with a relative path (../../shared/logger.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] cli/test/launcher.test.mjs:18 — cli/test/launcher.test.mjs:18 reaches past another workspace package's public entry into its internals with a relative path (../../shared/realtime-provider-definitions.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] cli/test/runtime-environment.test.mjs:13 — cli/test/runtime-environment.test.mjs:13 reaches past another workspace package's public entry into its internals with a relative path (../../shared/runtime-environment.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] cli/test/runtime.test.mjs:14 — cli/test/runtime.test.mjs:14 reaches past another workspace package's public entry into its internals with a relative path (../../shared/realtime-provider-catalog.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] cli/test/skill-library.test.mjs:6 — cli/test/skill-library.test.mjs:6 reaches past another workspace package's public entry into its internals with a relative path (../../shared/skill-library.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] cli/test/skill-library.test.mjs:18 — cli/test/skill-library.test.mjs:18 reaches past another workspace package's public entry into its internals with a relative path (../../shared/backend/catalog.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] cli/test/webrtc.test.mjs:7 — cli/test/webrtc.test.mjs:7 reaches past another workspace package's public entry into its internals with a relative path (../../shared/gateway/webrtc.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:test-cross-package-internals] cli/test/webrtc.test.mjs:8 — cli/test/webrtc.test.mjs:8 reaches past another workspace package's public entry into its internals with a relative path (../../shared/realtime-provider-catalog.mjs) — the test is coupled to a file layout that package makes no promise about, so a refactor behind its entry point breaks the suite. Import the package by name instead.
  • Boundary violation [package:relative-cross-package] desktop/smoke/settings-smoke.cjs:9 — desktop/smoke/settings-smoke.cjs:9 reaches into another package with a relative path (../../shared/gateway/remote-access.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] desktop/smoke/settings-smoke.cjs:14 — desktop/smoke/settings-smoke.cjs:14 reaches into another package with a relative path (../../shared/realtime-model-catalog.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] desktop/src/backend/configuration.mjs:2 — desktop/src/backend/configuration.mjs:2 reaches into another package with a relative path (../../../shared/backend/onboarding.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] desktop/src/backend/detection-worker.mjs:3 — desktop/src/backend/detection-worker.mjs:3 reaches into another package with a relative path (../../../shared/backend/setup.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] desktop/src/backend/detection-worker.mjs:4 — desktop/src/backend/detection-worker.mjs:4 reaches into another package with a relative path (../../../shared/backend/auth-status.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] desktop/src/backend/installer.mjs:5 — desktop/src/backend/installer.mjs:5 reaches into another package with a relative path (../../../shared/backend/install.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] desktop/src/backend/management.mjs:3 — desktop/src/backend/management.mjs:3 reaches into another package with a relative path (../../../shared/path-environment.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] desktop/src/backend/management.mjs:4 — desktop/src/backend/management.mjs:4 reaches into another package with a relative path (../../../shared/backend/install.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] desktop/src/backend/management.mjs:5 — desktop/src/backend/management.mjs:5 reaches into another package with a relative path (../../../shared/backend/catalog.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] desktop/src/gateway-connection.mjs:1 — desktop/src/gateway-connection.mjs:1 reaches into another package with a relative path (../../shared/gateway/access-client.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] desktop/src/gateway-connection.mjs:2 — desktop/src/gateway-connection.mjs:2 reaches into another package with a relative path (../../shared/gateway/http-client.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] desktop/src/gateway-connection.mjs:3 — desktop/src/gateway-connection.mjs:3 reaches into another package with a relative path (../../shared/gateway/remote-access.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] desktop/src/gateway-credential-store.mjs:9 — desktop/src/gateway-credential-store.mjs:9 reaches into another package with a relative path (../../shared/file-transaction-lock.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] desktop/src/gateway-credential-store.mjs:10 — desktop/src/gateway-credential-store.mjs:10 reaches into another package with a relative path (../../shared/gateway/connection-profiles.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] desktop/src/gateway-process.mjs:2 — desktop/src/gateway-process.mjs:2 reaches into another package with a relative path (../../shared/backend/catalog.mjs) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] desktop/src/gateway-process.mjs:8 — desktop/src/gateway-process.mjs:8 reaches into another package with a relative path (../../shared/realtime-provider-catalog.mjs) — import the package by name instead.
  • + 15 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×35
  • Swallowed exception (empty catch) REDACTED:307 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) REDACTED:321 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:545 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) REDACTED:949 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) REDACTED:1029 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) web/src/i18n.js:201 — 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) web/src/realtime/audio.js:193 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) web/src/realtime/playback-lifecycle.js:55 — 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) web/src/realtime/playback-lifecycle.js:63 — 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) web/src/realtime/playback-lifecycle.js:103 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) web/src/realtime/useRealtimeVoice.js:400 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:60 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) web/src/composer/VideoCallPanel.jsx:102 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) tui/native/portaudio-voice-io.py:228 — 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) tui/native/portaudio-voice-io.py:232 — 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) shared/file-transaction-lock.mjs:18 — 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) shared/file-transaction-lock.mjs:174 — 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) shared/logger.mjs:307 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:55 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:65 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:140 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:158 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:215 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:301 — 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) shared/gateway/client-sdk.mjs:393 — 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.
  • + 10 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×34
  • FunctionTooLong: App.App REDACTED:196 — FunctionTooLong — App runs 1086 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 986 over it, 10.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.
  • FunctionTooLong: realtime-session-runtime.createRealtimeSessionRuntime server/src/voice/realtime-session-runtime.mjs:71 — FunctionTooLong — createRealtimeSessionRuntime runs 923 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 823 over it, 9.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.
  • FunctionTooLong: useRealtimeVoice.useRealtimeVoice web/src/realtime/useRealtimeVoice.js:206 — FunctionTooLong — useRealtimeVoice runs 801 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 701 over it, 8.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.runTui tui/src/index.mjs:141 — FunctionTooLong — runTui runs 441 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 341 over it, 4.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: gateway-client-transport.attachGatewayClientTransport server/src/transport/gateway-client-transport.mjs:62 — FunctionTooLong — attachGatewayClientTransport runs 399 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 299 over it, 3.99× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: gateway-application.createGatewayApplication REDACTED:63 — FunctionTooLong — createGatewayApplication runs 379 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 279 over it, 3.79× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: launcher.main cli/src/launcher.mjs:229 — FunctionTooLong — main runs 376 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 276 over it, 3.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: gateway-http-routes.registerGatewayHttpRoutes REDACTED:30 — FunctionTooLong — registerGatewayHttpRoutes runs 365 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 265 over it, 3.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: arguments.parseCommandArguments REDACTED:89 — FunctionTooLong — parseCommandArguments runs 269 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 169 over it, 2.69× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: terminal-renderers.createPersistentTerminalRenderer tui/src/terminal-renderers.mjs:355 — FunctionTooLong — createPersistentTerminalRenderer runs 268 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 168 over it, 2.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: gateway-client-transport.attachGatewayClientTransport.attachClient server/src/transport/gateway-client-transport.mjs:146 — FunctionTooLong — attachGatewayClientTransport.attachClient runs 250 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 150 over it, 2.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: realtime-session-runtime.createRealtimeSessionRuntime.handleClientEvent server/src/voice/realtime-session-runtime.mjs:913 — FunctionTooLong — createRealtimeSessionRuntime.handleClientEvent runs 226 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 126 over it, 2.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: install.installBackend shared/backend/install.mjs:449 — FunctionTooLong — installBackend runs 194 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 94 over it, 1.94× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: doubao-seeduplex-protocol.createDoubaoSeeduplexProtocol server/src/voice/providers/doubao-seeduplex-protocol.mjs:77 — FunctionTooLong — createDoubaoSeeduplexProtocol runs 157 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: realtime-session-runtime.createRealtimeSessionRuntime.handleEvent server/src/voice/realtime-session-runtime.mjs:585 — FunctionTooLong — createRealtimeSessionRuntime.handleEvent 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.
  • FunctionTooLong: google-live-protocol.createGoogleLiveProtocol server/src/voice/providers/google-live-protocol.mjs:41 — FunctionTooLong — createGoogleLiveProtocol 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.
  • FunctionTooLong: VideoCallPanel.VideoCallPanel web/src/composer/VideoCallPanel.jsx:24 — FunctionTooLong — VideoCallPanel 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.
  • FunctionTooLong: main.applyDesktopSettings REDACTED:1023 — FunctionTooLong — applyDesktopSettings runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: KnowledgeLibraryPanel.KnowledgeLibraryPanel web/src/KnowledgeLibraryPanel.jsx:24 — FunctionTooLong — KnowledgeLibraryPanel 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.
  • FunctionTooLong: text-cli.runCli tui/src/text-cli.mjs:80 — FunctionTooLong — runCli 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.
  • FunctionTooLong: setup.inspectBackend shared/backend/setup.mjs:326 — FunctionTooLong — inspectBackend 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.
  • FunctionTooLong: settings.renderBackendOptions desktop/src/settings.js:363 — FunctionTooLong — renderBackendOptions 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.
  • FunctionTooLong: microphone-capture.createMicrophoneCaptureLifecycle web/src/realtime/microphone-capture.js:34 — FunctionTooLong — createMicrophoneCaptureLifecycle runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.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.
  • FunctionTooLong: realtime-settings-form.createRealtimeSettingsForm desktop/src/realtime-settings-form.mjs:27 — FunctionTooLong — createRealtimeSettingsForm runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: terminal-renderers.createTerminalTranscriptRenderer tui/src/terminal-renderers.mjs:207 — FunctionTooLong — createTerminalTranscriptRenderer runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× 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.
  • + 9 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · Medium CVE · ×28
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 3 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 1 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED · ×19
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · FileTooLong · ×18
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1595 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 92% of them inside a single declaration: AcpBackendAdapter (153-2095). The bar is 500 significant lines; this is 1095 over it, 3.19× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1258 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: App (196-1546). The bar is 500 significant lines; this is 758 over it, 2.52× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1050 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 550 over it, 2.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: voice/realtime-session-runtime.mjs server/src/voice/realtime-session-runtime.mjs — FileTooLong — 974 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: createRealtimeSessionRuntime (71-1253). The bar is 500 significant lines; this is 474 over it, 1.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: voice/realtime-provider.mjs server/src/voice/realtime-provider.mjs — FileTooLong — 970 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 90% of them inside a single declaration: RealtimeFrontend (131-1326). The bar is 500 significant lines; this is 470 over it, 1.94× 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: realtime/useRealtimeVoice.js web/src/realtime/useRealtimeVoice.js — FileTooLong — 953 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 84% of them inside a single declaration: useRealtimeVoice (206-1191). The bar is 500 significant lines; this is 453 over it, 1.91× 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: a2a/backend-adapter.mjs server/src/backend/adapters/a2a/backend-adapter.mjs — FileTooLong — 921 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 421 over it, 1.84× 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: src/settings.js desktop/src/settings.js — FileTooLong — 918 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 418 over it, 1.84× 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: task/task-manager.mjs server/src/task/task-manager.mjs — FileTooLong — 894 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: TaskManager (56-1126). The bar is 500 significant lines; this is 394 over it, 1.79× 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: muse/backend-adapter.mjs server/src/backend/adapters/muse/backend-adapter.mjs — FileTooLong — 706 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 70% of them inside a single declaration: MuseBackendAdapter (280-908). 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: REDACTED REDACTED — FileTooLong — 658 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: AgentTaskRuntime (66-837). The bar is 500 significant lines; this is 158 over it, 1.32× 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: acp/process-client.mjs server/src/backend/adapters/acp/process-client.mjs — FileTooLong — 628 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 128 over it, 1.26× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: voice/realtime-presentation-runtime.mjs server/src/voice/realtime-presentation-runtime.mjs — FileTooLong — 571 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 90% of them inside a single declaration: RealtimePresentationRuntime (70-759). The bar is 500 significant lines; this is 71 over it, 1.14× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: REDACTED tui/src/index.mjs — FileTooLong — 571 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 77% of them inside a single declaration: runTui (141-713). The bar is 500 significant lines; this is 71 over it, 1.14× 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: src/launcher.mjs cli/src/launcher.mjs — FileTooLong — 563 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 67% of them inside a single declaration: main (229-714). The bar is 500 significant lines; this is 63 over it, 1.13× 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: src/terminal-renderers.mjs tui/src/terminal-renderers.mjs — FileTooLong — 542 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 42 over it, 1.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: core/config.mjs server/src/core/config.mjs — FileTooLong — 522 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 64% of them inside a single declaration: config (232-642). The bar is 500 significant lines; this is 22 over it, 1.04× 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: tools/tool-call-handler.mjs server/src/frontend/tools/tool-call-handler.mjs — FileTooLong — 521 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 88% of them inside a single declaration: ToolCallHandler (80-675). The bar is 500 significant lines; this is 21 over it, 1.04× 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.
R4 · Test Coverage · No test reaches this file · ×17
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/src/composer/VideoCallPanel.jsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/src/KnowledgeLibraryPanel.jsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/src/composer/MultimodalComposer.jsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/src/desktop/DesktopSpriteOrb.jsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file mobile/src/main.jsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file shared/electron-host.cjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file mobile/src/native-runtime.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file examples/voicemem/gateway.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file examples/music-assistant/start.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/src/desktop/DesktopFluidOrb.jsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file examples/lightrag/gateway.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file server/src/process/openclaw-desktop-helper.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file server/eval/run-frontend-evaluations.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/src/main.jsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file desktop/src/orb-unavailable.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×11
  • Sync-over-async blocking REDACTED:174 — `readFileSync` in `callback to createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:191 — `readFileSync` in `callback to createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking examples/customer-service/console/extract.mjs:149 — `readFileSync` in `extractPolicy` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:179 — `readFileSync` in `runExtraction` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:191 — `readFileSync` in `runExtraction` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:559 — `readFileSync` in `callback to createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:89 — `readFileSync` in `callback to createServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking server/src/knowledge/providers/local/provider.mjs:156 — `mkdtempSync` in `ingest` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking server/src/knowledge/providers/local/provider.mjs:174 — `rmSync` in `ingest` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking server/src/memory/providers/voicemem/provider.mjs:511 — `rmSync` in `finish` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking shared/backend/install.mjs:639 — `spawnSync` in `installBackend` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
D3 · God Classes · ClassTooLong · ×10
  • ClassTooLong: AcpBackendAdapter REDACTED:153 — ClassTooLong — 1473 significant lines (blank, comment-only and punctuation-only lines excluded), 69 methods. The bar is 400 significant lines; this is 1073 over it, 3.68× 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: App REDACTED:1 — ClassTooLong — 1086 significant lines (blank, comment-only and punctuation-only lines excluded), 7 methods. The bar is 400 significant lines; this is 686 over it, 2.72× 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: RealtimeFrontend server/src/voice/realtime-provider.mjs:131 — ClassTooLong — 870 significant lines (blank, comment-only and punctuation-only lines excluded), 44 methods. The bar is 400 significant lines; this is 470 over it, 2.18× 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: TaskManager server/src/task/task-manager.mjs:56 — ClassTooLong — 843 significant lines (blank, comment-only and punctuation-only lines excluded), 37 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: useRealtimeVoice web/src/realtime/useRealtimeVoice.js:1 — ClassTooLong — 801 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 400 significant lines; this is 401 over it, 2.00× 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: AgentTaskRuntime REDACTED:66 — ClassTooLong — 609 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 209 over it, 1.52× 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: A2ABackendAdapter server/src/backend/adapters/a2a/backend-adapter.mjs:521 — ClassTooLong — 540 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 140 over it, 1.35× 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: RealtimePresentationRuntime server/src/voice/realtime-presentation-runtime.mjs:70 — ClassTooLong — 512 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 112 over it, 1.28× 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: MuseBackendAdapter server/src/backend/adapters/muse/backend-adapter.mjs:280 — ClassTooLong — 495 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 95 over it, 1.24× 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: ToolCallHandler server/src/frontend/tools/tool-call-handler.mjs:80 — ClassTooLong — 459 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 59 over it, 1.15× 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.
D29 · Static Analysis (SAST) · REDACTED · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · MethodTooLong · ×8
  • MethodTooLong: TaskManager.start server/src/task/task-manager.mjs:658 — MethodTooLong — start runs 197 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 97 over it, 1.97× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AgentTaskRuntime.executeSpawnThinkingToolCall REDACTED:266 — MethodTooLong — executeSpawnThinkingToolCall runs 147 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AgentTaskRuntime.respondAgentPermission REDACTED:462 — MethodTooLong — respondAgentPermission 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: RealtimeFrontend.handleLifecycle server/src/voice/realtime-provider.mjs:911 — MethodTooLong — handleLifecycle 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.
  • MethodTooLong: AcpBackendAdapter.coordinatorTurn REDACTED:1165 — MethodTooLong — coordinatorTurn runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.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: ToolCallHandler.handle server/src/frontend/tools/tool-call-handler.mjs:530 — MethodTooLong — handle runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MemoryExtractor.run server/src/memory/learning/extractor.mjs:263 — MethodTooLong — run runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TaskManager.restore server/src/task/task-manager.mjs:148 — MethodTooLong — restore runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× 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.
D10 · Test Quality · No assertions · ×6
  • No assertions: is a no-op without mediaDevices or a context getter web/test/playback-lifecycle.test.mjs:187 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: swallows a follow rejection so device changes cannot crash playback web/test/playback-lifecycle.test.mjs:196 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: releases a poison batch after bounded retries so later results can proceed server/test/announcement-manager.test.mjs:535 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: a non-ACP adapter passes the public conformance suite server/test/backend-adapter-sdk.test.mjs:28 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: abort signal closes the session examples/digital-human/test/provider-contract.test.mjs:331 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: session.ready fires only after both channels attach examples/digital-human/test/renderer-server.test.mjs:74 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D35 · Change Coupling · Change coupling · ×6
  • Change coupling: dashscope.mjs ↔ realtime-provider.mjs server/src/voice/providers/dashscope.mjs:1 — `server/src/voice/providers/dashscope.mjs` and `server/src/voice/realtime-provider.mjs` change together 82% of the time (9 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `f931f152` fix(realtime): wait for DashScope response.created before handling ou…; `94db9df5` fix(realtime): validate model-specific voice selections (#409); `b21435e9` fix: recover realtime sessions after safety errors — run `git show` on any of them.
  • Change coupling: gateway-protocol.mjs ↔ gateway-client-transport.mjs server/src/core/gateway-protocol.mjs:1 — `server/src/core/gateway-protocol.mjs` and `server/src/transport/gateway-client-transport.mjs` 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 `cb41e6f3` feat(gateway): expose owner-scoped client input status (#539); `8f16eb52` feat(gateway): complete GCP5 client protocol (#259) (at that commit the file was still `server/src/voice/realtime-gateway.mjs`); `70dd204c` feat(gateway): add GCP3 agent delivery (#257) (at that commit the file was still `server/src/voice/realtime-gateway.mjs`) — run `git show` on any of them.
  • Change coupling: preload.cjs ↔ settings.js desktop/src/preload.cjs:1 — `desktop/src/preload.cjs` and `desktop/src/settings.js` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `a0b90b09` feat(remote): publish Gateway through Tailscale (#323); `6cb340b0` feat: add one-click backend agent installation; `a052dd8d` feat(desktop): add automatic sleep and wake controls — run `git show` on any of them.
  • Change coupling: frontend-tools.mjs ↔ gateway-client-transport.mjs server/src/frontend/frontend-tools.mjs:1 — `server/src/frontend/frontend-tools.mjs` and `server/src/transport/gateway-client-transport.mjs` change together 57% of the time (16 of the 28 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `f3df789f` fix(car): harden cockpit voice and navigation (#284) (at that commit the files were still `server/src/voice/frontend-tools.mjs` and `server/src/voice/realtime-gateway.mjs`); `b3a4d3e7` refactor: simplify backend work instructions (at that commit the files were still `server/src/voice/frontend-tools.mjs` and `server/src/voice/realtime-gateway.mjs`); `5df9a747` feat: add frontend tool approval (at that commit the files were still `server/src/voice/frontend-tools.mjs` and `server/src/voice/realtime-gateway.mjs`) — run `git show` on any of them.
  • Change coupling: REDACTED ↔ process-client.mjs REDACTED:1 — `REDACTED` and `server/src/backend/adapters/acp/process-client.mjs` change together 56% of the time (9 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `accf85f3` refactor(knowledge): formalize provider boundary (#339) (at that commit the files were still `server/src/agent/acp-backend-adapter.mjs` and `server/src/agent/acp-process-client.mjs`); `c0e5d46d` feat: expose backend permissions and activity (#228) (at that commit the files were still `server/src/agent/acp-backend-adapter.mjs` and `server/src/agent/acp-process-client.mjs`); `7bfb7447` feat: improve concurrent task coordination (at that commit the files were still `server/src/agent/acp-backend-adapter.mjs` and `server/src/agent/acp-process-client.mjs`) — run `git show` on any of them.
  • Change coupling: realtime-events.mjs ↔ REDACTED shared/protocol/realtime-events.mjs:1 — `shared/protocol/realtime-events.mjs` and `REDACTED` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `42ec35f2` fix(vision): clear pending frames across lifecycle (at that commit the file was still `shared/realtime-events.mjs`); `7e65fe0c` feat(desktop): align pet animation lifecycle (at that commit the file was still `shared/realtime-events.mjs`); `48a2a2f9` feat(desktop): add shared conversation panel (at that commit the file was still `shared/realtime-events.mjs`) — run `git show` on any of them.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×5
  • Focus outline removed in CSS without a :focus replacement web/src/styles.css:33 — `.composer-row textarea` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement web/src/styles.css:969 — `.desktop-orb-stage` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement examples/smart-cockpit/client/src/App.css:1288 — `.flashbuy-segment-btn:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement examples/smart-cockpit/client/src/App.css:1338 — `.flashbuy-item:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement examples/smart-cockpit/client/src/App.css:1915 — `.dock-btn.is-active` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
S1 · Web-Security Posture · Weak hash algorithm · ×5
  • Weak hash algorithm server/src/conversation/frontend-notes.mjs:147 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm server/src/core/json-snapshot-store.mjs:71 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm server/src/core/json-snapshot-store.mjs:116 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm server/src/core/json-snapshot-store.mjs:134 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm server/src/knowledge/providers/local/library.mjs:262 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×5
  • Swallowed exception (caught, then discarded) tui/src/index.mjs:424 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) tui/src/input-parts.mjs:145 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) tui/src/macos-voice-io.mjs:114 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) shared/gateway/client-sdk.mjs:322 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) server/src/voice/realtime-provider.mjs:297 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
D15 · Churn × Complexity Hotspots · Repeated repair · ×4
  • Repeated repair: server/src/voice/realtime-input-runtime.mjs server/src/voice/realtime-input-runtime.mjs:77 — server/src/voice/realtime-input-runtime.mjs changed 7 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 11 (its worst body is RealtimeInputRuntime.handleProviderEvent at line 77), 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: release announcement blockers after terminal frontend events (#555)”; “fix(realtime): stabilize client replacement and latency tracing”; “fix: keep task progress aligned in conversation timelines (#237)”; “fix: smooth realtime startup and task progress (#236)”. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- server/src/voice/realtime-input-runtime.mjs`: 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: shared/skill-library.mjs shared/skill-library.mjs:58 — shared/skill-library.mjs 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 skill-library.skillsCliInvocation at line 58), 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(skills): ignore CWD-relative npx-cli.js candidates on Windows (#544)”; “fix(skills): resolve npx-cli.js from npm prefix on Windows (#523)”; “fix(skills): start npx without a shell on Windows (#427)”. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- shared/skill-library.mjs`: 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/src/session/session-journal.mjs server/src/session/session-journal.mjs:90 — server/src/session/session-journal.mjs 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 9 (its worst body is SessionJournal.append at line 90), 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(session): bound journal retention, cache and queued writes (#506)”; “fix: harden runtime recovery and add read-only diagnostics”; “fix(session): restore journals with sequence gaps (#360)”. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- server/src/session/session-journal.mjs`: 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: shared/file-transaction-lock.mjs shared/file-transaction-lock.mjs:50 — shared/file-transaction-lock.mjs 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 10 (its worst body is file-transaction-lock.acquire at line 50), 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 shared locks during concurrent notes persistence”; “fix: harden client lifecycle and repository checks (#263)”; “fix: harden v1.11.0 release checks”. 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-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 22:46:39 +08:00' --until='2026-11-16 22:46:39 +08:00' --full-history --no-merges -- shared/file-transaction-lock.mjs`: 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.
R10 · Code Duplication · Duplicated block (17 lines × 2 locations) · ×4
  • Duplicated block (17 lines × 2 locations) server/src/backend/adapters/a2a/backend-adapter.mjs:1120 — server/src/backend/adapters/a2a/backend-adapter.mjs:1120 · server/src/backend/adapters/muse/backend-adapter.mjs:867 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
  • Duplicated block (17 lines × 2 locations) REDACTED:461 — REDACTED:461 · server/src/backend/adapters/muse/backend-adapter.mjs:441 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (17 lines × 2 locations) server/src/backend/adapters/llm/backend-adapter.mjs:335 — server/src/backend/adapters/llm/backend-adapter.mjs:335 · server/src/backend/adapters/muse/backend-adapter.mjs:862 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (17 lines × 2 locations) server/src/conversation/session-summariser.mjs:36 — server/src/conversation/session-summariser.mjs:36 · server/src/memory/learning/extractor.mjs:192 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (16 lines × 2 locations) · ×4
  • Duplicated block (16 lines × 2 locations) cli/src/gateway-service.mjs:274 — cli/src/gateway-service.mjs:274 · cli/src/gateway-service.mjs:290 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (16 lines × 2 locations) server/src/backend/adapters/llm/backend-adapter.mjs:118 — server/src/backend/adapters/llm/backend-adapter.mjs:118 · server/src/backend/adapters/muse/backend-adapter.mjs:342 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (16 lines × 2 locations) server/src/voice/providers/doubao-seeduplex-protocol.mjs:8 — server/src/voice/providers/doubao-seeduplex-protocol.mjs:8 · server/src/voice/providers/google-live-protocol.mjs:4 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (16 lines × 2 locations) tui/src/terminal-renderers.mjs:214 — tui/src/terminal-renderers.mjs:214 · tui/src/terminal-renderers.mjs:377 — 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.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · TooManyMethods · ×3
  • TooManyMethods: AcpBackendAdapter REDACTED:153 — 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: RealtimeFrontend server/src/voice/realtime-provider.mjs:131 — 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: TaskManager server/src/task/task-manager.mjs:56 — 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.
IC1 · Incompleteness & stubs · Fake-async · ×3
  • Fake-async — async method never awaits server/src/backend/adapters/llm/backend-adapter.mjs:375 — `close` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits server/src/frontend/tools/client-tool-source.mjs:35 — `close` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits server/src/frontend/tools/openapi/frontend-openapi-adapter.mjs:539 — `close` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×2
  • Animation without a prefers-reduced-motion guard desktop/src/settings.css:522 — `.toggle-track::after` moves (`transition: transform 160ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard desktop/src/settings.css:655 — `:is(.backend-picker-chevron, .settings-picker-chevron)` moves (`transition: transform 140ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
R10 · Code Duplication · Duplicated block with local edits (30 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (30 matched lines × 2 locations) server/src/backend/adapters/acp/session-configuration.mjs:67 — server/src/backend/adapters/acp/session-configuration.mjs:67 · server/src/backend/adapters/acp/session-configuration.mjs:131 — the two spans are one implementation copied and then locally edited — 119 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (30 matched lines × 2 locations) server/src/voice/providers/google-live.mjs:17 — server/src/voice/providers/google-live.mjs:17 · server/src/voice/providers/gpt-live.mjs:18 — the two spans are one implementation copied and then locally edited — 229 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (22 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (22 matched lines × 2 locations) cli/src/runtime.mjs:363 — cli/src/runtime.mjs:363 · server/src/process/managed-backend.mjs:124 — the two spans are one implementation copied and then locally edited — 94 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (22 matched lines × 2 locations) tui/src/runtime-configuration.mjs:35 — tui/src/runtime-configuration.mjs:35 · tui/src/text-cli.mjs:22 — the two spans are one implementation copied and then locally edited — 135 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (18 lines × 2 locations) · ×2
  • Duplicated block (18 lines × 2 locations) REDACTED:82 — REDACTED:82 · REDACTED:104 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (18 lines × 2 locations) shared/runtime-environment.mjs:168 — shared/runtime-environment.mjs:168 · shared/runtime-environment.mjs:213 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block with local edits (17 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (17 matched lines × 2 locations) REDACTED:309 — REDACTED:309 · REDACTED:335 — the two spans are one implementation copied and then locally edited — 119 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (17 matched lines × 2 locations) shared/protocol/gateway-events.mjs:59 — shared/protocol/gateway-events.mjs:59 · shared/protocol/gateway-events.mjs:82 — the two spans are one implementation copied and then locally edited — 176 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R8 · Dependency Hygiene · Unused dependency '@qwen-code/open-computer-use' · ×2
  • Unused dependency '@qwen-code/open-computer-use' REDACTED:347 — Declared in the root REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency '@qwen-code/open-computer-use' server/package.json:14 — Declared in server/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
AC1 · Text alternatives · <canvas> without a text alternative · ×1
  • <canvas> without a text alternative web/src/desktop/DesktopSpriteOrb.jsx:140 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (2.6 · ×1
  • Low contrast colour pair in CSS (2.6:1) examples/smart-cockpit/client/src/App.css:1202 — `.strategy-chip.active` sets color: #fff on background-color: #2DB84D — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D1 · Cyclomatic Complexity · App.App (cyclomatic 317) · ×1
  • App.App (cyclomatic 317) REDACTED:196 — App.App has cyclomatic complexity 317 (threshold 15). Of this number, 81 points are the body's own statements and 236 belong to 60 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · arguments.parseCommandArguments (cyclomatic 164) · ×1
  • arguments.parseCommandArguments (cyclomatic 164) REDACTED:89 — arguments.parseCommandArguments has cyclomatic complexity 164 (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 · launcher.main (cyclomatic 124) · ×1
  • launcher.main (cyclomatic 124) cli/src/launcher.mjs:229 — launcher.main has cyclomatic complexity 124 (threshold 15). Of this number, 118 points are the body's own statements and 6 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · attachGatewayClientTransport (cyclomatic 98) · ×1
  • attachGatewayClientTransport (cyclomatic 98) server/src/transport/gateway-client-transport.mjs:62 — attachGatewayClientTransport has cyclomatic complexity 98 (threshold 15). Most of this is not in the body itself: 2 of the 98 points are its own statements and the rest belongs to 45 function items inside it that branch (a function literal at line 367, attachClient::handleRuntimeMessage, status, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · createRealtimeSessionRuntime.handleClientEvent (cyclomatic 80) · ×1
  • createRealtimeSessionRuntime.handleClientEvent (cyclomatic 80) server/src/voice/realtime-session-runtime.mjs:913 — createRealtimeSessionRuntime.handleClientEvent has cyclomatic complexity 80 (threshold 15). Of this number, 73 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · realtime-session-runtime.createRealtimeSessionRuntime.handleClientEvent (cyclomatic 76) · ×1
  • realtime-session-runtime.createRealtimeSessionRuntime.handleClientEvent (cyclomatic 76) server/src/voice/realtime-session-runtime.mjs:913 — realtime-session-runtime.createRealtimeSessionRuntime.handleClientEvent has cyclomatic complexity 76 (threshold 15). Of this number, 70 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useRealtimeVoice.useRealtimeVoice (cyclomatic 71) · ×1
  • useRealtimeVoice.useRealtimeVoice (cyclomatic 71) web/src/realtime/useRealtimeVoice.js:206 — useRealtimeVoice.useRealtimeVoice has cyclomatic complexity 71 (threshold 15). Most of this is not in the body itself: 4 of the 71 points are its own statements and the rest belongs to 15 function literals inside it that branch (lines 653, 760, 949, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · RealtimeFrontend.handleLifecycle (cyclomatic 63) · ×1
  • RealtimeFrontend.handleLifecycle (cyclomatic 63) server/src/voice/realtime-provider.mjs:911 — RealtimeFrontend.handleLifecycle has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent 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 · createRealtimeSessionRuntime.handleEvent (cyclomatic 61) · ×1
  • createRealtimeSessionRuntime.handleEvent (cyclomatic 61) server/src/voice/realtime-session-runtime.mjs:585 — createRealtimeSessionRuntime.handleEvent has cyclomatic complexity 61 (threshold 15). Of this number, 52 points are the body's own statements and 9 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · realtime-session-runtime.createRealtimeSessionRuntime.handleEvent (cyclomatic 59) · ×1
  • realtime-session-runtime.createRealtimeSessionRuntime.handleEvent (cyclomatic 59) server/src/voice/realtime-session-runtime.mjs:585 — realtime-session-runtime.createRealtimeSessionRuntime.handleEvent has cyclomatic complexity 59 (threshold 15). Of this number, 50 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · gateway-http-routes.registerGatewayHttpRoutes (cyclomatic 58) · ×1
  • gateway-http-routes.registerGatewayHttpRoutes (cyclomatic 58) REDACTED:30 — gateway-http-routes.registerGatewayHttpRoutes has cyclomatic complexity 58 (threshold 15). Most of this is not in the body itself: 3 of the 58 points are its own statements and the rest belongs to 20 function literals inside it that branch (lines 246, 101, 188, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · gateway-client-transport.attachGatewayClientTransport.attachClient (cyclomatic 58) · ×1
  • gateway-client-transport.attachGatewayClientTransport.attachClient (cyclomatic 58) server/src/transport/gateway-client-transport.mjs:146 — gateway-client-transport.attachGatewayClientTransport.attachClient has cyclomatic complexity 58 (threshold 15). Most of this is not in the body itself: 6 of the 58 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 367, handleRuntimeMessage, sendRuntimeError, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · createGatewayApplication (cyclomatic 51) · ×1
  • createGatewayApplication (cyclomatic 51) REDACTED:63 — createGatewayApplication has cyclomatic complexity 51 (threshold 15). Of this number, 27 points are the body's own statements and 24 belong to 32 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · collectDiagnostics (cyclomatic 48) · ×1
  • collectDiagnostics (cyclomatic 48) cli/src/diagnostics.mjs:69 — collectDiagnostics has cyclomatic complexity 48 (threshold 15). Of this number, 47 points are the body's own statements and 1 belongs to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WebRtcConnection.receive (cyclomatic 47) · ×1
  • WebRtcConnection.receive (cyclomatic 47) server/src/transport/webrtc/protocol.mjs:71 — WebRtcConnection.receive has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · setup.explicitRuntime (cyclomatic 46) · ×1
  • setup.explicitRuntime (cyclomatic 46) shared/backend/setup.mjs:168 — setup.explicitRuntime 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 · setup.inspectBackend (cyclomatic 46) · ×1
  • setup.inspectBackend (cyclomatic 46) shared/backend/setup.mjs:326 — setup.inspectBackend 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 · #responseDone (cyclomatic 46) · ×1
  • #responseDone (cyclomatic 46) server/src/voice/realtime-presentation-runtime.mjs:349 — #responseDone has cyclomatic complexity 46 (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 · main.applyDesktopSettings (cyclomatic 45) · ×1
  • main.applyDesktopSettings (cyclomatic 45) REDACTED:1023 — main.applyDesktopSettings has cyclomatic complexity 45 (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 · text-cli.runCli (cyclomatic 44) · ×1
  • text-cli.runCli (cyclomatic 44) tui/src/text-cli.mjs:80 — text-cli.runCli has cyclomatic complexity 44 (threshold 15). Of this number, 18 points are the body's own statements and 26 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · google-live-protocol.createGoogleLiveProtocol (cyclomatic 43) · ×1
  • google-live-protocol.createGoogleLiveProtocol (cyclomatic 43) server/src/voice/providers/google-live-protocol.mjs:41 — google-live-protocol.createGoogleLiveProtocol has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 1 of the 43 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 75, a function literal at line 198, a function literal at line 229, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · TaskManager.restore (cyclomatic 42) · ×1
  • TaskManager.restore (cyclomatic 42) server/src/task/task-manager.mjs:148 — TaskManager.restore 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 · createRealtimeSessionRuntime (cyclomatic 41) · ×1
  • createRealtimeSessionRuntime (cyclomatic 41) server/src/voice/realtime-session-runtime.mjs:71 — createRealtimeSessionRuntime has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 4 of the 41 points are its own statements and the rest belongs to 60 function items inside it that branch (canSleep, isDeliveryBlocked, onToolResultReady, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · registerWebRtcIngress (cyclomatic 41) · ×1
  • registerWebRtcIngress (cyclomatic 41) server/src/transport/webrtc/routes.mjs:32 — registerWebRtcIngress has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 6 of the 41 points are its own statements and the rest belongs to 26 function items inside it that branch (a function literal at line 63, errorResponse, a function literal at line 50, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · TaskManager.start · ×1
  • TaskManager.start::onEvent (cyclomatic 40) server/src/task/task-manager.mjs:674 — TaskManager.start::onEvent 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 · VideoCallPanel.VideoCallPanel (cyclomatic 40) · ×1
  • VideoCallPanel.VideoCallPanel (cyclomatic 40) web/src/composer/VideoCallPanel.jsx:24 — VideoCallPanel.VideoCallPanel has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 15 of the 40 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 111, 65, 98, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · terminal-renderers.createTranscriptDisplay.handle (cyclomatic 40) · ×1
  • terminal-renderers.createTranscriptDisplay.handle (cyclomatic 40) tui/src/terminal-renderers.mjs:110 — terminal-renderers.createTranscriptDisplay.handle 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 · createTranscriptDisplay.handle (cyclomatic 40) · ×1
  • createTranscriptDisplay.handle (cyclomatic 40) tui/src/terminal-renderers.mjs:110 — createTranscriptDisplay.handle 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 · settings.renderBackendOptions (cyclomatic 39) · ×1
  • settings.renderBackendOptions (cyclomatic 39) desktop/src/settings.js:363 — settings.renderBackendOptions has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 15 of the 39 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 419, appendGroup, a function literal at line 402, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · index.runTui · ×1
  • index.runTui::handleGatewayMessage (cyclomatic 39) tui/src/index.mjs:420 — index.runTui::handleGatewayMessage has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · orb-shell.bindOrbShell (cyclomatic 38) · ×1
  • orb-shell.bindOrbShell (cyclomatic 38) desktop/src/orb-shell.mjs:57 — orb-shell.bindOrbShell has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 6 of the 38 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 140, 102, 90, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · normalizeKnowledgeRetrievalResponse (cyclomatic 37) · ×1
  • normalizeKnowledgeRetrievalResponse (cyclomatic 37) server/src/knowledge/provider.mjs:215 — normalizeKnowledgeRetrievalResponse has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · install.installBackend (cyclomatic 36) · ×1
  • install.installBackend (cyclomatic 36) shared/backend/install.mjs:449 — install.installBackend 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 · runtime.ensureRuntime (cyclomatic 36) · ×1
  • runtime.ensureRuntime (cyclomatic 36) cli/src/runtime.mjs:430 — runtime.ensureRuntime 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 · tools.memory (cyclomatic 36) · ×1
  • tools.memory (cyclomatic 36) server/src/memory/tools.mjs:79 — tools.memory 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 · task-updates.updateTask (cyclomatic 36) · ×1
  • task-updates.updateTask (cyclomatic 36) server/src/orchestration/task-updates.mjs:7 — task-updates.updateTask has cyclomatic complexity 36 (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 · task-view.taskView (cyclomatic 34) · ×1
  • task-view.taskView (cyclomatic 34) web/src/task-view.js:176 — task-view.taskView 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 · operationInput (cyclomatic 34) · ×1
  • operationInput (cyclomatic 34) server/src/frontend/tools/openapi/frontend-openapi-adapter.mjs:118 — operationInput 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 · options.backendOptionStates (cyclomatic 33) · ×1
  • options.backendOptionStates (cyclomatic 33) desktop/src/backend/options.mjs:48 — options.backendOptionStates has cyclomatic complexity 33 (threshold 15). Of this number, 29 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ToolCallHandler.handle (cyclomatic 33) · ×1
  • ToolCallHandler.handle (cyclomatic 33) server/src/frontend/tools/tool-call-handler.mjs:530 — ToolCallHandler.handle has cyclomatic complexity 33 (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 · KnowledgeLibraryPanel.KnowledgeLibraryPanel (cyclomatic 33) · ×1
  • KnowledgeLibraryPanel.KnowledgeLibraryPanel (cyclomatic 33) web/src/KnowledgeLibraryPanel.jsx:24 — KnowledgeLibraryPanel.KnowledgeLibraryPanel has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 8 of the 33 points are its own statements and the rest belongs to 7 function items inside it that branch (submit, a function literal at line 56, a function literal at line 35, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · task-view.taskDetail (cyclomatic 33) · ×1
  • task-view.taskDetail (cyclomatic 33) web/src/task-view.js:94 — task-view.taskDetail 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 · normalizeKnowledgeDocument (cyclomatic 33) · ×1
  • normalizeKnowledgeDocument (cyclomatic 33) server/src/knowledge/provider.mjs:50 — normalizeKnowledgeDocument has cyclomatic complexity 33 (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 · A2ABackendAdapter.consumeStream (cyclomatic 32) · ×1
  • A2ABackendAdapter.consumeStream (cyclomatic 32) server/src/backend/adapters/a2a/backend-adapter.mjs:919 — A2ABackendAdapter.consumeStream 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 · sendOutput (cyclomatic 32) · ×1
  • sendOutput (cyclomatic 32) server/src/frontend/tools/tool-call-handler.mjs:291 — sendOutput has cyclomatic complexity 32 (threshold 15). Of this number, 28 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TailscaleServePublisher.start (cyclomatic 31) · ×1
  • TailscaleServePublisher.start (cyclomatic 31) server/src/access/tailscale-serve.mjs:76 — TailscaleServePublisher.start has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 11 of the 31 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 137, 90, 91, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · doubao-seeduplex-protocol.createDoubaoSeeduplexProtocol · ×1
  • doubao-seeduplex-protocol.createDoubaoSeeduplexProtocol::normalizeResponseEvent (cyclomatic 30) server/src/voice/providers/doubao-seeduplex-protocol.mjs:102 — doubao-seeduplex-protocol.createDoubaoSeeduplexProtocol::normalizeResponseEvent 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 · AgentTaskRuntime.executeSpawnThinkingToolCall (cyclomatic 30) · ×1
  • AgentTaskRuntime.executeSpawnThinkingToolCall (cyclomatic 30) REDACTED:266 — AgentTaskRuntime.executeSpawnThinkingToolCall has cyclomatic complexity 30 (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 · terminal-renderers.createPersistentTerminalRenderer · ×1
  • terminal-renderers.createPersistentTerminalRenderer::handleKeypress (cyclomatic 30) tui/src/terminal-renderers.mjs:596 — terminal-renderers.createPersistentTerminalRenderer::handleKeypress has cyclomatic complexity 30 (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 · settings-config.updateSettingsContent (cyclomatic 29) · ×1
  • settings-config.updateSettingsContent (cyclomatic 29) desktop/src/settings-config.mjs:413 — settings-config.updateSettingsContent has cyclomatic complexity 29 (threshold 15). Of this number, 16 points are the body's own statements and 13 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · gateway-process.desktopGatewayCompatibility (cyclomatic 29) · ×1
  • gateway-process.desktopGatewayCompatibility (cyclomatic 29) desktop/src/gateway-process.mjs:79 — gateway-process.desktopGatewayCompatibility 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 · backend-session-utils.activityFromUpdate (cyclomatic 29) · ×1
  • backend-session-utils.activityFromUpdate (cyclomatic 29) server/src/backend/adapters/acp/backend-session-utils.mjs:60 — backend-session-utils.activityFromUpdate 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 · AcpBackendAdapter.onSessionUpdate (cyclomatic 29) · ×1
  • AcpBackendAdapter.onSessionUpdate (cyclomatic 29) REDACTED:657 — AcpBackendAdapter.onSessionUpdate has cyclomatic complexity 29 (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 · GatewayClient.#connect (cyclomatic 29) · ×1
  • GatewayClient.#connect (cyclomatic 29) shared/gateway/client-sdk.mjs:265 — GatewayClient.#connect has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 8 of the 29 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 331, 289, 317, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · load (cyclomatic 29) · ×1
  • load (cyclomatic 29) server/src/conversation/frontend-notes.mjs:155 — load has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 9 of the 29 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 183, 180, 208). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · WebRtcMessageReader.read (cyclomatic 28) · ×1
  • WebRtcMessageReader.read (cyclomatic 28) shared/gateway/webrtc-message.mjs:25 — WebRtcMessageReader.read 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 · MemoryExtractor.run (cyclomatic 28) · ×1
  • MemoryExtractor.run (cyclomatic 28) server/src/memory/learning/extractor.mjs:263 — MemoryExtractor.run has cyclomatic complexity 28 (threshold 15). Of this number, 24 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PreferenceCandidatePool.observe (cyclomatic 28) · ×1
  • PreferenceCandidatePool.observe (cyclomatic 28) server/src/memory/learning/preference-candidates.mjs:290 — PreferenceCandidatePool.observe 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 · KnowledgeLibrary.#import (cyclomatic 28) · ×1
  • KnowledgeLibrary.#import (cyclomatic 28) server/src/knowledge/providers/local/library.mjs:206 — KnowledgeLibrary.#import has cyclomatic complexity 28 (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 · PhotoCapture.PhotoCapture (cyclomatic 28) · ×1
  • PhotoCapture.PhotoCapture (cyclomatic 28) REDACTED:5 — PhotoCapture.PhotoCapture has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 5 of the 28 points are its own statements and the rest belongs to 6 function items inside it that branch (takePhoto, accept, a function literal at line 35, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · createGoogleLiveProtocol · ×1
  • createGoogleLiveProtocol::normalizeIncoming (cyclomatic 28) server/src/voice/providers/google-live-protocol.mjs:75 — createGoogleLiveProtocol::normalizeIncoming 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 · provider-registry.validateRealtimeProvider (cyclomatic 27) · ×1
  • provider-registry.validateRealtimeProvider (cyclomatic 27) server/src/voice/providers/provider-registry.mjs:175 — provider-registry.validateRealtimeProvider has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SessionTaskCoordinator.handleEvent (cyclomatic 27) · ×1
  • SessionTaskCoordinator.handleEvent (cyclomatic 27) server/src/orchestration/session-task-coordinator.mjs:171 — SessionTaskCoordinator.handleEvent 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 · useRealtimeVoice · ×1
  • useRealtimeVoice::(anonymous)::handleEvent (cyclomatic 27) web/src/realtime/useRealtimeVoice.js:653 — useRealtimeVoice::(anonymous)::handleEvent has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AcpTurnUpdates.run (cyclomatic 26) · ×1
  • AcpTurnUpdates.run (cyclomatic 26) server/src/backend/adapters/acp/turn-updates.mjs:79 — AcpTurnUpdates.run 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 · AcpBackendAdapter.coordinatorTurn (cyclomatic 25) · ×1
  • AcpBackendAdapter.coordinatorTurn (cyclomatic 25) REDACTED:1165 — AcpBackendAdapter.coordinatorTurn has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AnnouncementManager.deliver (cyclomatic 25) · ×1
  • AnnouncementManager.deliver (cyclomatic 25) server/src/voice/announcement/announcement-manager.mjs:352 — AnnouncementManager.deliver has cyclomatic complexity 25 (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 · parseSettings (cyclomatic 25) · ×1
  • parseSettings (cyclomatic 25) desktop/src/settings-config.mjs:194 — parseSettings has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · client-state.reduceGatewayClientState (cyclomatic 24) · ×1
  • client-state.reduceGatewayClientState (cyclomatic 24) shared/gateway/client-state.mjs:29 — client-state.reduceGatewayClientState has cyclomatic complexity 24 (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 · cancel (cyclomatic 24) · ×1
  • cancel (cyclomatic 24) server/src/task/task-manager.mjs:906 — cancel has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 11 of the 24 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 943, a function literal at line 926, (anonymous)::abort). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · respondAgentPermission (cyclomatic 24) · ×1
  • respondAgentPermission (cyclomatic 24) REDACTED:462 — respondAgentPermission has cyclomatic complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 belong to 5 function items inside it that branch. 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 · begin (cyclomatic 24) · ×1
  • begin (cyclomatic 24) server/src/voice/realtime-presentation-runtime.mjs:159 — begin 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 · minicpm-o-protocol.createMiniCpmOProtocol.normalizeIncoming (cyclomatic 23) · ×1
  • minicpm-o-protocol.createMiniCpmOProtocol.normalizeIncoming (cyclomatic 23) server/src/voice/providers/minicpm-o-protocol.mjs:65 — minicpm-o-protocol.createMiniCpmOProtocol.normalizeIncoming 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 · RealtimeFrontend.handleResponseRefusal (cyclomatic 23) · ×1
  • RealtimeFrontend.handleResponseRefusal (cyclomatic 23) server/src/voice/realtime-provider.mjs:1079 — RealtimeFrontend.handleResponseRefusal 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 · request-security.isAllowedOrigin (cyclomatic 23) · ×1
  • request-security.isAllowedOrigin (cyclomatic 23) REDACTED:52 — request-security.isAllowedOrigin 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 · task-artifact.normalizePart (cyclomatic 23) · ×1
  • task-artifact.normalizePart (cyclomatic 23) server/src/task/task-artifact.mjs:34 — task-artifact.normalizePart 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 · LlmBackendAdapter.submit (cyclomatic 23) · ×1
  • LlmBackendAdapter.submit (cyclomatic 23) server/src/backend/adapters/llm/backend-adapter.mjs:219 — LlmBackendAdapter.submit 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 · connect (cyclomatic 23) · ×1
  • connect (cyclomatic 23) shared/gateway/webrtc-browser.mjs:22 — connect has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 belong to 9 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · prune (cyclomatic 23) · ×1
  • prune (cyclomatic 23) server/src/session/session-journal-registry.mjs:124 — prune has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · runtime.resolveBackend (cyclomatic 22) · ×1
  • runtime.resolveBackend (cyclomatic 22) cli/src/runtime.mjs:62 — runtime.resolveBackend has cyclomatic complexity 22 (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 · WebRtcConnection.send (cyclomatic 22) · ×1
  • WebRtcConnection.send (cyclomatic 22) server/src/transport/webrtc/protocol.mjs:152 — WebRtcConnection.send 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 · ConversationSync.upsert (cyclomatic 22) · ×1
  • ConversationSync.upsert (cyclomatic 22) server/src/conversation/conversation-sync.mjs:122 — ConversationSync.upsert 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 · AgentTaskRuntime.getAgentTaskStatus (cyclomatic 22) · ×1
  • AgentTaskRuntime.getAgentTaskStatus (cyclomatic 22) REDACTED:751 — AgentTaskRuntime.getAgentTaskStatus has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MultimodalComposer.MultimodalComposer (cyclomatic 22) · ×1
  • MultimodalComposer.MultimodalComposer (cyclomatic 22) web/src/composer/MultimodalComposer.jsx:35 — MultimodalComposer.MultimodalComposer has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 47, submit, a function literal at line 155, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · receiveTrack (cyclomatic 22) · ×1
  • receiveTrack (cyclomatic 22) server/src/transport/webrtc/media.mjs:128 — receiveTrack has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to 5 function items inside it that branch (ondata, onframe, a function literal at line 158, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · publish (cyclomatic 22) · ×1
  • publish (cyclomatic 22) server/src/client/client-event-router.mjs:146 — publish 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 · runtime.assertGatewayCompatibility (cyclomatic 21) · ×1
  • runtime.assertGatewayCompatibility (cyclomatic 21) cli/src/runtime.mjs:134 — runtime.assertGatewayCompatibility 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 · RealtimeFrontend.injectDelivery (cyclomatic 21) · ×1
  • RealtimeFrontend.injectDelivery (cyclomatic 21) server/src/voice/realtime-provider.mjs:653 — RealtimeFrontend.injectDelivery has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ProcessWebRtcMedia.receive (cyclomatic 21) · ×1
  • ProcessWebRtcMedia.receive (cyclomatic 21) server/src/transport/webrtc/media-process.mjs:78 — ProcessWebRtcMedia.receive 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 · session-replay.replaySession (cyclomatic 21) · ×1
  • session-replay.replaySession (cyclomatic 21) server/src/session/session-replay.mjs:8 — session-replay.replaySession 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 · frontend-openapi-adapter.discoverOperations (cyclomatic 21) · ×1
  • frontend-openapi-adapter.discoverOperations (cyclomatic 21) server/src/frontend/tools/openapi/frontend-openapi-adapter.mjs:236 — frontend-openapi-adapter.discoverOperations 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 · A2ABackendAdapter.continueInterruptedTask (cyclomatic 21) · ×1
  • A2ABackendAdapter.continueInterruptedTask (cyclomatic 21) server/src/backend/adapters/a2a/backend-adapter.mjs:798 — A2ABackendAdapter.continueInterruptedTask 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 · main.MobileApp (cyclomatic 21) · ×1
  • main.MobileApp (cyclomatic 21) mobile/src/main.jsx:18 — main.MobileApp has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 34, scan, a function literal at line 64, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · skin-store.validateAnimations (cyclomatic 20) · ×1
  • skin-store.validateAnimations (cyclomatic 20) desktop/src/skin-store.mjs:106 — skin-store.validateAnimations 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 · work-authorization.normalizeAuthorizationOperation (cyclomatic 20) · ×1
  • work-authorization.normalizeAuthorizationOperation (cyclomatic 20) server/src/core/work-authorization.mjs:18 — work-authorization.normalizeAuthorizationOperation has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · content.artifactPartFromAcpBlock (cyclomatic 20) · ×1
  • content.artifactPartFromAcpBlock (cyclomatic 20) server/src/backend/adapters/acp/content.mjs:23 — content.artifactPartFromAcpBlock 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 · mcp.projectResult (cyclomatic 20) · ×1
  • mcp.projectResult (cyclomatic 20) server/src/frontend/retrieval/providers/mcp.mjs:88 — mcp.projectResult 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 · backend-adapter.partContent (cyclomatic 20) · ×1
  • backend-adapter.partContent (cyclomatic 20) server/src/backend/adapters/a2a/backend-adapter.mjs:190 — backend-adapter.partContent 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 · startLocalGateway (cyclomatic 20) · ×1
  • startLocalGateway (cyclomatic 20) REDACTED:298 — startLocalGateway has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 5 function items inside it that branch (onGatewayMessage, a function literal at line 332, a function literal at line 334, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · runTui · ×1
  • runTui::connectGateway::onStatus (cyclomatic 20) tui/src/index.mjs:587 — runTui::connectGateway::onStatus 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 · loadRuntimeEnvironment (cyclomatic 20) · ×1
  • loadRuntimeEnvironment (cyclomatic 20) shared/runtime-environment.mjs:247 — loadRuntimeEnvironment has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · runCli · ×1
  • runCli::onEvent (cyclomatic 20) tui/src/text-cli.mjs:150 — runCli::onEvent 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 · logger.createLogger (cyclomatic 19) · ×1
  • logger.createLogger (cyclomatic 19) shared/logger.mjs:240 — logger.createLogger has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (emit, a function literal at line 274, a function literal at line 323, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · OpenClawGatewayRpc.call (cyclomatic 19) · ×1
  • OpenClawGatewayRpc.call (cyclomatic 19) server/src/backend/adapters/acp/drivers/openclaw-delegation.mjs:54 — OpenClawGatewayRpc.call has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 93, 62, 68, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · backend-adapter.itemActivity (cyclomatic 19) · ×1
  • backend-adapter.itemActivity (cyclomatic 19) server/src/backend/adapters/muse/backend-adapter.mjs:115 — backend-adapter.itemActivity 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 · ToolCallHandler.flushDeferredToolResponse (cyclomatic 19) · ×1
  • ToolCallHandler.flushDeferredToolResponse (cyclomatic 19) server/src/frontend/tools/tool-call-handler.mjs:450 — ToolCallHandler.flushDeferredToolResponse has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useRealtimeVoice.useRealtimeVoice.scheduleAudioItem (cyclomatic 19) · ×1
  • useRealtimeVoice.useRealtimeVoice.scheduleAudioItem (cyclomatic 19) web/src/realtime/useRealtimeVoice.js:516 — useRealtimeVoice.useRealtimeVoice.scheduleAudioItem has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DesktopSpriteOrb.DesktopSpriteOrb (cyclomatic 19) · ×1
  • DesktopSpriteOrb.DesktopSpriteOrb (cyclomatic 19) web/src/desktop/DesktopSpriteOrb.jsx:13 — DesktopSpriteOrb.DesktopSpriteOrb has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 94, 78, 41, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · normalizeSettings (cyclomatic 19) · ×1
  • normalizeSettings (cyclomatic 19) desktop/src/settings-config.mjs:302 — normalizeSettings has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · session-journal-retention.compactJournalEvents (cyclomatic 18) · ×1
  • session-journal-retention.compactJournalEvents (cyclomatic 18) server/src/session/session-journal-retention.mjs:37 — session-journal-retention.compactJournalEvents has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · realtime-settings-form.createRealtimeSettingsForm.renderField (cyclomatic 18) · ×1
  • realtime-settings-form.createRealtimeSettingsForm.renderField (cyclomatic 18) desktop/src/realtime-settings-form.mjs:72 — realtime-settings-form.createRealtimeSettingsForm.renderField has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · provider-registry.validateModelProfile (cyclomatic 18) · ×1
  • provider-registry.validateModelProfile (cyclomatic 18) server/src/voice/providers/provider-registry.mjs:85 — provider-registry.validateModelProfile 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 · backend-session-utils.nativeToolOutput (cyclomatic 18) · ×1
  • backend-session-utils.nativeToolOutput (cyclomatic 18) server/src/backend/adapters/acp/backend-session-utils.mjs:168 — backend-session-utils.nativeToolOutput 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 · permission-broker.permissionOperation (cyclomatic 18) · ×1
  • permission-broker.permissionOperation (cyclomatic 18) server/src/backend/adapters/acp/permission-broker.mjs:28 — permission-broker.permissionOperation has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · FrontendNotesStore.addUnlocked (cyclomatic 18) · ×1
  • FrontendNotesStore.addUnlocked (cyclomatic 18) server/src/conversation/frontend-notes.mjs:349 — FrontendNotesStore.addUnlocked 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 · AgentTaskRuntime.cancelAgentTask (cyclomatic 18) · ×1
  • AgentTaskRuntime.cancelAgentTask (cyclomatic 18) REDACTED:655 — AgentTaskRuntime.cancelAgentTask 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 · TurnCitations.project (cyclomatic 18) · ×1
  • TurnCitations.project (cyclomatic 18) server/src/voice/turn-citations.mjs:32 — TurnCitations.project has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sprite-orb.resolveAnimations (cyclomatic 18) · ×1
  • sprite-orb.resolveAnimations (cyclomatic 18) web/src/desktop/sprite-orb.js:177 — sprite-orb.resolveAnimations 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 · media-worker.process.on("message") (cyclomatic 18) · ×1
  • media-worker.process.on("message") (cyclomatic 18) server/src/transport/webrtc/media-worker.mjs:41 — media-worker.process.on("message") has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · validateSkinPackage (cyclomatic 18) · ×1
  • validateSkinPackage (cyclomatic 18) desktop/src/skin-store.mjs:140 — validateSkinPackage 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 · frontend-mcp-config.normalizedTransport (cyclomatic 17) · ×1
  • frontend-mcp-config.normalizedTransport (cyclomatic 17) server/src/frontend/tools/mcp/frontend-mcp-config.mjs:147 — frontend-mcp-config.normalizedTransport 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 · GatewayProcess.startOnce (cyclomatic 17) · ×1
  • GatewayProcess.startOnce (cyclomatic 17) shared/gateway/process.mjs:135 — GatewayProcess.startOnce has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · main.runtimeStatus (cyclomatic 17) · ×1
  • main.runtimeStatus (cyclomatic 17) REDACTED:406 — main.runtimeStatus 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 · settings.capturedWakeShortcut (cyclomatic 17) · ×1
  • settings.capturedWakeShortcut (cyclomatic 17) desktop/src/settings.js:174 — settings.capturedWakeShortcut 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 · settings.backendLabel (cyclomatic 17) · ×1
  • settings.backendLabel (cyclomatic 17) desktop/src/settings.js:682 — settings.backendLabel 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 · personal-tools.notes (cyclomatic 17) · ×1
  • personal-tools.notes (cyclomatic 17) server/src/frontend/tools/features/personal-tools.mjs:38 — personal-tools.notes has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · work-input-request.normalizeInputRequest (cyclomatic 17) · ×1
  • work-input-request.normalizeInputRequest (cyclomatic 17) server/src/core/work-input-request.mjs:42 — work-input-request.normalizeInputRequest 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 · PreferencePromoter.reject (cyclomatic 17) · ×1
  • PreferencePromoter.reject (cyclomatic 17) server/src/memory/learning/preference-promoter.mjs:220 — PreferencePromoter.reject 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 · AcpBackendAdapter.continueIdleProjectSession (cyclomatic 17) · ×1
  • AcpBackendAdapter.continueIdleProjectSession (cyclomatic 17) REDACTED:898 — AcpBackendAdapter.continueIdleProjectSession 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 · GatewayClientProtocolSession.receive (cyclomatic 17) · ×1
  • GatewayClientProtocolSession.receive (cyclomatic 17) server/src/transport/gateway-client-protocol-session.mjs:41 — GatewayClientProtocolSession.receive 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 · TaskManager.#create (cyclomatic 17) · ×1
  • TaskManager.#create (cyclomatic 17) server/src/task/task-manager.mjs:481 — TaskManager.#create has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TaskManager.createScheduled (cyclomatic 17) · ×1
  • TaskManager.createScheduled (cyclomatic 17) server/src/task/task-manager.mjs:557 — TaskManager.createScheduled 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 · input-parts.inputPartsFromText (cyclomatic 17) · ×1
  • input-parts.inputPartsFromText (cyclomatic 17) tui/src/input-parts.mjs:155 — input-parts.inputPartsFromText 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 · prompt (cyclomatic 17) · ×1
  • prompt (cyclomatic 17) server/src/backend/adapters/acp/process-client.mjs:598 — prompt has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 7 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sendImageFrame (cyclomatic 17) · ×1
  • sendImageFrame (cyclomatic 17) shared/gateway/webrtc-browser.mjs:171 — sendImageFrame has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (onload, onerror). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · buildConversationTurns (cyclomatic 17) · ×1
  • buildConversationTurns (cyclomatic 17) web/src/message-order.js:162 — buildConversationTurns has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 172, a function literal at line 182, a function literal at line 193, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · setup.inspectAdapter (cyclomatic 16) · ×1
  • setup.inspectAdapter (cyclomatic 16) shared/backend/setup.mjs:264 — setup.inspectAdapter has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · auth-status.piAuthenticationStatus (cyclomatic 16) · ×1
  • auth-status.piAuthenticationStatus (cyclomatic 16) shared/backend/auth-status.mjs:81 — auth-status.piAuthenticationStatus 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 · session-journal-reader.readSessionJournalSync (cyclomatic 16) · ×1
  • session-journal-reader.readSessionJournalSync (cyclomatic 16) server/src/session/session-journal-reader.mjs:8 — session-journal-reader.readSessionJournalSync has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (consume). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · settings-config.cleanWakeShortcut (cyclomatic 16) · ×1
  • settings-config.cleanWakeShortcut (cyclomatic 16) desktop/src/settings-config.mjs:118 — settings-config.cleanWakeShortcut 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 · gateway-connection.parseDesktopGatewayInput (cyclomatic 16) · ×1
  • gateway-connection.parseDesktopGatewayInput (cyclomatic 16) desktop/src/gateway-connection.mjs:12 — gateway-connection.parseDesktopGatewayInput 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 · task-state.publicTask (cyclomatic 16) · ×1
  • task-state.publicTask (cyclomatic 16) server/src/task/task-state.mjs:146 — task-state.publicTask has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · provider.assertMemoryProvider (cyclomatic 16) · ×1
  • provider.assertMemoryProvider (cyclomatic 16) server/src/memory/provider.mjs:76 — provider.assertMemoryProvider 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 · MarkdownContextStore.prepareEdit (cyclomatic 16) · ×1
  • MarkdownContextStore.prepareEdit (cyclomatic 16) server/src/memory/providers/markdown/context-store.mjs:163 — MarkdownContextStore.prepareEdit 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 · VoiceMemProvider.observeAudio (cyclomatic 16) · ×1
  • VoiceMemProvider.observeAudio (cyclomatic 16) server/src/memory/providers/voicemem/provider.mjs:299 — VoiceMemProvider.observeAudio 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 · VoiceMemProvider.apply (cyclomatic 16) · ×1
  • VoiceMemProvider.apply (cyclomatic 16) server/src/memory/providers/voicemem/provider.mjs:426 — VoiceMemProvider.apply 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 · session-configuration.forceSessionModel (cyclomatic 16) · ×1
  • session-configuration.forceSessionModel (cyclomatic 16) server/src/backend/adapters/acp/session-configuration.mjs:108 — session-configuration.forceSessionModel 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 · AcpBackendAdapter.status (cyclomatic 16) · ×1
  • AcpBackendAdapter.status (cyclomatic 16) REDACTED:327 — AcpBackendAdapter.status has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent 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 · AcpBackendAdapter.promptCoordinator (cyclomatic 16) · ×1
  • AcpBackendAdapter.promptCoordinator (cyclomatic 16) REDACTED:1114 — AcpBackendAdapter.promptCoordinator has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MuseBackendAdapter.respondInput (cyclomatic 16) · ×1
  • MuseBackendAdapter.respondInput (cyclomatic 16) server/src/backend/adapters/muse/backend-adapter.mjs:621 — MuseBackendAdapter.respondInput has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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 · FrontendOpenApiAdapter.execute (cyclomatic 16) · ×1
  • FrontendOpenApiAdapter.execute (cyclomatic 16) server/src/frontend/tools/openapi/frontend-openapi-adapter.mjs:466 — FrontendOpenApiAdapter.execute 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 · A2ABackendAdapter.submit (cyclomatic 16) · ×1
  • A2ABackendAdapter.submit (cyclomatic 16) server/src/backend/adapters/a2a/backend-adapter.mjs:1017 — A2ABackendAdapter.submit 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 · mobile-profile.parseMobileGatewayProfile (cyclomatic 16) · ×1
  • mobile-profile.parseMobileGatewayProfile (cyclomatic 16) mobile/src/mobile-profile.js:12 — mobile-profile.parseMobileGatewayProfile 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 · mobile-profile.pairMobileGateway (cyclomatic 16) · ×1
  • mobile-profile.pairMobileGateway (cyclomatic 16) mobile/src/mobile-profile.js:49 — mobile-profile.pairMobileGateway 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 · message-order.mergeConversationHistory (cyclomatic 16) · ×1
  • message-order.mergeConversationHistory (cyclomatic 16) web/src/message-order.js:48 — message-order.mergeConversationHistory has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 50). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · startDesktopRendererServer (cyclomatic 16) · ×1
  • startDesktopRendererServer (cyclomatic 16) desktop/src/renderer-server.mjs:266 — startDesktopRendererServer has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 281, a function literal at line 309, close, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D10 · Test Quality · Fixed-sleep synchronisation · ×1
  • Fixed-sleep synchronisation: 3.8 backend result waits for active speech, then proactively generates one reply server/test/dashscope-omni38-provider.test.mjs:166 — This test starts work it did not wait for (`pending`, still running when the sleep starts) and then orders itself against it with `delay(20)` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
D2 · Cognitive Complexity · App.App (cognitive 338) · ×1
  • App.App (cognitive 338) REDACTED:196 — App.App has cognitive complexity 338 (threshold 15). Drivers by points: if/else 119 (149 pts), boolean chains 103, ternaries 56 (83 pts), error handling 3 (nesting depth added 57). Of this number, 83 points are the body's own statements and 255 belong to 60 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · main (cognitive 196) · ×1
  • main (cognitive 196) cli/src/launcher.mjs:229 — main has cognitive complexity 196 (threshold 15). Drivers by points: if/else 58 (94 pts), ternaries 28 (66 pts), boolean chains 33, loops 1 (3 pts) (nesting depth added 76). Of this number, 192 points are the body's own statements and 4 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · arguments.parseCommandArguments (cognitive 158) · ×1
  • arguments.parseCommandArguments (cognitive 158) REDACTED:89 — arguments.parseCommandArguments has cognitive complexity 158 (threshold 15). Drivers by points: if/else 65 (75 pts), boolean chains 65, ternaries 12 (14 pts), error handling 1 (2 pts), loops 2 (nesting depth added 13). 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 · createRealtimeSessionRuntime.handleClientEvent (cognitive 119) · ×1
  • createRealtimeSessionRuntime.handleClientEvent (cognitive 119) server/src/voice/realtime-session-runtime.mjs:913 — createRealtimeSessionRuntime.handleClientEvent has cognitive complexity 119 (threshold 15). Drivers by points: if/else 47 (73 pts), boolean chains 21, error handling 7 (17 pts), ternaries 3 (6 pts), loops 1 (2 pts) (nesting depth added 40). Of this number, 104 points are the body's own statements and 15 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · attachGatewayClientTransport (cognitive 118) · ×1
  • attachGatewayClientTransport (cognitive 118) server/src/transport/gateway-client-transport.mjs:62 — attachGatewayClientTransport has cognitive complexity 118 (threshold 15). Drivers by points: if/else 46 (62 pts), boolean chains 29, loops 11 (14 pts), ternaries 6 (9 pts), error handling 3 (4 pts) (nesting depth added 23). Most of this is not in the body itself: 1 of the 118 points is its own statement and the rest belongs to 45 function items inside it that branch (a function literal at line 367, status, attachClient::handleRuntimeMessage, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · realtime-session-runtime.createRealtimeSessionRuntime.handleClientEvent (cognitive 108) · ×1
  • realtime-session-runtime.createRealtimeSessionRuntime.handleClientEvent (cognitive 108) server/src/voice/realtime-session-runtime.mjs:913 — realtime-session-runtime.createRealtimeSessionRuntime.handleClientEvent has cognitive complexity 108 (threshold 15). Drivers by points: if/else 47 (73 pts), boolean chains 23, error handling 3 (8 pts), loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 33). Of this number, 96 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · handleLifecycle (cognitive 96) · ×1
  • handleLifecycle (cognitive 96) server/src/voice/realtime-provider.mjs:911 — handleLifecycle has cognitive complexity 96 (threshold 15). Drivers by points: if/else 31 (56 pts), boolean chains 20, ternaries 6 (13 pts), loops 2 (7 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · diagnostics.collectDiagnostics (cognitive 88) · ×1
  • diagnostics.collectDiagnostics (cognitive 88) cli/src/diagnostics.mjs:69 — diagnostics.collectDiagnostics has cognitive complexity 88 (threshold 15). Drivers by points: ternaries 26 (63 pts), if/else 8 (11 pts), boolean chains 9, error handling 3 (5 pts) (nesting depth added 42). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · createRealtimeSessionRuntime.handleEvent (cognitive 85) · ×1
  • createRealtimeSessionRuntime.handleEvent (cognitive 85) server/src/voice/realtime-session-runtime.mjs:585 — createRealtimeSessionRuntime.handleEvent has cognitive complexity 85 (threshold 15). Drivers by points: if/else 27 (52 pts), boolean chains 23, error handling 2 (5 pts), ternaries 3 (5 pts) (nesting depth added 30). Of this number, 69 points are the body's own statements and 16 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · setup.explicitRuntime (cognitive 81) · ×1
  • setup.explicitRuntime (cognitive 81) shared/backend/setup.mjs:168 — setup.explicitRuntime has cognitive complexity 81 (threshold 15). Drivers by points: if/else 17 (34 pts), ternaries 11 (33 pts), boolean chains 14 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useRealtimeVoice.useRealtimeVoice (cognitive 80) · ×1
  • useRealtimeVoice.useRealtimeVoice (cognitive 80) web/src/realtime/useRealtimeVoice.js:206 — useRealtimeVoice.useRealtimeVoice has cognitive complexity 80 (threshold 15). Drivers by points: if/else 45 (51 pts), boolean chains 18, ternaries 6 (10 pts), error handling 1 (nesting depth added 10). Most of this is not in the body itself: 3 of the 80 points are its own statements and the rest belongs to 15 function literals inside it that branch (lines 653, 760, 949, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · realtime-session-runtime.createRealtimeSessionRuntime.handleEvent (cognitive 79) · ×1
  • realtime-session-runtime.createRealtimeSessionRuntime.handleEvent (cognitive 79) server/src/voice/realtime-session-runtime.mjs:585 — realtime-session-runtime.createRealtimeSessionRuntime.handleEvent has cognitive complexity 79 (threshold 15). Drivers by points: if/else 27 (51 pts), boolean chains 23, ternaries 3 (5 pts) (nesting depth added 26). Of this number, 64 points are the body's own statements and 15 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · text-cli.runCli (cognitive 74) · ×1
  • text-cli.runCli (cognitive 74) tui/src/text-cli.mjs:80 — text-cli.runCli has cognitive complexity 74 (threshold 15). Drivers by points: if/else 30 (54 pts), boolean chains 9, ternaries 4 (7 pts), error handling 1 (3 pts), loops 1 (nesting depth added 29). Of this number, 34 points are the body's own statements and 40 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TaskManager.restore (cognitive 72) · ×1
  • TaskManager.restore (cognitive 72) server/src/task/task-manager.mjs:148 — TaskManager.restore has cognitive complexity 72 (threshold 15). Drivers by points: ternaries 14 (35 pts), if/else 10 (19 pts), boolean chains 15, loops 2 (3 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · registerGatewayHttpRoutes (cognitive 64) · ×1
  • registerGatewayHttpRoutes (cognitive 64) REDACTED:30 — registerGatewayHttpRoutes has cognitive complexity 64 (threshold 15). Drivers by points: if/else 26 (32 pts), boolean chains 19, error handling 9, ternaries 3, loops 1 (nesting depth added 6). Most of this is not in the body itself: 2 of the 64 points are its own statements and the rest belongs to 38 function items inside it that branch (a function literal at line 246, a function literal at line 101, a function literal at line 477, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · A2ABackendAdapter.consumeStream (cognitive 63) · ×1
  • A2ABackendAdapter.consumeStream (cognitive 63) server/src/backend/adapters/a2a/backend-adapter.mjs:919 — A2ABackendAdapter.consumeStream has cognitive complexity 63 (threshold 15). Drivers by points: if/else 17 (42 pts), ternaries 4 (14 pts), boolean chains 6, loops 1 (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 · gateway-client-transport.attachGatewayClientTransport.attachClient (cognitive 61) · ×1
  • gateway-client-transport.attachGatewayClientTransport.attachClient (cognitive 61) server/src/transport/gateway-client-transport.mjs:146 — gateway-client-transport.attachGatewayClientTransport.attachClient has cognitive complexity 61 (threshold 15). Drivers by points: if/else 29 (34 pts), boolean chains 20, loops 2 (3 pts), ternaries 2 (3 pts), error handling 1 (nesting depth added 7). Most of this is not in the body itself: 6 of the 61 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 367, handleRuntimeMessage, sendRuntimeError, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · google-live-protocol.createGoogleLiveProtocol (cognitive 58) · ×1
  • google-live-protocol.createGoogleLiveProtocol (cognitive 58) server/src/voice/providers/google-live-protocol.mjs:41 — google-live-protocol.createGoogleLiveProtocol has cognitive complexity 58 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 14, ternaries 8 (14 pts), loops 2 (4 pts) (nesting depth added 16). None of this is in the body itself: all 58 points belong to 5 function items inside it that branch (a function literal at line 75, a function literal at line 198, a function literal at line 229, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · AcpTurnUpdates.run (cognitive 57) · ×1
  • AcpTurnUpdates.run (cognitive 57) server/src/backend/adapters/acp/turn-updates.mjs:79 — AcpTurnUpdates.run has cognitive complexity 57 (threshold 15). Drivers by points: if/else 14 (43 pts), boolean chains 6, error handling 2 (4 pts), loops 2 (3 pts), ternaries 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 · WebRtcConnection.receive (cognitive 55) · ×1
  • WebRtcConnection.receive (cognitive 55) server/src/transport/webrtc/protocol.mjs:71 — WebRtcConnection.receive has cognitive complexity 55 (threshold 15). Drivers by points: if/else 24 (40 pts), boolean chains 14, error handling 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 · inspectBackend (cognitive 55) · ×1
  • inspectBackend (cognitive 55) shared/backend/setup.mjs:326 — inspectBackend has cognitive complexity 55 (threshold 15). Drivers by points: ternaries 16 (27 pts), if/else 10 (15 pts), boolean chains 13 (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 · install.installBackend (cognitive 52) · ×1
  • install.installBackend (cognitive 52) shared/backend/install.mjs:449 — install.installBackend has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (23 pts), ternaries 6 (17 pts), boolean chains 11, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · #responseDone (cognitive 52) · ×1
  • #responseDone (cognitive 52) server/src/voice/realtime-presentation-runtime.mjs:349 — #responseDone has cognitive complexity 52 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 24, 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 · TaskManager.start · ×1
  • TaskManager.start::onEvent (cognitive 51) server/src/task/task-manager.mjs:674 — TaskManager.start::onEvent has cognitive complexity 51 (threshold 15). Drivers by points: if/else 23 (33 pts), boolean chains 13, 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 · createGatewayApplication (cognitive 51) · ×1
  • createGatewayApplication (cognitive 51) REDACTED:63 — createGatewayApplication has cognitive complexity 51 (threshold 15). Drivers by points: boolean chains 23, if/else 14, ternaries 11 (12 pts), loops 2 (nesting depth added 1). Of this number, 27 points are the body's own statements and 24 belong to 32 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · index.runTui · ×1
  • index.runTui::handleGatewayMessage (cognitive 49) tui/src/index.mjs:420 — index.runTui::handleGatewayMessage has cognitive complexity 49 (threshold 15). Drivers by points: if/else 28 (40 pts), boolean chains 8, 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 · tools.memory (cognitive 47) · ×1
  • tools.memory (cognitive 47) server/src/memory/tools.mjs:79 — tools.memory has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 7 (15 pts), boolean chains 12, error handling 2 (4 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 · operationInput (cognitive 47) · ×1
  • operationInput (cognitive 47) server/src/frontend/tools/openapi/frontend-openapi-adapter.mjs:118 — operationInput has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 11, ternaries 5 (9 pts), loops 3, other 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 · runtime.ensureRuntime (cognitive 46) · ×1
  • runtime.ensureRuntime (cognitive 46) cli/src/runtime.mjs:430 — runtime.ensureRuntime has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 11, ternaries 5 (9 pts), error handling 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 · terminal-renderers.createTranscriptDisplay.handle (cognitive 45) · ×1
  • terminal-renderers.createTranscriptDisplay.handle (cognitive 45) tui/src/terminal-renderers.mjs:110 — terminal-renderers.createTranscriptDisplay.handle has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 19, ternaries 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 · createTranscriptDisplay.handle (cognitive 45) · ×1
  • createTranscriptDisplay.handle (cognitive 45) tui/src/terminal-renderers.mjs:110 — createTranscriptDisplay.handle has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 19, ternaries 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 · normalizeKnowledgeRetrievalResponse (cognitive 45) · ×1
  • normalizeKnowledgeRetrievalResponse (cognitive 45) server/src/knowledge/provider.mjs:215 — normalizeKnowledgeRetrievalResponse has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 15 (27 pts), other 7, if/else 3 (6 pts), boolean chains 4, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VideoCallPanel.VideoCallPanel (cognitive 43) · ×1
  • VideoCallPanel.VideoCallPanel (cognitive 43) web/src/composer/VideoCallPanel.jsx:24 — VideoCallPanel.VideoCallPanel has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (18 pts), ternaries 11 (15 pts), boolean chains 8, error handling 2 (nesting depth added 7). Of this number, 16 points are the body's own statements and 27 belong to 8 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · task-view.taskDetail (cognitive 43) · ×1
  • task-view.taskDetail (cognitive 43) web/src/task-view.js:94 — task-view.taskDetail has cognitive complexity 43 (threshold 15). Drivers by points: if/else 22 (30 pts), boolean chains 7, ternaries 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · applyDesktopSettings (cognitive 42) · ×1
  • applyDesktopSettings (cognitive 42) REDACTED:1023 — applyDesktopSettings has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 16, ternaries 4 (5 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 · createGoogleLiveProtocol · ×1
  • createGoogleLiveProtocol::normalizeIncoming (cognitive 42) server/src/voice/providers/google-live-protocol.mjs:75 — createGoogleLiveProtocol::normalizeIncoming has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 10, ternaries 4 (9 pts), loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · task-view.taskView (cognitive 41) · ×1
  • task-view.taskView (cognitive 41) web/src/task-view.js:176 — task-view.taskView has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 20 (29 pts), boolean chains 12 (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 · registerWebRtcIngress (cognitive 41) · ×1
  • registerWebRtcIngress (cognitive 41) server/src/transport/webrtc/routes.mjs:32 — registerWebRtcIngress has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 17, if/else 16 (17 pts), error handling 3, loops 2, ternaries 2 (nesting depth added 1). Most of this is not in the body itself: 5 of the 41 points are its own statements and the rest belongs to 26 function items inside it that branch (a function literal at line 63, errorResponse, a function literal at line 50, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · renderBackendOptions (cognitive 40) · ×1
  • renderBackendOptions (cognitive 40) desktop/src/settings.js:363 — renderBackendOptions has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 16, ternaries 10 (15 pts), if/else 9 (nesting depth added 5). Most of this is not in the body itself: 12 of the 40 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 419, appendGroup, a function literal at line 402, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · session-replay.replaySession (cognitive 38) · ×1
  • session-replay.replaySession (cognitive 38) server/src/session/session-replay.mjs:8 — session-replay.replaySession has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 5 (15 pts), if/else 6 (14 pts), boolean chains 8, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · options.backendOptionStates (cognitive 37) · ×1
  • options.backendOptionStates (cognitive 37) desktop/src/backend/options.mjs:48 — options.backendOptionStates has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 7 (17 pts), boolean chains 13, if/else 5 (6 pts), loops 1 (nesting depth added 11). Of this number, 33 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gateway-process.desktopGatewayCompatibility (cognitive 37) · ×1
  • gateway-process.desktopGatewayCompatibility (cognitive 37) desktop/src/gateway-process.mjs:79 — gateway-process.desktopGatewayCompatibility has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 15, error handling 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · observe (cognitive 37) · ×1
  • observe (cognitive 37) server/src/memory/learning/preference-candidates.mjs:290 — observe has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (21 pts), ternaries 5 (8 pts), boolean chains 6, 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 · orb-shell.bindOrbShell (cognitive 35) · ×1
  • orb-shell.bindOrbShell (cognitive 35) desktop/src/orb-shell.mjs:57 — orb-shell.bindOrbShell has cognitive complexity 35 (threshold 15). Drivers by points: if/else 20 (22 pts), boolean chains 6, ternaries 6, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 5 of the 35 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 140, 102, 165, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · KnowledgeLibraryPanel.KnowledgeLibraryPanel (cognitive 34) · ×1
  • KnowledgeLibraryPanel.KnowledgeLibraryPanel (cognitive 34) web/src/KnowledgeLibraryPanel.jsx:24 — KnowledgeLibraryPanel.KnowledgeLibraryPanel has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 13, if/else 11 (13 pts), ternaries 3 (4 pts), error handling 3, loops 1 (nesting depth added 3). Most of this is not in the body itself: 6 of the 34 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 56, submit, a function literal at line 35, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · createRealtimeSessionRuntime (cognitive 34) · ×1
  • createRealtimeSessionRuntime (cognitive 34) server/src/voice/realtime-session-runtime.mjs:71 — createRealtimeSessionRuntime has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 20, if/else 8, ternaries 5, error handling 1. Most of this is not in the body itself: 3 of the 34 points are its own statements and the rest belongs to 60 function items inside it that branch (onToolResultReady, onDiagnostic, isDeliveryBlocked, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · WebRtcConnection.send (cognitive 33) · ×1
  • WebRtcConnection.send (cognitive 33) server/src/transport/webrtc/protocol.mjs:152 — WebRtcConnection.send has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (21 pts), ternaries 4 (10 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · task-artifact.normalizePart (cognitive 32) · ×1
  • task-artifact.normalizePart (cognitive 32) server/src/task/task-artifact.mjs:34 — task-artifact.normalizePart has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 4 (8 pts), boolean chains 7, error handling 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 · ToolCallHandler.sendOutput (cognitive 32) · ×1
  • ToolCallHandler.sendOutput (cognitive 32) server/src/frontend/tools/tool-call-handler.mjs:291 — ToolCallHandler.sendOutput has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 14, ternaries 8 (11 pts), if/else 5 (6 pts), error handling 1 (nesting depth added 4). Of this number, 28 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · terminal-renderers.createPersistentTerminalRenderer · ×1
  • terminal-renderers.createPersistentTerminalRenderer::handleKeypress (cognitive 32) tui/src/terminal-renderers.mjs:596 — terminal-renderers.createPersistentTerminalRenderer::handleKeypress has cognitive complexity 32 (threshold 15). Drivers by points: if/else 21 (24 pts), boolean chains 8 (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 · input-parts.inputPartsFromText (cognitive 32) · ×1
  • input-parts.inputPartsFromText (cognitive 32) tui/src/input-parts.mjs:155 — input-parts.inputPartsFromText has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 3 (7 pts), loops 3 (6 pts), ternaries 2, boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useRealtimeVoice · ×1
  • useRealtimeVoice::(anonymous)::handleEvent (cognitive 32) web/src/realtime/useRealtimeVoice.js:653 — useRealtimeVoice::(anonymous)::handleEvent has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 10 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · provider-registry.validateRealtimeProvider (cognitive 31) · ×1
  • provider-registry.validateRealtimeProvider (cognitive 31) server/src/voice/providers/provider-registry.mjs:175 — provider-registry.validateRealtimeProvider has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 10, loops 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · task-updates.updateTask (cognitive 31) · ×1
  • task-updates.updateTask (cognitive 31) server/src/orchestration/task-updates.mjs:7 — task-updates.updateTask has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17, boolean chains 12, ternaries 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 · ToolCallHandler.handle (cognitive 31) · ×1
  • ToolCallHandler.handle (cognitive 31) server/src/frontend/tools/tool-call-handler.mjs:530 — ToolCallHandler.handle has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 10, ternaries 3 (4 pts), error handling 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · PhotoCapture.PhotoCapture (cognitive 31) · ×1
  • PhotoCapture.PhotoCapture (cognitive 31) REDACTED:5 — PhotoCapture.PhotoCapture has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 6, ternaries 3 (5 pts), error handling 3 (nesting depth added 5). Most of this is not in the body itself: 4 of the 31 points are its own statements and the rest belongs to 6 function items inside it that branch (takePhoto, accept, a function literal at line 35, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · load (cognitive 31) · ×1
  • load (cognitive 31) server/src/conversation/frontend-notes.mjs:155 — load has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 9, ternaries 6 (9 pts), error handling 1, loops 1, other 1 (nesting depth added 6). Most of this is not in the body itself: 8 of the 31 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 183, 180, 208). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · discoverOperations (cognitive 31) · ×1
  • discoverOperations (cognitive 31) server/src/frontend/tools/openapi/frontend-openapi-adapter.mjs:236 — discoverOperations has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 8, loops 3 (4 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 · #connect (cognitive 31) · ×1
  • #connect (cognitive 31) shared/gateway/client-sdk.mjs:265 — #connect has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 8, ternaries 5 (7 pts), error handling 2 (nesting depth added 4). Most of this is not in the body itself: 8 of the 31 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 331, 289, 293, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · receiveTrack (cognitive 31) · ×1
  • receiveTrack (cognitive 31) server/src/transport/webrtc/media.mjs:128 — receiveTrack has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 8, error handling 3 (6 pts) (nesting depth added 10). Most of this is not in the body itself: 6 of the 31 points are its own statements and the rest belongs to 5 function items inside it that branch (onframe, ondata, a function literal at line 158, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · prune (cognitive 31) · ×1
  • prune (cognitive 31) server/src/session/session-journal-registry.mjs:124 — prune has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6, error handling 3 (6 pts), loops 3 (4 pts) (nesting depth added 11). Of this number, 30 points are the body's own statements and 1 belongs to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · start (cognitive 31) · ×1
  • start (cognitive 31) server/src/access/tailscale-serve.mjs:76 — start has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 6, ternaries 3 (4 pts), error handling 2, loops 1 (nesting depth added 4). Most of this is not in the body itself: 6 of the 31 points are its own statements and the rest belongs to 12 function items inside it that branch ((anonymous)::check, a function literal at line 90, (anonymous)::settle, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · lease.acquireGatewayLease (cognitive 30) · ×1
  • lease.acquireGatewayLease (cognitive 30) shared/gateway/lease.mjs:92 — lease.acquireGatewayLease has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (20 pts), error handling 2 (4 pts), ternaries 1 (4 pts), boolean chains 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · backend-session-utils.activityFromUpdate (cognitive 30) · ×1
  • backend-session-utils.activityFromUpdate (cognitive 30) server/src/backend/adapters/acp/backend-session-utils.mjs:60 — backend-session-utils.activityFromUpdate has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 11, if/else 9 (11 pts), ternaries 4 (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 · AnnouncementManager.deliver (cognitive 30) · ×1
  • AnnouncementManager.deliver (cognitive 30) server/src/voice/announcement/announcement-manager.mjs:352 — AnnouncementManager.deliver has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (18 pts), ternaries 4 (5 pts), boolean chains 4, error handling 2 (3 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · minicpm-o-protocol.createMiniCpmOProtocol.normalizeIncoming (cognitive 29) · ×1
  • minicpm-o-protocol.createMiniCpmOProtocol.normalizeIncoming (cognitive 29) server/src/voice/providers/minicpm-o-protocol.mjs:65 — minicpm-o-protocol.createMiniCpmOProtocol.normalizeIncoming has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 9, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SessionTaskCoordinator.handleEvent (cognitive 29) · ×1
  • SessionTaskCoordinator.handleEvent (cognitive 29) server/src/orchestration/session-task-coordinator.mjs:171 — SessionTaskCoordinator.handleEvent has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (19 pts), ternaries 5 (8 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 · AgentTaskRuntime.executeSpawnThinkingToolCall (cognitive 29) · ×1
  • AgentTaskRuntime.executeSpawnThinkingToolCall (cognitive 29) REDACTED:266 — AgentTaskRuntime.executeSpawnThinkingToolCall has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 10, ternaries 4 (5 pts), error handling 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 · cancel (cognitive 29) · ×1
  • cancel (cognitive 29) server/src/task/task-manager.mjs:906 — cancel has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 11, if/else 8 (11 pts), ternaries 3 (6 pts), error handling 1 (nesting depth added 6). Most of this is not in the body itself: 9 of the 29 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 943, a function literal at line 926, (anonymous)::abort). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · #import (cognitive 29) · ×1
  • #import (cognitive 29) server/src/knowledge/providers/local/library.mjs:206 — #import has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 9, if/else 9, ternaries 6 (9 pts), error handling 2 (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 · run (cognitive 29) · ×1
  • run (cognitive 29) server/src/memory/learning/extractor.mjs:263 — run has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 11, loops 2 (3 pts), error handling 1, ternaries 1 (nesting depth added 2). Of this number, 24 points are the body's own statements and 5 belong to 18 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · doubao-seeduplex-protocol.createDoubaoSeeduplexProtocol · ×1
  • doubao-seeduplex-protocol.createDoubaoSeeduplexProtocol::normalizeResponseEvent (cognitive 28) server/src/voice/providers/doubao-seeduplex-protocol.mjs:102 — doubao-seeduplex-protocol.createDoubaoSeeduplexProtocol::normalizeResponseEvent has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 9, loops 1 (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 · backend-adapter.partContent (cognitive 28) · ×1
  • backend-adapter.partContent (cognitive 28) server/src/backend/adapters/a2a/backend-adapter.mjs:190 — backend-adapter.partContent has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 10 (19 pts), boolean chains 5, if/else 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runCli · ×1
  • runCli::onEvent (cognitive 28) tui/src/text-cli.mjs:150 — runCli::onEvent has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 6 (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 · settings-config.updateSettingsContent (cognitive 27) · ×1
  • settings-config.updateSettingsContent (cognitive 27) desktop/src/settings-config.mjs:413 — settings-config.updateSettingsContent has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 11, loops 2 (3 pts), ternaries 1 (nesting depth added 2). Of this number, 15 points are the body's own statements and 12 belong to 4 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ConversationSync.upsert (cognitive 27) · ×1
  • ConversationSync.upsert (cognitive 27) server/src/conversation/conversation-sync.mjs:122 — ConversationSync.upsert has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 9, error handling 2 (5 pts), ternaries 2, 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 · apply (cognitive 27) · ×1
  • apply (cognitive 27) server/src/memory/providers/voicemem/provider.mjs:426 — apply has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (8 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · normalizeKnowledgeDocument (cognitive 27) · ×1
  • normalizeKnowledgeDocument (cognitive 27) server/src/knowledge/provider.mjs:50 — normalizeKnowledgeDocument has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 12, other 9, 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 · process-path.discoverNodeInstallations (cognitive 26) · ×1
  • process-path.discoverNodeInstallations (cognitive 26) REDACTED:125 — process-path.discoverNodeInstallations has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 2 (6 pts), loops 2 (6 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 · resolveAnimations (cognitive 26) · ×1
  • resolveAnimations (cognitive 26) web/src/desktop/sprite-orb.js:177 — resolveAnimations has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 2 (6 pts), boolean chains 5, loops 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 · instance-lock.acquireCliInstance (cognitive 25) · ×1
  • instance-lock.acquireCliInstance (cognitive 25) cli/src/instance-lock.mjs:22 — instance-lock.acquireCliInstance has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (12 pts), error handling 4 (10 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · content.artifactPartFromAcpBlock (cognitive 25) · ×1
  • content.artifactPartFromAcpBlock (cognitive 25) server/src/backend/adapters/acp/content.mjs:23 — content.artifactPartFromAcpBlock has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 8, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AcpBackendAdapter.coordinatorTurn (cognitive 25) · ×1
  • AcpBackendAdapter.coordinatorTurn (cognitive 25) REDACTED:1165 — AcpBackendAdapter.coordinatorTurn has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 7, loops 1 (2 pts), ternaries 2 (nesting depth added 4). Of this number, 21 points are the body's own statements and 4 belong to one function literal inside it that branches. 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 · TurnCitations.project (cognitive 25) · ×1
  • TurnCitations.project (cognitive 25) server/src/voice/turn-citations.mjs:32 — TurnCitations.project has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 5 (7 pts), boolean chains 4, loops 1 (nesting depth added 8). Of this number, 17 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · onSessionUpdate (cognitive 25) · ×1
  • onSessionUpdate (cognitive 25) REDACTED:657 — onSessionUpdate has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, if/else 10, ternaries 1 (2 pts) (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 · loadRuntimeEnvironment (cognitive 25) · ×1
  • loadRuntimeEnvironment (cognitive 25) shared/runtime-environment.mjs:247 — loadRuntimeEnvironment has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (6 pts), ternaries 6, boolean chains 3 (nesting depth added 6). Of this number, 24 points are the body's own statements and 1 belongs to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProcessWebRtcMedia.receive (cognitive 24) · ×1
  • ProcessWebRtcMedia.receive (cognitive 24) server/src/transport/webrtc/media-process.mjs:78 — ProcessWebRtcMedia.receive has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 6 (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 · LlmBackendAdapter.submit (cognitive 24) · ×1
  • LlmBackendAdapter.submit (cognitive 24) server/src/backend/adapters/llm/backend-adapter.mjs:219 — LlmBackendAdapter.submit has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, error handling 2, ternaries 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentTaskRuntime.cancelAgentTask (cognitive 24) · ×1
  • AgentTaskRuntime.cancelAgentTask (cognitive 24) REDACTED:655 — AgentTaskRuntime.cancelAgentTask has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 7 (12 pts), if/else 6 (8 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentTaskRuntime.getAgentTaskStatus (cognitive 24) · ×1
  • AgentTaskRuntime.getAgentTaskStatus (cognitive 24) REDACTED:751 — AgentTaskRuntime.getAgentTaskStatus has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 10 (13 pts), boolean chains 9, if/else 2 (nesting depth added 3). Of this number, 16 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · handleResponseRefusal (cognitive 24) · ×1
  • handleResponseRefusal (cognitive 24) server/src/voice/realtime-provider.mjs:1079 — handleResponseRefusal has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (9 pts), loops 1 (2 pts), error handling 1, ternaries 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 · connect (cognitive 24) · ×1
  • connect (cognitive 24) shared/gateway/webrtc-browser.mjs:22 — connect has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 4, error handling 3 (nesting depth added 2). Of this number, 13 points are the body's own statements and 11 belong to 9 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · validateAnimations (cognitive 24) · ×1
  • validateAnimations (cognitive 24) desktop/src/skin-store.mjs:106 — validateAnimations has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 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 · normalizedTransport (cognitive 24) · ×1
  • normalizedTransport (cognitive 24) server/src/frontend/tools/mcp/frontend-mcp-config.mjs:147 — normalizedTransport has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 5, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · readTurnTimeline (cognitive 24) · ×1
  • readTurnTimeline (cognitive 24) cli/src/diagnostics.mjs:30 — readTurnTimeline has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (14 pts), error handling 3 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). Of this number, 23 points are the body's own statements and 1 belongs to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentTaskRuntime.respondAgentPermission (cognitive 23) · ×1
  • AgentTaskRuntime.respondAgentPermission (cognitive 23) REDACTED:462 — AgentTaskRuntime.respondAgentPermission has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 7, ternaries 4 (7 pts), if/else 6, loops 2, error handling 1 (nesting depth added 3). Of this number, 20 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · main.MobileApp (cognitive 23) · ×1
  • main.MobileApp (cognitive 23) mobile/src/main.jsx:18 — main.MobileApp has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 3 (6 pts), error handling 2 (nesting depth added 3). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 34, scan, a function literal at line 64, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · startLocalGateway (cognitive 23) · ×1
  • startLocalGateway (cognitive 23) REDACTED:298 — startLocalGateway has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5, error handling 2 (3 pts) (nesting depth added 6). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 5 function items inside it that branch (onGatewayMessage, a function literal at line 332, a function literal at line 334, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · addUnlocked (cognitive 23) · ×1
  • addUnlocked (cognitive 23) server/src/conversation/frontend-notes.mjs:349 — addUnlocked has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (19 pts), ternaries 2, boolean chains 1, 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, 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 · parseSettings (cognitive 23) · ×1
  • parseSettings (cognitive 23) desktop/src/settings-config.mjs:194 — parseSettings has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 17, ternaries 4, other 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 · OpenClawGatewayRpc.call (cognitive 22) · ×1
  • OpenClawGatewayRpc.call (cognitive 22) server/src/backend/adapters/acp/drivers/openclaw-delegation.mjs:54 — OpenClawGatewayRpc.call has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 6, ternaries 1 (3 pts), error handling 1 (nesting depth added 3). None of this is in the body itself: all 22 points belong to 6 function literals inside it that branch (lines 93, 68, 62, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · GatewayClientProtocolSession.receive (cognitive 22) · ×1
  • GatewayClientProtocolSession.receive (cognitive 22) server/src/transport/gateway-client-protocol-session.mjs:41 — GatewayClientProtocolSession.receive has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 3 (6 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · publish (cognitive 22) · ×1
  • publish (cognitive 22) server/src/client/client-event-router.mjs:146 — publish has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 5 (6 pts), other 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 · setup.findExecutable (cognitive 21) · ×1
  • setup.findExecutable (cognitive 21) shared/backend/setup.mjs:68 — setup.findExecutable has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 3 (5 pts), boolean chains 4, 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 · setup.formatBackendSetup (cognitive 21) · ×1
  • setup.formatBackendSetup (cognitive 21) shared/backend/setup.mjs:563 — setup.formatBackendSetup has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 7 (19 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · personal-tools.notes (cognitive 21) · ×1
  • personal-tools.notes (cognitive 21) server/src/frontend/tools/features/personal-tools.mjs:38 — personal-tools.notes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (11 pts), error handling 2 (5 pts), boolean chains 4, ternaries 1 (nesting depth added 4). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · RealtimeFrontend.handleProviderEvent (cognitive 21) · ×1
  • RealtimeFrontend.handleProviderEvent (cognitive 21) server/src/voice/realtime-provider.mjs:318 — RealtimeFrontend.handleProviderEvent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RealtimeFrontend.injectDelivery (cognitive 21) · ×1
  • RealtimeFrontend.injectDelivery (cognitive 21) server/src/voice/realtime-provider.mjs:653 — RealtimeFrontend.injectDelivery has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 8 (nesting depth added 1). Of this number, 17 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · VoiceMemProvider.observeAudio (cognitive 21) · ×1
  • VoiceMemProvider.observeAudio (cognitive 21) server/src/memory/providers/voicemem/provider.mjs:299 — VoiceMemProvider.observeAudio has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3, error handling 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 · AcpBackendAdapter.status (cognitive 21) · ×1
  • AcpBackendAdapter.status (cognitive 21) REDACTED:327 — AcpBackendAdapter.status has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 7 (13 pts), boolean chains 5, if/else 3 (nesting depth added 6). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AcpBackendAdapter.ensureCoordinatorSession (cognitive 21) · ×1
  • AcpBackendAdapter.ensureCoordinatorSession (cognitive 21) REDACTED:491 — AcpBackendAdapter.ensureCoordinatorSession has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 503). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · AcpBackendAdapter.promptCoordinator (cognitive 21) · ×1
  • AcpBackendAdapter.promptCoordinator (cognitive 21) REDACTED:1114 — AcpBackendAdapter.promptCoordinator has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 2 (5 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 10). Of this number, 19 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SampleQueue.read (cognitive 21) · ×1
  • SampleQueue.read (cognitive 21) tui/native/macos-voice-io.swift:127 — SampleQueue.read has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (16 pts), boolean chains 2, match/switch 1 (2 pts), 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 · continueInterruptedTask (cognitive 21) · ×1
  • continueInterruptedTask (cognitive 21) server/src/backend/adapters/a2a/backend-adapter.mjs:798 — continueInterruptedTask has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 7, ternaries 7, if/else 5 (6 pts), error handling 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 · begin (cognitive 21) · ×1
  • begin (cognitive 21) server/src/voice/realtime-presentation-runtime.mjs:159 — begin has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 5, ternaries 3, other 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 · #connect (cognitive 21) · ×1
  • #connect (cognitive 21) server/src/frontend/tools/mcp/frontend-mcp-client.mjs:179 — #connect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (6 pts), boolean chains 4, loops 3 (4 pts), ternaries 2 (4 pts), error handling 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · prepareEdit (cognitive 21) · ×1
  • prepareEdit (cognitive 21) server/src/memory/providers/markdown/context-store.mjs:163 — prepareEdit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 4 (8 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildSession (cognitive 21) · ×1
  • buildSession (cognitive 21) server/src/voice/providers/dashscope.mjs:124 — buildSession has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 2 (5 pts), boolean chains 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · file-transaction-lock.acquire (cognitive 20) · ×1
  • file-transaction-lock.acquire (cognitive 20) shared/file-transaction-lock.mjs:50 — file-transaction-lock.acquire has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), error handling 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 11). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · session-journal-retention.compactJournalEvents (cognitive 20) · ×1
  • session-journal-retention.compactJournalEvents (cognitive 20) server/src/session/session-journal-retention.mjs:37 — session-journal-retention.compactJournalEvents has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, loops 5 (nesting depth added 4). Of this number, 14 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · realtime-settings-form.createRealtimeSettingsForm.renderField (cognitive 20) · ×1
  • realtime-settings-form.createRealtimeSettingsForm.renderField (cognitive 20) desktop/src/realtime-settings-form.mjs:72 — realtime-settings-form.createRealtimeSettingsForm.renderField has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, ternaries 3, loops 1 (2 pts) (nesting depth added 2). Of this number, 16 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · backend-session-utils.nativeToolOutput (cognitive 20) · ×1
  • backend-session-utils.nativeToolOutput (cognitive 20) server/src/backend/adapters/acp/backend-session-utils.mjs:168 — backend-session-utils.nativeToolOutput has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (2 pts), ternaries 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 · backend-adapter.itemActivity (cognitive 20) · ×1
  • backend-adapter.itemActivity (cognitive 20) server/src/backend/adapters/muse/backend-adapter.mjs:115 — backend-adapter.itemActivity has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, ternaries 4 (8 pts), if/else 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 · MultimodalComposer.MultimodalComposer (cognitive 20) · ×1
  • MultimodalComposer.MultimodalComposer (cognitive 20) web/src/composer/MultimodalComposer.jsx:35 — MultimodalComposer.MultimodalComposer has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7, ternaries 3, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 47, submit, a function literal at line 155, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · DesktopSpriteOrb.DesktopSpriteOrb (cognitive 20) · ×1
  • DesktopSpriteOrb.DesktopSpriteOrb (cognitive 20) web/src/desktop/DesktopSpriteOrb.jsx:13 — DesktopSpriteOrb.DesktopSpriteOrb has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 5, ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 94, 78, 41, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · runTui · ×1
  • runTui::connectGateway::onStatus (cognitive 20) tui/src/index.mjs:587 — runTui::connectGateway::onStatus has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 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 · createLogger (cognitive 20) · ×1
  • createLogger (cognitive 20) shared/logger.mjs:240 — createLogger has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 5, ternaries 3 (4 pts), error handling 1 (2 pts) (nesting depth added 2). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 10 function items inside it that branch (emit, onError, flush, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · setup.inspectAdapter (cognitive 19) · ×1
  • setup.inspectAdapter (cognitive 19) shared/backend/setup.mjs:264 — setup.inspectAdapter has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 5 (8 pts), 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 · gateway-service.launchdAction (cognitive 19) · ×1
  • gateway-service.launchdAction (cognitive 19) cli/src/gateway-service.mjs:232 — gateway-service.launchdAction has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (19 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 · GatewayProcess.startOnce (cognitive 19) · ×1
  • GatewayProcess.startOnce (cognitive 19) shared/gateway/process.mjs:135 — GatewayProcess.startOnce has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 4, boolean chains 3, error handling 1 (nesting depth added 3). Of this number, 14 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · SafeUrlFetcher.fetch (cognitive 19) · ×1
  • SafeUrlFetcher.fetch (cognitive 19) server/src/frontend/retrieval/safe-url-fetcher.mjs:231 — SafeUrlFetcher.fetch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 5, ternaries 2 (4 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · session-configuration.applyProfileSessionConfig (cognitive 19) · ×1
  • session-configuration.applyProfileSessionConfig (cognitive 19) server/src/backend/adapters/acp/session-configuration.mjs:51 — session-configuration.applyProfileSessionConfig has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 6, if/else 3 (6 pts), ternaries 2 (4 pts), error handling 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrontendNotesStore.removeUnlocked (cognitive 19) · ×1
  • FrontendNotesStore.removeUnlocked (cognitive 19) server/src/conversation/frontend-notes.mjs:424 — FrontendNotesStore.removeUnlocked has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 3 (5 pts), boolean chains 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 · client-state.reduceGatewayClientState (cognitive 19) · ×1
  • client-state.reduceGatewayClientState (cognitive 19) shared/gateway/client-state.mjs:29 — client-state.reduceGatewayClientState has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (5 pts), ternaries 2 (4 pts), match/switch 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 · respondInput (cognitive 19) · ×1
  • respondInput (cognitive 19) server/src/backend/adapters/muse/backend-adapter.mjs:621 — respondInput has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 5 (7 pts), boolean chains 5 (nesting depth added 3). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. 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 · resolveBackend (cognitive 19) · ×1
  • resolveBackend (cognitive 19) cli/src/runtime.mjs:62 — resolveBackend has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 12, if/else 5, 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 · install.findNpmDirectly (cognitive 18) · ×1
  • install.findNpmDirectly (cognitive 18) shared/backend/install.mjs:378 — install.findNpmDirectly has cognitive complexity 18 (threshold 15). Drivers by points: error handling 2 (7 pts), if/else 3 (6 pts), loops 3 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · install.findNpmByScanningDirectories (cognitive 18) · ×1
  • install.findNpmByScanningDirectories (cognitive 18) shared/backend/install.mjs:408 — install.findNpmByScanningDirectories has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 6, loops 2 (3 pts), error handling 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 · logger.rotate (cognitive 18) · ×1
  • logger.rotate (cognitive 18) shared/logger.mjs:114 — logger.rotate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 4 (6 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 · SessionJournalRegistry.taskSnapshotsSync (cognitive 18) · ×1
  • SessionJournalRegistry.taskSnapshotsSync (cognitive 18) server/src/session/session-journal-registry.mjs:224 — SessionJournalRegistry.taskSnapshotsSync has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 2 (6 pts), loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PreferenceCandidatePool.reload (cognitive 18) · ×1
  • PreferenceCandidatePool.reload (cognitive 18) server/src/memory/learning/preference-candidates.mjs:212 — PreferenceCandidatePool.reload has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (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 · AcpBackendAdapter.continueIdleProjectSession (cognitive 18) · ×1
  • AcpBackendAdapter.continueIdleProjectSession (cognitive 18) REDACTED:898 — AcpBackendAdapter.continueIdleProjectSession has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 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 · agent-task-runtime.recentTaskUpdates (cognitive 18) · ×1
  • agent-task-runtime.recentTaskUpdates (cognitive 18) REDACTED:27 — agent-task-runtime.recentTaskUpdates has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (8 pts), boolean chains 5, if/else 2 (4 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ToolCallHandler.flushDeferredToolResponse (cognitive 18) · ×1
  • ToolCallHandler.flushDeferredToolResponse (cognitive 18) server/src/frontend/tools/tool-call-handler.mjs:450 — ToolCallHandler.flushDeferredToolResponse has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, ternaries 4 (6 pts), if/else 4, error handling 1 (nesting depth added 2). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: 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 · GatewayClient.recover (cognitive 18) · ×1
  • GatewayClient.recover (cognitive 18) shared/gateway/client-sdk.mjs:230 — GatewayClient.recover has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (6 pts), boolean chains 5, loops 2 (5 pts), error handling 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 · useRealtimeVoice.useRealtimeVoice.scheduleAudioItem (cognitive 18) · ×1
  • useRealtimeVoice.useRealtimeVoice.scheduleAudioItem (cognitive 18) web/src/realtime/useRealtimeVoice.js:516 — useRealtimeVoice.useRealtimeVoice.scheduleAudioItem has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, error handling 2 (nesting depth added 2). Of this number, 13 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · media-worker.process.on("message") (cognitive 18) · ×1
  • media-worker.process.on("message") (cognitive 18) server/src/transport/webrtc/media-worker.mjs:41 — media-worker.process.on("message") has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · macos-voice-io.swift.top-level code (cognitive 18) · ×1
  • macos-voice-io.swift.top-level code (cognitive 18) tui/native/macos-voice-io.swift:4 — macos-voice-io.swift.top-level code has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 1 (3 pts), boolean chains 2, 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 · prompt (cognitive 18) · ×1
  • prompt (cognitive 18) server/src/backend/adapters/acp/process-client.mjs:598 — prompt has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, error handling 2, ternaries 1 (nesting depth added 2). Of this number, 14 points are the body's own statements and 4 belong to 7 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · assertGatewayCompatibility (cognitive 18) · ×1
  • assertGatewayCompatibility (cognitive 18) cli/src/runtime.mjs:134 — assertGatewayCompatibility has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (7 pts), ternaries 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 · normalizeSettings (cognitive 18) · ×1
  • normalizeSettings (cognitive 18) desktop/src/settings-config.mjs:302 — normalizeSettings has cognitive complexity 18 (threshold 15). Drivers by points: other 9, boolean chains 4, ternaries 4, if/else 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 · connectNow (cognitive 18) · ×1
  • connectNow (cognitive 18) server/src/voice/realtime-provider-session.mjs:181 — connectNow has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 230, a function literal at line 210, onEvent, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · applyWindowsPath (cognitive 18) · ×1
  • applyWindowsPath (cognitive 18) REDACTED:221 — applyWindowsPath has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 5). Of this number, 15 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · submitPermission (cognitive 18) · ×1
  • submitPermission (cognitive 18) server/src/orchestration/task-operations.mjs:200 — submitPermission has cognitive complexity 18 (threshold 15). Drivers by points: error handling 4 (7 pts), if/else 5 (6 pts), boolean chains 2, loops 1 (2 pts), ternaries 1 (nesting depth added 5). Of this number, 10 points are the body's own statements and 8 belong to 8 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · buildConversationTurns (cognitive 18) · ×1
  • buildConversationTurns (cognitive 18) web/src/message-order.js:162 — buildConversationTurns has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, ternaries 5 (6 pts), if/else 3 (4 pts), loops 1, other 1 (nesting depth added 2). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 172, a function literal at line 182, (anonymous)::afterTaskCard, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · session-journal-reader.readSessionJournalSync · ×1
  • session-journal-reader.readSessionJournalSync::consume (cognitive 17) server/src/session/session-journal-reader.mjs:20 — session-journal-reader.readSessionJournalSync::consume has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, error handling 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 · PreferencePromoter.reject (cognitive 17) · ×1
  • PreferencePromoter.reject (cognitive 17) server/src/memory/learning/preference-promoter.mjs:220 — PreferencePromoter.reject has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7 (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 · TaskManager.createScheduled (cognitive 17) · ×1
  • TaskManager.createScheduled (cognitive 17) server/src/task/task-manager.mjs:557 — TaskManager.createScheduled has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, ternaries 7 (8 pts) (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 · PermissionPolicy.applyDecision (cognitive 17) · ×1
  • PermissionPolicy.applyDecision (cognitive 17) server/src/task/permission-policy.mjs:66 — PermissionPolicy.applyDecision has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 3). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 80). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · BrowserWebRtcConnection.received (cognitive 17) · ×1
  • BrowserWebRtcConnection.received (cognitive 17) shared/gateway/webrtc-browser.mjs:109 — BrowserWebRtcConnection.received has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 1 (3 pts), 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 · task-artifacts.artifactPartView (cognitive 17) · ×1
  • task-artifacts.artifactPartView (cognitive 17) web/src/task-artifacts.js:34 — task-artifacts.artifactPartView has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · portaudio-voice-io.main (cognitive 17) · ×1
  • portaudio-voice-io.main (cognitive 17) tui/native/portaudio-voice-io.py:22 — portaudio-voice-io.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 5 (7 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · localizeDesktopDocument (cognitive 17) · ×1
  • localizeDesktopDocument (cognitive 17) desktop/src/i18n.mjs:219 — localizeDesktopDocument has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (4 pts), boolean chains 2, other 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sendImageFrame (cognitive 17) · ×1
  • sendImageFrame (cognitive 17) shared/gateway/webrtc-browser.mjs:171 — sendImageFrame has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (onload, onerror). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · skin-store.validateSkinPackage (cognitive 16) · ×1
  • skin-store.validateSkinPackage (cognitive 16) desktop/src/skin-store.mjs:140 — skin-store.validateSkinPackage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 7, error handling 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 · settings.backendLabel (cognitive 16) · ×1
  • settings.backendLabel (cognitive 16) desktop/src/settings.js:682 — settings.backendLabel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, 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 · citation.normalizeSearchResponse (cognitive 16) · ×1
  • citation.normalizeSearchResponse (cognitive 16) server/src/core/citation.mjs:47 — citation.normalizeSearchResponse has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 2 (4 pts), boolean chains 3, 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 · RealtimeFrontend.cancelResponses (cognitive 16) · ×1
  • RealtimeFrontend.cancelResponses (cognitive 16) server/src/voice/realtime-provider.mjs:799 — RealtimeFrontend.cancelResponses has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3, boolean chains 2, error handling 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · request-security.isAllowedOrigin (cognitive 16) · ×1
  • request-security.isAllowedOrigin (cognitive 16) REDACTED:52 — request-security.isAllowedOrigin has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 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 · work-input-request.normalizeInputRequest (cognitive 16) · ×1
  • work-input-request.normalizeInputRequest (cognitive 16) server/src/core/work-input-request.mjs:42 — work-input-request.normalizeInputRequest has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, ternaries 7, 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 · task-state.publicTask (cognitive 16) · ×1
  • task-state.publicTask (cognitive 16) server/src/task/task-state.mjs:146 — task-state.publicTask has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, ternaries 6 (7 pts) (nesting depth added 1). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · PreferencePromoter.promote (cognitive 16) · ×1
  • PreferencePromoter.promote (cognitive 16) server/src/memory/learning/preference-promoter.mjs:128 — PreferencePromoter.promote has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 2, loops 2, ternaries 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · provider.queryTerms (cognitive 16) · ×1
  • provider.queryTerms (cognitive 16) server/src/knowledge/providers/local/provider.mjs:36 — provider.queryTerms has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (4 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 · session-configuration.forceSessionModel (cognitive 16) · ×1
  • session-configuration.forceSessionModel (cognitive 16) server/src/backend/adapters/acp/session-configuration.mjs:108 — session-configuration.forceSessionModel has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 5, ternaries 3 (4 pts), error handling 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 · gateway-client-transport.attachGatewayClientTransport.status (cognitive 16) · ×1
  • gateway-client-transport.attachGatewayClientTransport.status (cognitive 16) server/src/transport/gateway-client-transport.mjs:541 — gateway-client-transport.attachGatewayClientTransport.status has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TaskManager.#create (cognitive 16) · ×1
  • TaskManager.#create (cognitive 16) server/src/task/task-manager.mjs:481 — TaskManager.#create has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, ternaries 4, if/else 2 (3 pts) (nesting depth added 1). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · A2ABackendAdapter.submit (cognitive 16) · ×1
  • A2ABackendAdapter.submit (cognitive 16) server/src/backend/adapters/a2a/backend-adapter.mjs:1017 — A2ABackendAdapter.submit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, error handling 1, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · startProcess (cognitive 16) · ×1
  • startProcess (cognitive 16) server/src/backend/adapters/acp/process-client.mjs:213 — startProcess has cognitive complexity 16 (threshold 15). Drivers by points: error handling 4 (5 pts), if/else 3 (5 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 4). Of this number, 12 points are the body's own statements and 4 belong to 12 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · execute (cognitive 16) · ×1
  • execute (cognitive 16) server/src/frontend/tools/openapi/frontend-openapi-adapter.mjs:466 — execute has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (5 pts), ternaries 4, error handling 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 · startDesktopRendererServer (cognitive 16) · ×1
  • startDesktopRendererServer (cognitive 16) desktop/src/renderer-server.mjs:266 — startDesktopRendererServer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, loops 1 (nesting depth added 1). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 281, a function literal at line 309, close, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · normalizeInputParts (cognitive 16) · ×1
  • normalizeInputParts (cognitive 16) shared/input-parts.mjs:92 — normalizeInputParts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 3 (4 pts), boolean chains 3 (nesting depth added 2). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 97, 110, 106). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Change coupling clique · ×1
  • Change coupling clique: runtime.mjs, config.mjs, managed-backend.mjs cli/src/runtime.mjs — 3 files — `cli/src/runtime.mjs`, `server/src/core/config.mjs`, `server/src/process/managed-backend.mjs` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
IC1 · Incompleteness & stubs · Guard cannot change the result · ×1
  • Guard cannot change the result — returns what the code already falls through to web/src/task-view.js:17 — The guard above `return 'running';` also returns `'running'`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 0 typed · 754 plain JS — the untyped files are REDACTED, cli/src/config-command.mjs, cli/src/diagnostics.mjs, cli/src/gateway-service.mjs, cli/src/instance-lock.mjs, cli/src/launcher.mjs (+748 more).
R10 · Code Duplication · Duplication concentrated across 10 sibling directories (31 clone groups) · ×1
  • Duplication concentrated across 10 sibling directories (31 clone groups) server/src/conversation/session-digest.mjs:121 — 31 duplicated blocks under server/src/ have copies in at least two of the sibling directories access, backend, conversation, core, frontend, knowledge (+4 more sibling(s) not listed) — 20 of them are reported below, and 11 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 31 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 31 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 31 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 7 sibling directories (14 clone groups) · ×1
  • Duplication concentrated across 7 sibling directories (14 clone groups) scripts/runtime/launcher.mjs:13 — 14 duplicated blocks under the repository root have copies in at least two of the sibling directories cli, desktop, scripts, server, shared, tui (+1 more sibling(s) not listed) — 9 of them are reported below, and 5 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 14 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 14 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 14 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 4 sibling directories (11 clone groups) · ×1
  • Duplication concentrated across 4 sibling directories (11 clone groups) server/src/backend/adapters/llm/backend-adapter.mjs:216 — 11 duplicated blocks under server/src/backend/adapters/ have copies in at least two of the sibling directories a2a, acp, llm, muse — 10 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 11 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 11 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 11 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 2 sibling directories (6 clone groups) · ×1
  • Duplication concentrated across 2 sibling directories (6 clone groups) server/src/frontend/tools/mcp/frontend-mcp-config.mjs:182 — 6 duplicated blocks under server/src/frontend/tools/ have copies in at least two of the sibling directories mcp, openapi — 5 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block with local edits (145 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (145 matched lines × 2 locations) server/src/frontend/retrieval/providers/bing.mjs:1 — server/src/frontend/retrieval/providers/bing.mjs:1 · server/src/frontend/retrieval/providers/so360.mjs:1 — the two spans are one implementation copied and then locally edited — 829 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (101 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (101 matched lines × 2 locations) server/src/memory/learning/extractor.mjs:140 — server/src/memory/learning/extractor.mjs:140 · server/src/memory/learning/profile-observer.mjs:165 — the two spans are one implementation copied and then locally edited — 627 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (72 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (72 matched lines × 2 locations) server/src/frontend/tools/mcp/frontend-mcp-config.mjs:182 — server/src/frontend/tools/mcp/frontend-mcp-config.mjs:182 · server/src/frontend/tools/openapi/frontend-openapi-config.mjs:76 — the two spans are one implementation copied and then locally edited — 496 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (54 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (54 matched lines × 2 locations) server/src/conversation/session-digest.mjs:121 — server/src/conversation/session-digest.mjs:121 · server/src/knowledge/providers/local/library.mjs:122 — the two spans are one implementation copied and then locally edited — 347 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (48 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (48 matched lines × 2 locations) server/src/frontend/tools/mcp/frontend-mcp-config.mjs:24 — server/src/frontend/tools/mcp/frontend-mcp-config.mjs:24 · server/src/frontend/tools/openapi/frontend-openapi-config.mjs:21 — the two spans are one implementation copied and then locally edited — 316 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (46 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (46 matched lines × 2 locations) server/src/backend/adapters/acp/input-broker.mjs:70 — server/src/backend/adapters/acp/input-broker.mjs:70 · server/src/backend/adapters/acp/permission-broker.mjs:145 — the two spans are one implementation copied and then locally edited — 337 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (44 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (44 matched lines × 2 locations) server/src/core/work-authorization.mjs:49 — server/src/core/work-authorization.mjs:49 · server/src/core/work-input-request.mjs:39 — the two spans are one implementation copied and then locally edited — 273 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (43 lines × 2 locations) · ×1
  • Duplicated block (43 lines × 2 locations) scripts/runtime/launcher.mjs:13 — scripts/runtime/launcher.mjs:13 · shared/backend/setup.mjs:39 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (39 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (39 matched lines × 2 locations) desktop/src/gateway-credential-store.mjs:12 — desktop/src/gateway-credential-store.mjs:12 · shared/gateway/file-credential-store.mjs:12 — the two spans are one implementation copied and then locally edited — 296 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (33 lines × 2 locations) · ×1
  • Duplicated block (33 lines × 2 locations) scripts/runtime/claude-code-acp.mjs:18 — scripts/runtime/claude-code-acp.mjs:18 · scripts/runtime/codex-acp.mjs:16 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block (32 lines × 2 locations) · ×1
  • Duplicated block (32 lines × 2 locations) server/src/backend/adapters/llm/backend-adapter.mjs:216 — server/src/backend/adapters/llm/backend-adapter.mjs:216 · server/src/backend/adapters/muse/backend-adapter.mjs:746 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (32 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (32 matched lines × 2 locations) server/src/voice/providers/gpt-live.mjs:59 — server/src/voice/providers/gpt-live.mjs:59 · server/src/voice/providers/stepfun.mjs:49 — the two spans are one implementation copied and then locally edited — 204 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (30 lines × 2 locations) · ×1
  • Duplicated block (30 lines × 2 locations) server/src/backend/adapters/llm/backend-adapter.mjs:180 — server/src/backend/adapters/llm/backend-adapter.mjs:180 · server/src/backend/adapters/muse/backend-adapter.mjs:419 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (22 lines × 2 locations) · ×1
  • Duplicated block (22 lines × 2 locations) server/src/voice/providers/dashscope.mjs:180 — server/src/voice/providers/dashscope.mjs:180 · server/src/voice/providers/s2s.mjs:121 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication · Duplicated block (21 lines × 2 locations) · ×1
  • Duplicated block (21 lines × 2 locations) shared/gateway/remote-access.mjs:10 — shared/gateway/remote-access.mjs:10 · shared/gateway/remote-access.mjs:66 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (20 lines × 2 locations) · ×1
  • Duplicated block (20 lines × 2 locations) scripts/runtime/launcher.mjs:99 — scripts/runtime/launcher.mjs:99 · server/src/backend/adapters/acp/process-client.mjs:25 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (19 lines × 3 locations) · ×1
  • Duplicated block (19 lines × 3 locations) server/src/backend/adapters/a2a/backend-adapter.mjs:661 — server/src/backend/adapters/a2a/backend-adapter.mjs:661 · server/src/backend/adapters/llm/backend-adapter.mjs:193 · server/src/backend/adapters/muse/backend-adapter.mjs:432 — the 3 copies are spread across 3 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block (19 lines × 2 locations) · ×1
  • Duplicated block (19 lines × 2 locations) shared/backend/setup.mjs:171 — shared/backend/setup.mjs:171 · shared/backend/setup.mjs:215 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (16 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (16 matched lines × 2 locations) server/src/conversation/frontend-notes.mjs:289 — server/src/conversation/frontend-notes.mjs:289 · server/src/core/versioned-json-store.mjs:73 — the two spans are one implementation copied and then locally edited — 91 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (15 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (15 matched lines × 2 locations) server/src/backend/adapters/a2a/backend-adapter.mjs:476 — server/src/backend/adapters/a2a/backend-adapter.mjs:476 · REDACTED:134 — the two spans are one implementation copied and then locally edited — 68 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R2 · Cyclomatic Complexity · Complex function parseCommandArguments (cyclomatic 164, cognitive 158) · ×1
  • Complex function parseCommandArguments (cyclomatic 164, cognitive 158) REDACTED:89 — parseCommandArguments has cyclomatic complexity 164 and cognitive complexity 158; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function executeReservationsTool (cyclomatic 124, cognitive 208) · ×1
  • Complex function executeReservationsTool (cyclomatic 124, cognitive 208) examples/customer-service/service/tools/reservations/execute.mjs:149 — executeReservationsTool has cyclomatic complexity 124 and cognitive complexity 208; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function main (cyclomatic 118, cognitive 192) · ×1
  • Complex function main (cyclomatic 118, cognitive 192) cli/src/launcher.mjs:229 — main has cyclomatic complexity 118 and cognitive complexity 192; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function execute (cyclomatic 88, cognitive 130) · ×1
  • Complex function execute (cyclomatic 88, cognitive 130) examples/customer-service/agent/executor.mjs:486 — execute has cyclomatic complexity 88 and cognitive complexity 130; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 86, cognitive 112) · ×1
  • Complex function (anonymous) (cyclomatic 86, cognitive 112) REDACTED:514 — (anonymous) has cyclomatic complexity 86 and cognitive complexity 112; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function App (cyclomatic 78, cognitive 86) · ×1
  • Complex function App (cyclomatic 78, cognitive 86) REDACTED:196 — App has cyclomatic complexity 78 and cognitive complexity 86; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleClientEvent (cyclomatic 73, cognitive 104) · ×1
  • Complex function handleClientEvent (cyclomatic 73, cognitive 104) server/src/voice/realtime-session-runtime.mjs:913 — handleClientEvent has cyclomatic complexity 73 and cognitive complexity 104; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleLifecycle (cyclomatic 63, cognitive 96) · ×1
  • Complex function handleLifecycle (cyclomatic 63, cognitive 96) server/src/voice/realtime-provider.mjs:911 — handleLifecycle has cyclomatic complexity 63 and cognitive complexity 96; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleEvent (cyclomatic 52, cognitive 69) · ×1
  • Complex function handleEvent (cyclomatic 52, cognitive 69) server/src/voice/realtime-session-runtime.mjs:585 — handleEvent has cyclomatic complexity 52 and cognitive complexity 69; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function executeReturnsTool (cyclomatic 48, cognitive 72) · ×1
  • Complex function executeReturnsTool (cyclomatic 48, cognitive 72) examples/customer-service/service/tools/returns/execute.mjs:77 — executeReturnsTool has cyclomatic complexity 48 and cognitive complexity 72; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function decodeDhavRecord (cyclomatic 48, cognitive 39) · ×1
  • Complex function decodeDhavRecord (cyclomatic 48, cognitive 39) examples/digital-human/client/dhav-decoder.mjs:6 — decodeDhavRecord has cyclomatic complexity 48 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function collectDiagnostics (cyclomatic 47, cognitive 80) · ×1
  • Complex function collectDiagnostics (cyclomatic 47, cognitive 80) cli/src/diagnostics.mjs:69 — collectDiagnostics has cyclomatic complexity 47 and cognitive complexity 80; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function explicitRuntime (cyclomatic 46, cognitive 81) · ×1
  • Complex function explicitRuntime (cyclomatic 46, cognitive 81) shared/backend/setup.mjs:168 — explicitRuntime has cyclomatic complexity 46 and cognitive complexity 81; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function receive (cyclomatic 46, cognitive 55) · ×1
  • Complex function receive (cyclomatic 46, cognitive 55) server/src/transport/webrtc/protocol.mjs:71 — receive has cyclomatic complexity 46 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function inspectBackend (cyclomatic 46, cognitive 55) · ×1
  • Complex function inspectBackend (cyclomatic 46, cognitive 55) shared/backend/setup.mjs:326 — inspectBackend has cyclomatic complexity 46 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function #responseDone (cyclomatic 46, cognitive 52) · ×1
  • Complex function #responseDone (cyclomatic 46, cognitive 52) server/src/voice/realtime-presentation-runtime.mjs:349 — #responseDone has cyclomatic complexity 46 and cognitive complexity 52; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function applyDesktopSettings (cyclomatic 45, cognitive 42) · ×1
  • Complex function applyDesktopSettings (cyclomatic 45, cognitive 42) REDACTED:1023 — applyDesktopSettings has cyclomatic complexity 45 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function runServiceAgent (cyclomatic 43, cognitive 74) · ×1
  • Complex function runServiceAgent (cyclomatic 43, cognitive 74) examples/customer-service/agent/executor.mjs:315 — runServiceAgent has cyclomatic complexity 43 and cognitive complexity 74; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function restore (cyclomatic 42, cognitive 71) · ×1
  • Complex function restore (cyclomatic 42, cognitive 71) server/src/task/task-manager.mjs:148 — restore has cyclomatic complexity 42 and cognitive complexity 71; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleGateway (cyclomatic 41, cognitive 42) · ×1
  • Complex function handleGateway (cyclomatic 41, cognitive 42) examples/digital-human/client/avatar-playback.mjs:28 — handleGateway has cyclomatic complexity 41 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function onEvent (cyclomatic 40, cognitive 50) · ×1
  • Complex function onEvent (cyclomatic 40, cognitive 50) server/src/task/task-manager.mjs:674 — onEvent has cyclomatic complexity 40 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handle (cyclomatic 40, cognitive 45) · ×1
  • Complex function handle (cyclomatic 40, cognitive 45) tui/src/terminal-renderers.mjs:110 — handle has cyclomatic complexity 40 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleGatewayMessage (cyclomatic 39, cognitive 49) · ×1
  • Complex function handleGatewayMessage (cyclomatic 39, cognitive 49) tui/src/index.mjs:420 — handleGatewayMessage has cyclomatic complexity 39 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function #route (cyclomatic 38, cognitive 44) · ×1
  • Complex function #route (cyclomatic 38, cognitive 44) REDACTED:84 — #route has cyclomatic complexity 38 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function normalizeKnowledgeRetrievalResponse (cyclomatic 37, cognitive 45) · ×1
  • Complex function normalizeKnowledgeRetrievalResponse (cyclomatic 37, cognitive 45) server/src/knowledge/provider.mjs:215 — normalizeKnowledgeRetrievalResponse has cyclomatic complexity 37 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function memory (cyclomatic 36, cognitive 52) · ×1
  • Complex function memory (cyclomatic 36, cognitive 52) server/src/memory/tools.mjs:79 — memory has cyclomatic complexity 36 and cognitive complexity 52; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function installBackend (cyclomatic 36, cognitive 51) · ×1
  • Complex function installBackend (cyclomatic 36, cognitive 51) shared/backend/install.mjs:449 — installBackend has cyclomatic complexity 36 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ensureRuntime (cyclomatic 36, cognitive 46) · ×1
  • Complex function ensureRuntime (cyclomatic 36, cognitive 46) cli/src/runtime.mjs:430 — ensureRuntime has cyclomatic complexity 36 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleMessage (cyclomatic 36, cognitive 37) · ×1
  • Complex function handleMessage (cyclomatic 36, cognitive 37) examples/digital-human/client/renderers/dhav.mjs:53 — handleMessage has cyclomatic complexity 36 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function App (cyclomatic 36, cognitive 34) · ×1
  • Complex function App (cyclomatic 36, cognitive 34) examples/digital-human/client/App.jsx:71 — App has cyclomatic complexity 36 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function updateTask (cyclomatic 36, cognitive 33) · ×1
  • Complex function updateTask (cyclomatic 36, cognitive 33) server/src/orchestration/task-updates.mjs:7 — updateTask has cyclomatic complexity 36 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function operationInput (cyclomatic 34, cognitive 47) · ×1
  • Complex function operationInput (cyclomatic 34, cognitive 47) server/src/frontend/tools/openapi/frontend-openapi-adapter.mjs:118 — operationInput has cyclomatic complexity 34 and cognitive complexity 47; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function taskView (cyclomatic 34, cognitive 32) · ×1
  • Complex function taskView (cyclomatic 34, cognitive 32) web/src/task-view.js:176 — taskView has cyclomatic complexity 34 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function taskDetail (cyclomatic 33, cognitive 41) · ×1
  • Complex function taskDetail (cyclomatic 33, cognitive 41) web/src/task-view.js:94 — taskDetail has cyclomatic complexity 33 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handle (cyclomatic 33, cognitive 31) · ×1
  • Complex function handle (cyclomatic 33, cognitive 31) server/src/frontend/tools/tool-call-handler.mjs:530 — handle has cyclomatic complexity 33 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function normalizeKnowledgeDocument (cyclomatic 33, cognitive 27) · ×1
  • Complex function normalizeKnowledgeDocument (cyclomatic 33, cognitive 27) server/src/knowledge/provider.mjs:50 — normalizeKnowledgeDocument has cyclomatic complexity 33 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function consumeStream (cyclomatic 32, cognitive 61) · ×1
  • Complex function consumeStream (cyclomatic 32, cognitive 61) server/src/backend/adapters/a2a/backend-adapter.mjs:919 — consumeStream has cyclomatic complexity 32 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 32, cognitive 41) · ×1
  • Complex function (anonymous) (cyclomatic 32, cognitive 41) examples/digital-human/server/renderers/vidu.mjs:140 — (anonymous) has cyclomatic complexity 32 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleGateway (cyclomatic 32, cognitive 30) · ×1
  • Complex function handleGateway (cyclomatic 32, cognitive 30) examples/digital-human/client/renderers/vidu.mjs:61 — handleGateway has cyclomatic complexity 32 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function #handle (cyclomatic 31, cognitive 32) · ×1
  • Complex function #handle (cyclomatic 31, cognitive 32) REDACTED:108 — #handle has cyclomatic complexity 31 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 2010 lines of code REDACTED:1 — REDACTED has 2010 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 1489 lines of code REDACTED:1 — REDACTED has 1489 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 1314 lines of code REDACTED:1 — REDACTED has 1314 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/src/voice/realtime-provider.mjs · ×1
  • server/src/voice/realtime-provider.mjs: 1288 lines of code server/src/voice/realtime-provider.mjs:1 — server/src/voice/realtime-provider.mjs has 1288 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/src/voice/realtime-session-runtime.mjs · ×1
  • server/src/voice/realtime-session-runtime.mjs: 1235 lines of code server/src/voice/realtime-session-runtime.mjs:1 — server/src/voice/realtime-session-runtime.mjs has 1235 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/src/backend/adapters/a2a/backend-adapter.mjs · ×1
  • server/src/backend/adapters/a2a/backend-adapter.mjs: 1171 lines of code server/src/backend/adapters/a2a/backend-adapter.mjs:1 — server/src/backend/adapters/a2a/backend-adapter.mjs has 1171 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · web/src/realtime/useRealtimeVoice.js · ×1
  • web/src/realtime/useRealtimeVoice.js: 1138 lines of code web/src/realtime/useRealtimeVoice.js:1 — web/src/realtime/useRealtimeVoice.js has 1138 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · desktop/src/settings.js · ×1
  • desktop/src/settings.js: 1104 lines of code desktop/src/settings.js:1 — desktop/src/settings.js has 1104 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/src/task/task-manager.mjs · ×1
  • server/src/task/task-manager.mjs: 1086 lines of code server/src/task/task-manager.mjs:1 — server/src/task/task-manager.mjs has 1086 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/src/backend/adapters/muse/backend-adapter.mjs · ×1
  • server/src/backend/adapters/muse/backend-adapter.mjs: 870 lines of code server/src/backend/adapters/muse/backend-adapter.mjs:1 — server/src/backend/adapters/muse/backend-adapter.mjs has 870 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 814 lines of code REDACTED:1 — REDACTED has 814 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/src/backend/adapters/acp/process-client.mjs · ×1
  • server/src/backend/adapters/acp/process-client.mjs: 808 lines of code server/src/backend/adapters/acp/process-client.mjs:1 — server/src/backend/adapters/acp/process-client.mjs has 808 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/src/voice/realtime-presentation-runtime.mjs · ×1
  • server/src/voice/realtime-presentation-runtime.mjs: 723 lines of code server/src/voice/realtime-presentation-runtime.mjs:1 — server/src/voice/realtime-presentation-runtime.mjs has 723 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · tui/src/index.mjs · ×1
  • tui/src/index.mjs: 703 lines of code tui/src/index.mjs:1 — tui/src/index.mjs has 703 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · cli/src/launcher.mjs · ×1
  • cli/src/launcher.mjs: 694 lines of code cli/src/launcher.mjs:1 — cli/src/launcher.mjs has 694 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · shared/backend/install.mjs · ×1
  • shared/backend/install.mjs: 664 lines of code shared/backend/install.mjs:1 — shared/backend/install.mjs has 664 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · tui/src/terminal-renderers.mjs · ×1
  • tui/src/terminal-renderers.mjs: 654 lines of code tui/src/terminal-renderers.mjs:1 — tui/src/terminal-renderers.mjs has 654 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/src/frontend/tools/tool-call-handler.mjs · ×1
  • server/src/frontend/tools/tool-call-handler.mjs: 635 lines of code server/src/frontend/tools/tool-call-handler.mjs:1 — server/src/frontend/tools/tool-call-handler.mjs has 635 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/src/core/config.mjs · ×1
  • server/src/core/config.mjs: 632 lines of code server/src/core/config.mjs:1 — server/src/core/config.mjs has 632 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · shared/protocol/gateway-client-protocol.mjs · ×1
  • shared/protocol/gateway-client-protocol.mjs: 581 lines of code shared/protocol/gateway-client-protocol.mjs:1 — shared/protocol/gateway-client-protocol.mjs has 581 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · shared/backend/setup.mjs · ×1
  • shared/backend/setup.mjs: 575 lines of code shared/backend/setup.mjs:1 — shared/backend/setup.mjs has 575 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/src/transport/gateway-client-transport.mjs · ×1
  • server/src/transport/gateway-client-transport.mjs: 573 lines of code server/src/transport/gateway-client-transport.mjs:1 — server/src/transport/gateway-client-transport.mjs has 573 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 541 lines of code REDACTED:1 — REDACTED has 541 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · shared/backend/catalog.mjs · ×1
  • shared/backend/catalog.mjs: 538 lines of code shared/backend/catalog.mjs:1 — shared/backend/catalog.mjs has 538 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · cli/src/runtime.mjs · ×1
  • cli/src/runtime.mjs: 536 lines of code cli/src/runtime.mjs:1 — cli/src/runtime.mjs has 536 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/src/memory/providers/voicemem/provider.mjs · ×1
  • server/src/memory/providers/voicemem/provider.mjs: 531 lines of code server/src/memory/providers/voicemem/provider.mjs:1 — server/src/memory/providers/voicemem/provider.mjs has 531 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 526 lines of code REDACTED:1 — REDACTED has 526 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/src/memory/learning/preference-candidates.mjs · ×1
  • server/src/memory/learning/preference-candidates.mjs: 517 lines of code server/src/memory/learning/preference-candidates.mjs:1 — server/src/memory/learning/preference-candidates.mjs has 517 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/src/frontend/tools/openapi/frontend-openapi-adapter.mjs · ×1
  • server/src/frontend/tools/openapi/frontend-openapi-adapter.mjs: 514 lines of code server/src/frontend/tools/openapi/frontend-openapi-adapter.mjs:1 — server/src/frontend/tools/openapi/frontend-openapi-adapter.mjs has 514 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/src/conversation/frontend-notes.mjs · ×1
  • server/src/conversation/frontend-notes.mjs: 510 lines of code server/src/conversation/frontend-notes.mjs:1 — server/src/conversation/frontend-notes.mjs has 510 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 478 lines of code REDACTED:1 — REDACTED has 478 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · shared/gateway/client-sdk.mjs · ×1
  • shared/gateway/client-sdk.mjs: 469 lines of code shared/gateway/client-sdk.mjs:1 — shared/gateway/client-sdk.mjs has 469 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/src/voice/announcement/announcement-manager.mjs · ×1
  • server/src/voice/announcement/announcement-manager.mjs: 457 lines of code server/src/voice/announcement/announcement-manager.mjs:1 — server/src/voice/announcement/announcement-manager.mjs has 457 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · desktop/src/settings-config.mjs · ×1
  • desktop/src/settings-config.mjs: 447 lines of code desktop/src/settings-config.mjs:1 — desktop/src/settings-config.mjs has 447 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · desktop/smoke/settings-smoke.cjs · ×1
  • desktop/smoke/settings-smoke.cjs: 446 lines of code desktop/smoke/settings-smoke.cjs:1 — desktop/smoke/settings-smoke.cjs has 446 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/src/memory/learning/profile-observer.mjs · ×1
  • server/src/memory/learning/profile-observer.mjs: 444 lines of code server/src/memory/learning/profile-observer.mjs:1 — server/src/memory/learning/profile-observer.mjs has 444 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · server/src/knowledge/providers/local/library.mjs · ×1
  • server/src/knowledge/providers/local/library.mjs: 430 lines of code server/src/knowledge/providers/local/library.mjs:1 — server/src/knowledge/providers/local/library.mjs has 430 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling · No typecheck script · ×1
  • No typecheck script — test ✓ · lint ✓ · typecheck ✗ — read from this repository's REDACTED scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
R6 · Tooling · This package's lint script runs in no CI job · ×1
  • This package's lint script runs in no CI job REDACTED:317 — The root package declares the lint script `lint` (`eslint .`), but no step of this repository's CI runs it, by name, through another script, a Makefile target or a workspace runner, and no CI step runs the linter over the package itself. The rules it sets are enforced nowhere a pull request can fail. Run it in CI: a step that runs `npm run lint` in `.` (or the workspace's task runner).
R7 · Dead Code · Dead file (~451 LoC) · ×1
  • Dead file (~451 LoC) desktop/smoke/settings-smoke.cjs — no import path from any entry point (273 application, 34 tooling, 435 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (desktop/smoke/electron-smoke.cjs) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~135 LoC) · ×1
  • Dead file (~135 LoC) desktop/smoke/conversation-smoke.cjs — no import path from any entry point (273 application, 34 tooling, 435 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (desktop/smoke/electron-smoke.cjs) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~103 LoC) · ×1
  • Dead file (~103 LoC) desktop/smoke/custom-acp-settings-smoke.cjs — no import path from any entry point (273 application, 34 tooling, 435 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (desktop/smoke/electron-smoke.cjs) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~94 LoC) · ×1
  • Dead file (~94 LoC) examples/customer-service/benchmark/eva-harness-bridge.mjs — no import path from any entry point (273 application, 34 tooling, 435 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~71 LoC) · ×1
  • Dead file (~71 LoC) desktop/smoke/permission-smoke.cjs — no import path from any entry point (273 application, 34 tooling, 435 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (desktop/smoke/electron-smoke.cjs) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~43 LoC) · ×1
  • Dead file (~43 LoC) desktop/smoke/electron-smoke.cjs — no import path from any entry point (273 application, 34 tooling, 435 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~33 LoC) · ×1
  • Dead file (~33 LoC) examples/customer-service/benchmark/compare-harness.mjs — no import path from any entry point (273 application, 34 tooling, 435 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~30 LoC) · ×1
  • Dead file (~30 LoC) examples/voicemem/gateway.mjs — no import path from any entry point (273 application, 34 tooling, 435 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~22 LoC) · ×1
  • Dead file (~22 LoC) examples/customer-service/benchmark/summarize.mjs — no import path from any entry point (273 application, 34 tooling, 435 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unused dependency 'react-markdown' · ×1
  • Unused dependency 'react-markdown' mobile/package.json:23 — Declared in mobile/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'remark-gfm' · ×1
  • Unused dependency 'remark-gfm' mobile/package.json:24 — Declared in mobile/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
X2 · Cancellation propagation · Async function without AbortSignal · ×1
  • Async function without AbortSignal: runCli tui/src/text-cli.mjs:80 — `runCli` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×1
  • Untrusted text written into markup unescaped server/src/memory/providers/markdown/context-store.mjs:111 — `[...content].slice(0,this.maxChars).join('')` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Minor — 142 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate server/src/frontend/tools/mcp/frontend-mcp-config.mjs:47 — `!/^[a-z0-9-]+$/u.test(header) || /[\r\n]/u.test(resolved)` appears character-identically in 2 files — server/src/frontend/tools/mcp/frontend-mcp-config.mjs, server/src/frontend/tools/openapi/frontend-openapi-config.mjs. 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 server/src/memory/providers/markdown/provider.mjs:42 — `!Array.isArray(changes) || !changes.length` appears character-identically in 2 files — server/src/memory/providers/markdown/provider.mjs, server/src/memory/providers/voicemem/provider.mjs. 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 server/src/frontend/retrieval/providers/bing.mjs:19 — `!Number.isInteger(codePoint) || codePoint < 0 || codePoint > 0x10ffff || (codePoint >= 0xd800 && codePoint <= 0xdfff)` appears character-identically in 2 files — server/src/frontend/retrieval/providers/bing.mjs, server/src/frontend/retrieval/providers/so360.mjs. 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 server/src/frontend/tools/mcp/frontend-mcp-config.mjs:16 — `!Number.isInteger(parsed) || parsed < minimum || parsed > maximum` appears character-identically in 2 files — server/src/frontend/tools/mcp/frontend-mcp-config.mjs, server/src/frontend/tools/openapi/frontend-openapi-config.mjs. 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 server/src/session/session-journal-registry.mjs:31 — `!Number.isSafeInteger(value) || value < 1` appears character-identically in 2 files — server/src/session/session-journal-registry.mjs, server/src/session/session-journal-retention.mjs. 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 server/src/core/citation.mjs:12 — `!['http:', 'https:'].includes(url.protocol) || url.username || url.password` appears character-identically in 4 files — server/src/core/citation.mjs, server/src/frontend/retrieval/providers/bing.mjs, server/src/frontend/retrieval/providers/so360.mjs, shared/citation-display.mjs. 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 server/src/task/task-artifact.mjs:88 — `!artifact || typeof artifact !== 'object'` appears character-identically in 2 files — server/src/task/task-artifact.mjs, web/src/task-artifacts.js. 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 desktop/src/backend/detection-worker.mjs:8 — `!component || typeof component !== 'object'` appears character-identically in 2 files — desktop/src/backend/detection-worker.mjs, shared/backend/install.mjs. 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 server/src/task/task-artifact.mjs:48 — `!raw || !/^[a-z\d+/]*={0,2}$/i.test(raw)` appears character-identically in 2 files — server/src/task/task-artifact.mjs, web/src/task-artifacts.js. 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 server/src/backend/adapters/acp/input-broker.mjs:84 — `!record || !this.pending.delete(record.id)` appears character-identically in 2 files — server/src/backend/adapters/acp/input-broker.mjs, server/src/backend/adapters/acp/permission-broker.mjs. 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 server/src/backend/adapters/acp/input-broker.mjs:99 — `!record || record.ownerId !== clean(ownerId)` appears character-identically in 2 files — server/src/backend/adapters/acp/input-broker.mjs, server/src/backend/adapters/acp/permission-broker.mjs. 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 server/src/backend/adapters/llm/backend-adapter.mjs:341 — `!task || (ownerId && clean(ownerId) !== task.ownerId)` appears character-identically in 2 files — server/src/backend/adapters/llm/backend-adapter.mjs, server/src/backend/adapters/muse/backend-adapter.mjs. 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 server/src/conversation/frontend-notes.mjs:122 — `!this.filePath || this.persistenceDisabled` appears character-identically in 3 files — server/src/conversation/frontend-notes.mjs, server/src/core/versioned-json-store.mjs, server/src/task/task-store.mjs. 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 server/src/core/frontend-profile.mjs:21 — `!value || typeof value !== 'object' || Array.isArray(value)` appears character-identically in 6 files — server/src/core/frontend-profile.mjs, server/src/frontend/tools/mcp/frontend-mcp-config.mjs, server/src/frontend/tools/openapi/frontend-openapi-adapter.mjs, server/src/frontend/tools/openapi/frontend-openapi-config.mjs. 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 scripts/runtime/launcher.mjs:17 — `!value.startsWith('~/') && !value.startsWith('~\\')` appears character-identically in 2 files — scripts/runtime/launcher.mjs, shared/backend/setup.mjs. 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 server/src/frontend/tools/mcp/frontend-mcp-config.mjs:190 — `'readOnly' in value || 'approval' in value` appears character-identically in 2 files — server/src/frontend/tools/mcp/frontend-mcp-config.mjs, server/src/frontend/tools/openapi/frontend-openapi-config.mjs. 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 server/src/conversation/frontend-notes.mjs:256 — `Boolean(this.filePath) && !this.persistenceDisabled` appears character-identically in 3 files — server/src/conversation/frontend-notes.mjs, server/src/core/versioned-json-store.mjs, server/src/task/task-store.mjs. 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 server/src/frontend/retrieval/providers/bing.mjs:90 — `Number.isFinite(declaredLength) && declaredLength > MAX_RESPONSE_BYTES` appears character-identically in 2 files — server/src/frontend/retrieval/providers/bing.mjs, server/src/frontend/retrieval/providers/so360.mjs. 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 server/src/backend/adapters/acp/permission-broker.mjs:54 — `Number.isInteger(location?.line) && location.line > 0` appears character-identically in 2 files — server/src/backend/adapters/acp/permission-broker.mjs, server/src/core/work-authorization.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:1042 — `Number.isSafeInteger(session.coordinatorPromptTurns) && session.coordinatorPromptTurns >= 0` appears character-identically in 2 files — REDACTED, server/src/backend/adapters/acp/session-registry.mjs. 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 server/src/voice/providers/google-live.mjs:80 — `String(connection.voice || '').trim() || modelProfile().sessionDefaults.voice` appears character-identically in 3 files — server/src/voice/providers/google-live.mjs, server/src/voice/providers/gpt-live.mjs, server/src/voice/providers/stepfun.mjs. 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 server/src/core/work-input-request.mjs:32 — `['http:', 'https:'].includes(url.protocol) && !url.username && !url.password` appears character-identically in 2 files — server/src/core/work-input-request.mjs, shared/protocol/gateway-events.mjs. 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 server/src/frontend/tools/mcp/frontend-mcp-client.mjs:276 — `args && typeof args === 'object' && !Array.isArray(args)` appears character-identically in 2 files — server/src/frontend/tools/mcp/frontend-mcp-client.mjs, server/src/frontend/tools/openapi/frontend-openapi-adapter.mjs. 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 tui/src/runtime-configuration.mjs:52 — `argv[index] === '--help' || argv[index] === '-h'` appears character-identically in 2 files — tui/src/runtime-configuration.mjs, tui/src/text-cli.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:178 — `callContext.responseId || event.response_id || ''` appears character-identically in 3 files — REDACTED, server/src/frontend/tools/tool-call-handler.mjs, server/src/memory/tools.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default in catch · ×28
  • Silent fallback default in catch REDACTED:34 — `loginShellPath` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:183 — `regQuery` (in `getWindowsRegistryPath`) swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch shared/backend/auth-status.mjs:156 — `codeBuddyCredentialFiles` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch shared/backend/install.mjs:371 — `findNpmWithPowerShell` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch shared/skill-library.mjs:37 — `defaultReadNpmPrefix` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch shared/skill-library.mjs:188 — `readSkillLock` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch desktop/src/settings-store.mjs:140 — `createSettingsStore.loadUiState` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch desktop/src/skin-store.mjs:327 — `listSkins` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/src/core/json-snapshot-store.mjs:127 — `fileMtimeMs` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/src/core/json-snapshot-store.mjs:135 — `currentContentHash` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/src/task/recurrence.mjs:21 — `normalizeTimeZone` swallows every exception into `return 'UTC'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:18 — `normalizedOrigin` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/src/core/work-input-request.mjs:37 — `publicUrl` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/src/knowledge/providers/local/library.mjs:441 — `readHead` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/src/backend/adapters/acp/backend-session-utils.mjs:173 — `nativeToolOutput` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/src/backend/adapters/acp/builtin-mcp.mjs:88 — `runningProcesses` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/src/backend/adapters/llm/backend-adapter.mjs:73 — `errorBody` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/src/conversation/frontend-notes.mjs:148 — `fileContentHash` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/src/frontend/retrieval/providers/bing.mjs:60 — `publicUrl` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch server/src/frontend/retrieval/providers/so360.mjs:60 — `publicUrl` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch examples/lightrag/lightrag-provider.mjs:70 — `publicUrl` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch examples/smart-cockpit/agent/executor.mjs:146 — `customSkillCatalog` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch examples/smart-cockpit/bench/runner/controlled-harness.mjs:84 — `parseToolArguments` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch examples/smart-cockpit/bench/runner/run-realtime.mjs:220 — `parseRealtimeArguments` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch web/src/realtime/audio.js:180 — `createRealtimeAudioSendController.bufferedAmount` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • + 3 more in this group — see findings.md.
D8 · Code Coverage · Tests reach code only in some runs · ×16
  • Tests reach code only in some runs: server/src/app/session-conversation-history.mjs server/src/app/session-conversation-history.mjs:40 — 16 line(s) (40-50, 54-57, 63) were executed in some of the 3 runs of the suite and not in others. A test that does not take the same path every run only tests the part it always takes, so these lines are not counted as covered. Make the tests that reach them deterministic (a fixed clock, seed or ordering, or waiting on the event instead of on time), or test the paths directly.
  • Tests reach code only in some runs: server/src/conversation/conversation-sync.mjs server/src/conversation/conversation-sync.mjs:257 — 11 line(s) (257, 260, 264-265, 268-270, 276-277, 295-296) were executed in some of the 3 runs of the suite and not in others. A test that does not take the same path every run only tests the part it always takes, so these lines are not counted as covered. Make the tests that reach them deterministic (a fixed clock, seed or ordering, or waiting on the event instead of on time), or test the paths directly.
  • Tests reach code only in some runs: server/src/session/session-journal-reader.mjs server/src/session/session-journal-reader.mjs:21 — 43 line(s) (21-24, 28-38, 44-49, 54-75) were executed in some of the 3 runs of the suite and not in others. A test that does not take the same path every run only tests the part it always takes, so these lines are not counted as covered. Make the tests that reach them deterministic (a fixed clock, seed or ordering, or waiting on the event instead of on time), or test the paths directly.
  • Tests reach code only in some runs: server/src/session/session-journal-registry.mjs server/src/session/session-journal-registry.mjs:136 — 29 line(s) (136-137, 145-149, 162, 176, 209-211, 217-218, 221, 228-241) were executed in some of the 3 runs of the suite and not in others. A test that does not take the same path every run only tests the part it always takes, so these lines are not counted as covered. Make the tests that reach them deterministic (a fixed clock, seed or ordering, or waiting on the event instead of on time), or test the paths directly.
  • Tests reach code only in some runs: server/src/session/session-journal-retention.mjs server/src/session/session-journal-retention.mjs:80 — 5 line(s) (80, 85-88) were executed in some of the 3 runs of the suite and not in others. A test that does not take the same path every run only tests the part it always takes, so these lines are not counted as covered. Make the tests that reach them deterministic (a fixed clock, seed or ordering, or waiting on the event instead of on time), or test the paths directly.
  • Tests reach code only in some runs: server/src/session/session-replay.mjs server/src/session/session-replay.mjs:15 — 10 line(s) (15, 38-46) were executed in some of the 3 runs of the suite and not in others. A test that does not take the same path every run only tests the part it always takes, so these lines are not counted as covered. Make the tests that reach them deterministic (a fixed clock, seed or ordering, or waiting on the event instead of on time), or test the paths directly.
  • Tests reach code only in some runs: server/src/task/recurrence.mjs server/src/task/recurrence.mjs:11 — 3 line(s) (11-13) were executed in some of the 3 runs of the suite and not in others. A test that does not take the same path every run only tests the part it always takes, so these lines are not counted as covered. Make the tests that reach them deterministic (a fixed clock, seed or ordering, or waiting on the event instead of on time), or test the paths directly.
  • Tests reach code only in some runs: server/src/task/task-manager.mjs server/src/task/task-manager.mjs:152 — 114 line(s) (152-156, 164-165, 168-172, 176-186, 192-196, 219-258, 263-267, 276-312, 1106-1109) were executed in some of the 3 runs of the suite and not in others. A test that does not take the same path every run only tests the part it always takes, so these lines are not counted as covered. Make the tests that reach them deterministic (a fixed clock, seed or ordering, or waiting on the event instead of on time), or test the paths directly.
  • Tests reach code only in some runs: server/src/task/task-notification-queue.mjs server/src/task/task-notification-queue.mjs:110 — 5 line(s) (110-114) were executed in some of the 3 runs of the suite and not in others. A test that does not take the same path every run only tests the part it always takes, so these lines are not counted as covered. Make the tests that reach them deterministic (a fixed clock, seed or ordering, or waiting on the event instead of on time), or test the paths directly.
  • Tests reach code only in some runs: server/src/task/task-recovery.mjs server/src/task/task-recovery.mjs:33 — 24 line(s) (33, 36-39, 42, 45-49, 52-54, 57-66) were executed in some of the 3 runs of the suite and not in others. A test that does not take the same path every run only tests the part it always takes, so these lines are not counted as covered. Make the tests that reach them deterministic (a fixed clock, seed or ordering, or waiting on the event instead of on time), or test the paths directly.
  • Tests reach code only in some runs: server/src/task/task-repository.mjs server/src/task/task-repository.mjs:43 — 2 line(s) (43-44) were executed in some of the 3 runs of the suite and not in others. A test that does not take the same path every run only tests the part it always takes, so these lines are not counted as covered. Make the tests that reach them deterministic (a fixed clock, seed or ordering, or waiting on the event instead of on time), or test the paths directly.
  • Tests reach code only in some runs: server/src/task/task-state.mjs server/src/task/task-state.mjs:114 — 4 line(s) (114-117) were executed in some of the 3 runs of the suite and not in others. A test that does not take the same path every run only tests the part it always takes, so these lines are not counted as covered. Make the tests that reach them deterministic (a fixed clock, seed or ordering, or waiting on the event instead of on time), or test the paths directly.
  • Tests reach code only in some runs: server/src/task/task-store.mjs server/src/task/task-store.mjs:77 — 5 line(s) (77-79, 85-86) were executed in some of the 3 runs of the suite and not in others. A test that does not take the same path every run only tests the part it always takes, so these lines are not counted as covered. Make the tests that reach them deterministic (a fixed clock, seed or ordering, or waiting on the event instead of on time), or test the paths directly.
  • Tests reach code only in some runs: shared/session-events.mjs shared/session-events.mjs:66 — 8 line(s) (66-72, 75) were executed in some of the 3 runs of the suite and not in others. A test that does not take the same path every run only tests the part it always takes, so these lines are not counted as covered. Make the tests that reach them deterministic (a fixed clock, seed or ordering, or waiting on the event instead of on time), or test the paths directly.
  • Tests reach code only in some runs: src/core/versioned-json-store.mjs src/core/versioned-json-store.mjs:61 — 3 line(s) (61-63) were executed in some of the 3 runs of the suite and not in others. A test that does not take the same path every run only tests the part it always takes, so these lines are not counted as covered. Make the tests that reach them deterministic (a fixed clock, seed or ordering, or waiting on the event instead of on time), or test the paths directly.
  • Tests reach code only in some runs: src/task/task-store.mjs src/task/task-store.mjs:69 — 8 line(s) (69-76) were executed in some of the 3 runs of the suite and not in others. A test that does not take the same path every run only tests the part it always takes, so these lines are not counted as covered. Make the tests that reach them deterministic (a fixed clock, seed or ordering, or waiting on the event instead of on time), or test the paths directly.
P2 · Observability · Console output used as the logging channel · ×8
  • Console output used as the logging channel server/src/task/task-store.mjs:21 — `server/src/task/task-store.mjs` reports through `console.*` at line 21 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel server/src/memory/providers/markdown/context-store.mjs:87 — `server/src/memory/providers/markdown/context-store.mjs` reports through `console.*` at line 87 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel server/src/memory/learning/preference-candidate-store.mjs:26 — `server/src/memory/learning/preference-candidate-store.mjs` reports through `console.*` at line 26 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel server/src/knowledge/providers/local/library.mjs:125 — `server/src/knowledge/providers/local/library.mjs` reports through `console.*` at line 125 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel server/src/core/json-snapshot-store.mjs:37 — `server/src/core/json-snapshot-store.mjs` reports through `console.*` at line 37 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel server/src/core/operation-audit.mjs:10 — `server/src/core/operation-audit.mjs` reports through `console.*` at line 10 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel server/src/conversation/frontend-notes.mjs:91 — `server/src/conversation/frontend-notes.mjs` reports through `console.*` at line 91 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel server/src/conversation/session-digest.mjs:124 — `server/src/conversation/session-digest.mjs` reports through `console.*` at line 124 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
S1 · Web-Security Posture · No app-layer HTTPS enforcement detected · ×3
  • No app-layer HTTPS enforcement detected REDACTED:453 — `server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.)
  • No app-layer HTTPS enforcement detected REDACTED:168 — `server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.)
  • No app-layer HTTPS enforcement detected server/src/process/managed-backend.mjs:98 — `server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.)
D16 · Bus Factor · Off-boarding risk · ×2
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 72 significant file(s) lose their only recent owner: desktop/smoke/settings-smoke.cjs, tui/src/terminal-renderers.mjs, REDACTED, server/src/memory/providers/voicemem/provider.mjs, server/src/frontend/tools/openapi/frontend-openapi-adapter.mjs, server/eval/frontend-runtime-evaluations.mjs, server/src/orchestration/task-operations.mjs, shared/logger.mjs (+64 more). 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: tui/native/portaudio-voice-io.py, tui/src/macos-voice-io.mjs, tui/src/portaudio-voice-io.mjs. Pair on, review, or document these before any departure.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×2
  • Projects may be oversized for their cohesion server/package.json:1 — `server` (40202 LoC, 309 module-visible types across 41 directories) overshoots its size bounds. 2 of 11 build unit(s) (Gradle, SwiftPM, Xcode, npm) overshoot their size bounds, lowering Project Cohesion to 6.4/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion REDACTED:1 — `(repository root)` (18902 LoC, 133 module-visible types across 21 directories) overshoots its size bounds. 2 of 11 build unit(s) (Gradle, SwiftPM, Xcode, npm) overshoot their size bounds, lowering Project Cohesion to 6.4/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.
C2 · Access Controls · No named authorization policies · ×1
  • No named authorization policies REDACTED:538 — Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (76 single-owned of 238 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; 238 of the 408 production source files in this repository met that bar). They are anonymized user #3 (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: REDACTED.
D19 · Documentation Quality · Documentation · ×1
  • Documentation: no build, run or usage example mobile/ios/App/CapApp-SPM/README.md:1 — `CapApp-SPM` is a published Swift package (a `.library` product) and neither `mobile/ios/App/CapApp-SPM/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found REDACTED:76 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `REDACTED` makes this repository a deployable product (line 76).
D21 · Naming Consistency · `readAsDataURL` spells `URL` where 100 names in the project spell it `Url` · ×1
  • `readAsDataURL` spells `URL` where 100 names in the project spell it `Url` scripts/test/browser-webui-smoke.mjs:856 — 100 of 101 names in project qwen-audio-agent spell the token `Url` (100 of 101; unit: names in project qwen-audio-agent containing `Url`). Peers: arguments.defaultGatewayUrl (REDACTED:67); diagnostics.localUrl (cli/src/diagnostics.mjs:12); runtime.isLocalGateway(baseUrl) (cli/src/runtime.mjs:36); runtime.readWebRtcConfiguration(baseUrl) (cli/src/runtime.mjs:40); runtime.waitForGateway(baseUrl) (cli/src/runtime.mjs:261). Rename to `readAsDataUrl`. [rule N6]
D24 · Comment Value · redundant comment · ×1
  • redundant comment server/test/realtime-provider.test.mjs:2059 — "The automatic reply fails; the error names it." repeats the code it sits on: 4 of its 5 words (automatic, reply, fails, error) are already in `frontend.handleLifecycle({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
IC1 · Incompleteness & stubs · Empty method body · ×1
  • Empty method body server/src/frontend/tools/client-tool-source.mjs:32 — `initialize` has an empty body — confirm it's an intentional no-op and not an unfinished method.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 4/7 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `.`, `mobile/ios/App`.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST .github/workflows/ci.yml:6 — No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 4 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · Dependabot does not watch pip/gradle · ×1
  • Dependabot does not watch pip/gradle REDACTED:2 — `REDACTED` schedules updates, but no `package-ecosystem` entry covers `pip`, `gradle`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list.
R7 · Dead Code · Unused export 'WAKE_WORD_MODEL_SHA256' · ×1
  • Unused export 'WAKE_WORD_MODEL_SHA256' desktop/src/wake-word/model-manager.mjs:19 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'SERVICE_AGENT_PROMPT' · ×1
  • Unused export 'SERVICE_AGENT_PROMPT' examples/customer-service/agent/executor.mjs:80 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'clearGuardCache' · ×1
  • Unused export 'clearGuardCache' examples/customer-service/service/guards.mjs:77 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'toolLogPath' · ×1
  • Unused export 'toolLogPath' examples/customer-service/service/tool-log.mjs:26 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'DOMAINS' · ×1
  • Unused export 'DOMAINS' examples/customer-service/service/tools/registry.mjs:186 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'ALL_TOOL_NAMES' · ×1
  • Unused export 'ALL_TOOL_NAMES' examples/customer-service/service/tools/registry.mjs:198 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'truncateForVoice' · ×1
  • Unused export 'truncateForVoice' examples/customer-service/service/tools/shared.mjs:17 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'loadArtcSdk' · ×1
  • Unused export 'loadArtcSdk' examples/digital-human/client/renderers/artc-player.mjs:8 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'DEFAULT_MIN_HZ' · ×1
  • Unused export 'DEFAULT_MIN_HZ' examples/digital-human/providers/mock/spectrum.mjs:18 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'DEFAULT_MAX_HZ' · ×1
  • Unused export 'DEFAULT_MAX_HZ' examples/digital-human/providers/mock/spectrum.mjs:19 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'CAPTURE_CAPABILITY' · ×1
  • Unused export 'CAPTURE_CAPABILITY' examples/x-omni/vision/frame.mjs:2 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'hasBackendDriver' · ×1
  • Unused export 'hasBackendDriver' server/src/backend/adapters/acp/drivers/registry.mjs:73 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'createOfficialMuseClient' · ×1
  • Unused export 'createOfficialMuseClient' server/src/backend/adapters/muse/backend-adapter.mjs:238 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'SUMMARISER_MARKERS' · ×1
  • Unused export 'SUMMARISER_MARKERS' server/src/conversation/session-summariser.mjs:176 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'DEFAULT_FRONTEND_TOOL_MAX_RESULT_BYTES' · ×1
  • Unused export 'DEFAULT_FRONTEND_TOOL_MAX_RESULT_BYTES' server/src/frontend/tools/frontend-tool-loop.mjs:4 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'DOMAIN_SUMMARISER_MARKERS' · ×1
  • Unused export 'DOMAIN_SUMMARISER_MARKERS' server/src/knowledge/providers/local/summariser.mjs:138 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'OBSERVER_MARKERS' · ×1
  • Unused export 'OBSERVER_MARKERS' server/src/memory/learning/profile-observer.mjs:470 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'backendAddressInUse' · ×1
  • Unused export 'backendAddressInUse' server/src/process/managed-backend.mjs:75 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'allocateBackendAddress' · ×1
  • Unused export 'allocateBackendAddress' server/src/process/managed-backend.mjs:91 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'TASK_DOMAIN_EVENT_TYPES' · ×1
  • Unused export 'TASK_DOMAIN_EVENT_TYPES' server/src/task/task-events.mjs:22 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'loadWebRtcNative' · ×1
  • Unused export 'loadWebRtcNative' server/src/transport/webrtc/media.mjs:18 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'VISUAL_INPUT_INTERVAL_MS' · ×1
  • Unused export 'VISUAL_INPUT_INTERVAL_MS' server/src/voice/visual-input-buffer.mjs:1 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'VISUAL_INPUT_MAX_BASE64_BYTES' · ×1
  • Unused export 'VISUAL_INPUT_MAX_BASE64_BYTES' server/src/voice/visual-input-buffer.mjs:2 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'CAMERA_MAX_WIDTH' · ×1
  • Unused export 'CAMERA_MAX_WIDTH' web/src/composer/camera-input.js:1 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'CAMERA_MAX_HEIGHT' · ×1
  • Unused export 'CAMERA_MAX_HEIGHT' web/src/composer/camera-input.js:2 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'CAMERA_FRAME_MAX_BYTES' · ×1
  • Unused export 'CAMERA_FRAME_MAX_BYTES' web/src/composer/camera-input.js:3 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'REALTIME_AUDIO_SEND_HIGH_WATER_BYTES' · ×1
  • Unused export 'REALTIME_AUDIO_SEND_HIGH_WATER_BYTES' web/src/realtime/audio.js:143 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'REALTIME_AUDIO_SEND_LOW_WATER_BYTES' · ×1
  • Unused export 'REALTIME_AUDIO_SEND_LOW_WATER_BYTES' web/src/realtime/audio.js:144 — Nothing imports this binding — it is safe to review for removal.
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 1/2 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types · Java packages are not null-marked everywhere · ×1
  • Java packages are not null-marked everywhere — 0/1 of this repository's Java package directories are under a non-null default: a `package-info.java` declaring `@NullMarked` (JSpecify) or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, `@DefaultQualifier(NonNull.class)`; a `module-info.java` declaring `@NullMarked`; every type in it `@NullMarked`; or a build that runs NullAway with the package in `AnnotatedPackages`, or the Checker Framework's `NullnessChecker`. Elsewhere every reference admits null and no checker warns on the dereference that throws a `NullPointerException`.

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-dbe173ccb823467f9a383515bf3941c4/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=681" --report-format json --report-path /tmp/watchdog-gitleaks-dbe173ccb823467f9a383515bf3941c4/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-dbe173ccb823467f9a383515bf3941c4/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 .64artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .45artifacts/raw/trivy-fs.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 2 file(s) — `server/src/frontend/retrieval/safe-url-fetcher.mjs`, `server/src/memory/providers/markdown/context-store.mjs` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1e99d-910f-750b-ba61-701882a3de89 · 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